Skip to content

shaapi

Scaffold lean, batteries-included FastAPI backends — like django-admin, for FastAPI.

shaapi gives you a clean, production-shaped FastAPI project in seconds: async SQLAlchemy + Alembic, PostgreSQL, Redis, JWT auth, Casbin RBAC, file storage and a cross-platform shaapi CLI that wraps docker compose. Stop wiring infrastructure — start building features.

  • Instant start


    pip install shaapishaapi newshaapi up → a working API in under a minute.

  • Clean architecture


    Models · schemas · CRUD · services · routers. The same layering used in serious production codebases — ready to learn from.

  • Docker-first


    Multi-stage slim image, hot-reload in dev, migrations in prod, driven by the cross-platform shaapi CLI (Windows/macOS/Linux, no bash).

  • Learn by reading


    A real, well-organized backend. Students learn FastAPI the production way by exploring a project that actually runs.

Quick start

pip install shaapi
shaapi new "my api"
cd my_api
shaapi up

Then optionally create an admin user with shaapi auth init.

→ API at http://localhost:8000 · Swagger at http://localhost:8000/admin/api/v1/docs

What's inside

  • FastAPI (async) with a layered architecture
  • SQLAlchemy 2 + Alembic — auto-create in dev, migrations in prod
  • PostgreSQL + Redis (cache & rate limiting)
  • JWT auth + Casbin RBAC — users, roles, permissions
  • File storage — MinIO / S3 / GCS
  • Docker — slim multi-stage image built with uv, hot-reload, driven by the cross-platform shaapi CLI (./docker-run.sh remains as an optional Unix shell alternative)
  • Opt-in observability — Prometheus, Grafana, Tempo, Loki

Built on the latest stack: SQLAlchemy 2.0 · Pydantic v2 · FastAPI.

Where to next?


shaapi is open source (MIT) — GitHub · PyPI