// the find
zhanymkanov/fastapi_production_template
FastAPI Template with Docker, Postgres
A FastAPI project template wiring together async SQLAlchemy, Alembic, Poetry, Gunicorn, and Sentry with sensible defaults baked in. Aimed at developers who want to skip the boilerplate setup on a new Python API project and get straight to writing domain code. Not a framework — just a starting point.
Async SQLAlchemy with pessimistic pooling configured out of the box is the right default and most templates skip it. Alembic migrations using YYYY-MM-DD_slug naming sorts correctly in filesystems without needing a sequence counter. The Dockerfile uses a non-root user and is structured for layer caching — small thing, often missed. Gunicorn worker count derived from CPU cores at runtime rather than hardcoded is the correct production behavior.
No auth scaffolding at all — not even a stub — so every project cloned from this immediately has to solve the same JWT/session problem from scratch. The src layout is completely flat: one real-world feature and you're already deciding whether to invent your own module structure. No test setup whatsoever, not even a conftest.py with a test DB fixture, which is the first thing any serious project needs. 1252 stars for a template with 167 forks and near-zero sample domain code means people are starring it for the config choices, not because it's battle-tested in production.