FastAPI Smith¶
Interactive CLI to scaffold production-ready FastAPI projects with database, authentication, admin panel, and more.
Why FastAPI Smith?¶
Building a production-ready FastAPI application involves making dozens of decisions and setting up boilerplate code. FastAPI Smith eliminates this overhead by:
- Asking the right questions - Interactive prompts guide you through project setup
- Making best-practice choices - Pre-configured with industry standards
- Saving hours of setup time - Go from idea to running API in minutes
- Staying flexible - Choose only what you need, nothing more
Features¶
Core Features¶
- Interactive CLI - Answer questions to customize your project
- Production-Ready - Best practices baked in from the start
- Type-Safe - Full type hints with mypy validation
- Async by Default - Built for high performance
- Modern Tooling - Ruff, pre-commit, GitHub Actions
Database Support¶
- PostgreSQL, MySQL, SQLite
- SQLAlchemy 2.0, SQLModel, or Tortoise-ORM
- Automatic migrations with Alembic/Aerich
- Connection pooling and async support
Authentication¶
- JWT with refresh tokens
- OAuth2 password flow
- Session-based auth
- Or skip auth entirely
Additional Features¶
- Admin panel with SQLAdmin
- Redis/Memcached caching
- Task queues (Celery, ARQ, Taskiq)
- Structured logging (Loguru, structlog)
- Health check endpoints
- Docker & docker-compose
- CI/CD with GitHub Actions
- AWS integration (S3, SES, ECS)
Quick Example¶
# Install
pip install fastapi-smith
# Run
fastapi-smith
# Answer a few questions...
# Project created!
cd my-project
uv sync
uv run uvicorn app.main:app --reload
Visit http://localhost:8000/docs to see your API documentation.
What Gets Generated?¶
A complete, production-ready FastAPI application:
my-project/
├── app/
│ ├── main.py # FastAPI app with routes
│ ├── config.py # Settings with pydantic-settings
│ ├── database.py # DB connection & session
│ ├── models/ # Database models
│ ├── schemas/ # Pydantic schemas
│ ├── routes/ # API endpoints
│ ├── services/ # Business logic
│ ├── core/ # Security, logging, caching
│ └── admin/ # Admin panel
├── migrations/ # Database migrations
├── tests/ # Pytest tests
├── .github/workflows/ # CI/CD
├── Dockerfile # Multi-stage build
├── docker-compose.yml # Full stack
└── pyproject.toml # Dependencies
Next Steps¶
Ready to get started?
-
:material-download:{ .lg .middle } Getting Started
Install FastAPI Smith and create your first project
-
:material-book-open-variant:{ .lg .middle } Configuration
Learn about all the configuration options available
-
:material-rocket-launch:{ .lg .middle } Guides
In-depth guides on deployment, testing, and more
-
:material-github:{ .lg .middle } Contributing
Help make FastAPI Smith even better
Community & Support¶
- Issues & Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Source Code: GitHub Repository
License¶
FastAPI Smith is licensed under the MIT License.