Production FastAPI starter toolkit with Redis, SQLAlchemy, JWT Auth, and CLI scaffolding
Project description
🛠️ BoostAPI
Production-ready FastAPI starter toolkit with Redis caching, JWT Auth & CLI scaffolding
✨ Features
| Feature | Details |
|---|---|
| ⚡ Redis Caching | Built-in caching templates for instant responses |
| 🔐 JWT Auth | Secure authentication with refresh tokens built-in |
| 🗃️ Async SQLAlchemy | asyncpg driver, connection pooling, Alembic migrations |
| 🛠️ CLI Scaffolding | boostapi quickstart myapp → full project in seconds |
| 📦 Zero-Config | Works out of the box with sane defaults |
| 🚀 Production-Grade | Loguru logging, CORS, rate limiting, OpenAPI docs |
⚡ 2-Minute Quickstart
Option A: Scaffold a New Project
# Install BoostAPI
pip install boostapi
# Scaffold a complete web application
boostapi quickstart my-app
cd my-app
# Start dependencies (PostgreSQL + Redis)
docker compose up -d
# Run migrations & start server
alembic upgrade head
uvicorn app.main:app --reload
Open http://localhost:8000/docs — your API is live! 🎉
Option B: Embed in Your App
# myapp.py
from boostapi import create_app
app = create_app()
# uvicorn myapp:app --reload
Option C: Custom Settings
from boostapi import create_app
from boostapi.app.core.config import Settings
app = create_app(settings=Settings(
POSTGRES_DB="mydb",
REDIS_URL="redis://myredis:6379",
SECRET_KEY="super-secret-change-me",
))
🔌 API Reference
Authentication
# Login
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "secret"}'
# Returns:
# {"access_token": "eyJ...", "token_type": "bearer"}
Health Check
curl http://localhost:8000/api/v1/health/
# {"status": "healthy", "version": "0.1.0", "db": "ok", "redis": "ok"}
🐳 Docker Compose
BoostAPI ships with a production-ready docker-compose.yml:
# Included automatically via `boostapi quickstart`
services:
db: # postgres:16-alpine
redis: # redis:7-alpine
app: # your FastAPI app
⚙️ Configuration
All settings are configurable via environment variables or .env file:
| Variable | Default | Description |
|---|---|---|
POSTGRES_SERVER |
localhost |
PostgreSQL host |
POSTGRES_PORT |
5432 |
PostgreSQL port |
POSTGRES_USER |
postgres |
DB username |
POSTGRES_PASSWORD |
password |
DB password |
POSTGRES_DB |
boostapi |
Database name |
REDIS_URL |
redis://localhost:6379 |
Redis connection URL |
SECRET_KEY |
(change me) | JWT signing key |
ACCESS_TOKEN_EXPIRE_MINUTES |
30 |
Token TTL (minutes) |
🧪 Testing
pip install boostapi[dev]
pytest --cov=boostapi
🚀 Deployment
Render / Fly.io
# Set environment variables in your hosting dashboard
# then:
uvicorn boostapi.app.main:app --host 0.0.0.0 --port $PORT
Docker
docker build -t my-app .
docker compose up
Publish to PyPI
pip install build twine
python -m build
twine upload dist/*
🏗️ Project Structure
my-app/ # generated by `boostapi quickstart`
├── app/
│ ├── main.py # create_app() entry point
│ ├── api/endpoints/ # auth, health, etc.
│ ├── core/ # config, security
│ ├── db/ # models, migrations
│ └── services/ # business logic
├── tests/ # pytest suite (90%+ coverage)
├── docker-compose.yml
├── alembic.ini
└── .env
📄 License
MIT © Dhinakaran
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boostapi-0.1.0.tar.gz.
File metadata
- Download URL: boostapi-0.1.0.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7691b4399aa910a7415a98c4d748371a8bd520ca9362687d2a1ed8928cb4e98d
|
|
| MD5 |
66cbf75e94a74c94bce8b05ba008e379
|
|
| BLAKE2b-256 |
131069f5875b7ebe03e847becb6f7bad6336066bbbcfaee12cff9c45c29ebf8f
|
File details
Details for the file boostapi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: boostapi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b405129345a13663f21434ede4bc9f5886049ae283eb16f0ae9ebad3b1bdd24a
|
|
| MD5 |
44fb19cbade76a1bb8341f2118f3f682
|
|
| BLAKE2b-256 |
07f407372de7892b2c865bef924a72f256a30763eaebf2400c713346cef0a127
|