FastAPI on Kubernetes
Async Python APIs with Pydantic v2 and Alembic migrations.
larakube fastapi:newfastapi:new writes a ready-to-extend FastAPI service: Pydantic v2 models, Alembic for migrations, interactive API docs, and the services you pick.
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:
| Choice | Options | With --fast |
|---|---|---|
| Database | PostgreSQL (recommended), MySQL, MariaDB | PostgreSQL |
| Cache | Redis (recommended), Memcached | Redis |
| Object storage | None, MinIO (recommended), SeaweedFS, Garage | MinIO |
| Search | None, Meilisearch (meilisearch-python), Typesense (typesense-python) | None |
🧱 What your app is set up for
| Piece | Detail |
|---|---|
| Server | Uvicorn, listening on port 8000 |
| Migrations | alembic upgrade head — set up in the project, not yet run on deploy |
| Health check | /healthz |
| API docs | Interactive 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.