If you've built more than one FastAPI project, you've probably written the same boilerplate more than once — repository classes, service layers, consistent API response formatting, and database migrations setup. FastKit is our attempt to solve that once, properly.
What is FastKit?
FastKit is an open-source ecosystem of packages built on top of FastAPI. The goal is simple: when you start a new project with FastKit, the first thing you write is business logic — not infrastructure.
It currently consists of two packages:
fastkit-core — the foundation layer:
- Repository pattern for database operations (sync + async)
- Service layer with lifecycle hooks (
before_create,after_update, etc.) -
TranslatableMixin— multi-language support built directly into SQLAlchemy models - Validation with structured, translated error messages
- HTTP utilities for consistent API responses across services
fastkit-cli — scaffolding tool:
fastkit make module Invoice
This single command generates a complete module — model, schemas, repository, service, and router with all five CRUD endpoints wired up and ready to go. Six files, zero boilerplate.
fastkit migrate make -m "create_invoices" # alembic revision --autogenerate
fastkit migrate run # alembic upgrade head
fastkit db seed # run all seeders
fastkit server # uvicorn with sane defaults
Why we built it?
FastAPI is intentionally unopinionated about structure. That's a feature — but it means every team rebuilds the same patterns from scratch. FastKit standardizes the parts that rarely need to vary, so you can focus on what actually makes your product different.
Where to find it?
- 📖 Full docs: fastkit.org
- ⭐ GitHub: fastkit-org/fastkit-core · fastkit-org/fastkit-cli
It's early, MIT licensed, and we'd genuinely appreciate feedback — what's missing, what's confusing, what you'd use in a real project. Stars on GitHub also help a lot with visibility.
Top comments (0)