FastAPI Production Template is an open-source Python project starter designed to simplify the development and deployment of FastAPI applications. It provides a structured backend foundation with PostgreSQL, SQLAlchemy, and Alembic for database operations and schema migrations. The template supports asynchronous database connections and configurable connection pooling. Docker configurations provide reproducible development environments and optimized production deployments. Gunicorn settings automatically adjust worker processes to available system resources. Developers can use Ruff for code linting and formatting while managing dependencies through Poetry. Additional capabilities include structured JSON logging, Sentry error monitoring, global exception handling, and reusable database migration scripts. The project helps developers establish consistent backend infrastructure without repeatedly configuring common production components.
Features
- Docker-Based Development and Deployment
- PostgreSQL and Async SQLAlchemy Integration
- Alembic Database Migrations
- Gunicorn Worker Configuration
- Ruff Code Linting and Formatting
- Structured Logging and Sentry Monitoring