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.3.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.3-py3-none-any.whl (310.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shaapi-0.1.3.tar.gz
  • Upload date:
  • Size: 261.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shaapi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e936ac6abeae35b427f116da33f3444a6e6b0f2cb386e7f2416eda71bfeb2f87
MD5 3367f7a47327a3cc434c9021e51cd284
BLAKE2b-256 907a694ee266ee45984b38b0c354f070236dc65975128aec8fba9f9b27c45481

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaapi-0.1.3.tar.gz:

Publisher: publish.yml on Shalom-302/shaapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: shaapi-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 310.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shaapi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c1a11efb817aa0c417c6a8c1edb23df46922e044c6487cb7cae0e604f911eb6
MD5 10ed8e67c978f18a38552f2b9dbdeff7
BLAKE2b-256 aa55848f5798184d0c7f9b8d10bbcc4cfb2c8b32ddd03fd5ee50dfd81b82be8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaapi-0.1.3-py3-none-any.whl:

Publisher: publish.yml on Shalom-302/shaapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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