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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shaapi-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ae7c4cedd2265abd8781c8f2bdb1dc6c84b55519b236ecf599b7de28da05318e
MD5 8337ab29c20e2f3660c7c420aa3f20bd
BLAKE2b-256 d6cad7e806d166954dc90d697a1709c0d364c24f054ed819b2dca37f05d11780

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shaapi-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c960c00d6b79924714948292f08ccc8ab9658eb11604f44485472dd4dd91a107
MD5 a18a3d67a77193bc8bca66b55e24570e
BLAKE2b-256 40cf7c01e8dcb6ce1022a16cd73fa7832ff90a08746b26ba3ba3c244b719afd1

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