A starter template for building backend applications with FastAPI, the high-performance Python web framework.
- ⚡ FastAPI, the high-performance Python web framework
- 🧩 Pydantic for data validation and settings management
- ⚙️ SQLAlchemy and asyncpg for non-blocking database access
- 🐘 PostgreSQL as the production-ready relational database
- 🧳 Alembic for version-controlled database migrations
- 📂 Defined project structure with ready-to-use
pyproject.tomland pydantic settings - 🖊️ VS Code settings included
- 🎨 Ruff for consistent code formatting and linting
- 📄 .editorconfig for consistent coding styles across editors
- 🧹 A
pre-commithook for style enforcement - 🧪 pytest tests to keep code honest
- 🐳 Containerization with Dockerfile and docker compose
- 🦦 Automatic Podman/Docker detection for local dev
- 🛠️ Makefile targets for format, build, run, and container tasks
- 🚦 GitHub Actions for CI/CD
- 🏷️ Artifact versioning based on Git SHA or tag, both in CI/CD and local builds
- 🤖 Dependabot for automated dependency updates
-
Before you start development on this project, run the
inittarget. This will install a pre-commit hook and install dependencies.make init
-
Run the application in dev mode that enables live coding.
make dev
-
To format the code while developing, you may use for IDE and turn on the auto-formatting on save. You may also use the format target.
make format
-
Build the application
make build # OR make container-build -
Run the application
make run # OR make container-run
The FastAPI Template is licensed under the terms of the MIT license.