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.1.tar.gz (261.6 kB 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.1-py3-none-any.whl (310.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shaapi-0.1.1.tar.gz
  • Upload date:
  • Size: 261.6 kB
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 320905c44c390047646892161b857c8493aec277de0b2037b956ef74d92fc3aa
MD5 d87bfdfe737a36e9e18311dbcf7dcbce
BLAKE2b-256 7ec2fbf6300e9c63841f36a0b52e97f2d1fe536ce40c9d92a778ed9e7386e5d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shaapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 310.1 kB
  • 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9000b15c62bc1bc0b32757a4cc1f155edb66bb7b9b025aea090c635fee73deb
MD5 42333c1a72bf137ed1c25a67d91883fc
BLAKE2b-256 ded9eb013362d809b3f324d13cc8990fc2ccb6e23c9095bd32c1633061300e4d

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