Skip to main content

FastAPI on Kubernetes

FastAPI logoFastAPI logo

Async Python APIs with Pydantic v2 and Alembic migrations.

larakube fastapi:new
🚧 Not deployable yet🏘️ Joins the Plex Commons once verifiedPythonScaffolds via templated

fastapi:new writes a ready-to-extend FastAPI service: Pydantic v2 models, Alembic for migrations, interactive API docs, and the services you pick.

Not deployable yet

fastapi:new creates the app and its Kubernetes manifests, but there's no production image for it yet: it warns No production image template for FastAPI yet and skips the Dockerfile. With no image, larakube up has nothing to run and cloud:deploy has nothing to ship. NestJS is the first framework through this path, and the rest follow one at a time.

🚀 Create a project

larakube fastapi:new api

FastAPI has no official project generator, so LaraKube CLI writes the starting files itself — main.py, requirements.txt and an Alembic setup — then asks:

ChoiceOptionsWith --fast
DatabasePostgreSQL (recommended), MySQL, MariaDBPostgreSQL
CacheRedis (recommended), MemcachedRedis
Object storageNone, MinIO (recommended), SeaweedFS, GarageMinIO
SearchNone, Meilisearch (meilisearch-python), Typesense (typesense-python)None

🧱 What your app is set up for

PieceDetail
ServerUvicorn, listening on port 8000
Migrationsalembic upgrade head — set up in the project, not yet run on deploy
Health check/healthz
API docsInteractive Swagger UI at /docs

🏘️ Plex Commons

FastAPI apps will join the shared Plex Commons for their database, cache and storage once this scaffolder is verified.

➡️ Next