Skip to main content

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

Project description

shaapi

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

Beginners shouldn't have to architect a production backend from scratch. shaapi gives you a clean, opinionated FastAPI project — async SQLAlchemy + Alembic, Postgres, Redis, JWT auth, Casbin RBAC, file storage, and a one-command Docker workflow — generated in seconds.

pip install shaapi
shaapi create-project "my api"
cd my_api
./docker-run.sh up

→ API live at http://localhost:8000, Swagger at http://localhost:8000/admin/api/v1/docs.

What you get

  • FastAPI (async) with a clean layered architecture (app/, common/, core/, crud/, models/, schemas/)
  • SQLAlchemy 2 + Alembic migrations, Postgres (auto-create in dev, migrations in prod)
  • Redis cache + rate limiting
  • JWT auth + Casbin RBAC (users, roles, permissions)
  • File storage (MinIO / S3 / GCS)
  • Docker: multi-stage slim image built with uv, hot-reload in dev (source bind-mount), docker-run.sh orchestration
  • Opt-in observability (--monitoring): Prometheus, Grafana, Tempo, Loki

CLI

shaapi create-project "my api"          # interactive
shaapi create-project "my api" -y       # accept defaults
shaapi create-project "my api" --monitoring --no-git
shaapi --version

In your generated project

./docker-run.sh up            # build + start everything (dev: hot-reload)
./docker-run.sh up --monitoring
./docker-run.sh logs          # tail logs
./docker-run.sh migrate       # alembic upgrade head
./docker-run.sh makemigrations "add posts table"
./docker-run.sh down

Documentation

Full docs in English and French under docs/:

English Français
Getting started getting-started démarrage
Architecture architecture architecture
Create a feature create-a-feature créer une fonctionnalité
Deployment deployment déploiement

Example

examples/todolist — a complete authenticated Todo API (JWT, per-user ownership, admin-only endpoint) built on top of shaapi in 5 files.

Status

Alpha. See the repo for roadmap and contribution guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shaapi-0.1.0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shaapi-0.1.0-py3-none-any.whl (4.6 MB view details)

Uploaded Python 3

File details

Details for the file shaapi-0.1.0.tar.gz.

File metadata

  • Download URL: shaapi-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for shaapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47176f427d14463fc253b98484cbf744521921429c23025cd3c67b675df97213
MD5 413e944669d44a215c4c0d9a60a2a290
BLAKE2b-256 f62f787d597e0ac9318fd77d1b93e182977d3898ad13758c8645777b903bcff7

See more details on using hashes here.

File details

Details for the file shaapi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shaapi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for shaapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 323d0e6f8ca2b543b16bdbf8181d375e28bd1f8c7b0f35e1fc92d3e465beb2c3
MD5 e2b080f8cdd19f3c19b7e4a54193187d
BLAKE2b-256 9554fa880bea76c6eaa42e999c17a6d6faa8ccb3bf4e8d95d10070338cf60b72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page