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 new "my api"
cd my_api
shaapi 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), cross-platform
shaapiorchestration (no bash) - Opt-in observability (
--monitoring): Prometheus, Grafana, Tempo, Loki - Production tooling (
shaapi ops): hardened compose overlay (datastores off the public network), secret generation, VPS provisioning/firewall scripts, and adev/prodgit-branch split (same code, config-only divergence) - Security testing (
shaapi sec): static audit + black-box probes (default-secret JWT forge, auth, login rate-limit, exposed ports), with a CI-friendly exit code
Generated projects are secure by default: a production fail-fast guard refuses to boot with default secrets, the container runs non-root, and the datastores are never exposed in production.
CLI
shaapi new "my api" # interactive scaffold
shaapi new "my api" -y # accept defaults
shaapi new "my api" --prod # + production config on a `prod` git branch
shaapi up / db apply / auth init # run the stack (cross-platform docker wrapper)
shaapi ops harden / secrets / checklist # production hardening (shaops)
shaapi sec audit / auth / scan / ports # security testing (shasec)
shaapi --version
In your generated project
shaapi up # build + start everything (dev: hot-reload)
shaapi up --prod # production: datastores not exposed
shaapi db apply # alembic upgrade head
shaapi db generate -m "add posts table"
shaapi auth init # create the first admin
shaapi logs / shaapi down
On Linux/macOS a bundled
./docker-run.shoffers the same commands if you prefer a plain shell script.
Documentation
📖 Full documentation site (EN/FR): https://shalom-302.github.io/shaapi/
Highlights:
The Markdown sources live in docs/ (English *.md, French *.fr.md).
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shaapi-0.3.1.tar.gz.
File metadata
- Download URL: shaapi-0.3.1.tar.gz
- Upload date:
- Size: 290.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b086ca924dde9e670b124b0fddf47bcf64ec857b3f0e8f54d41b2bcef7bd2c3
|
|
| MD5 |
1b4abf5368e9d49bccfcfb8d9dfdd08d
|
|
| BLAKE2b-256 |
69c3ecedb5270d1481449a407a6dd07d3bc3937ecdac969b75f652a87fd93c05
|
Provenance
The following attestation bundles were made for shaapi-0.3.1.tar.gz:
Publisher:
publish.yml on Shalom-302/shaapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shaapi-0.3.1.tar.gz -
Subject digest:
7b086ca924dde9e670b124b0fddf47bcf64ec857b3f0e8f54d41b2bcef7bd2c3 - Sigstore transparency entry: 1767856419
- Sigstore integration time:
-
Permalink:
Shalom-302/shaapi@12860e2a654ca1c72dad467bbb5373b2f44f49c9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Shalom-302
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@12860e2a654ca1c72dad467bbb5373b2f44f49c9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file shaapi-0.3.1-py3-none-any.whl.
File metadata
- Download URL: shaapi-0.3.1-py3-none-any.whl
- Upload date:
- Size: 356.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0792531bde25028ab40c93aad56aecbfab092cbbef084ecc938a394a0967e151
|
|
| MD5 |
173c3c01b351d132ea1ef3b4cd956118
|
|
| BLAKE2b-256 |
a717e2857b5a551dea83e2f86d7ca2317f15cf804f8e70a81defefea10024be7
|
Provenance
The following attestation bundles were made for shaapi-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on Shalom-302/shaapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shaapi-0.3.1-py3-none-any.whl -
Subject digest:
0792531bde25028ab40c93aad56aecbfab092cbbef084ecc938a394a0967e151 - Sigstore transparency entry: 1767856484
- Sigstore integration time:
-
Permalink:
Shalom-302/shaapi@12860e2a654ca1c72dad467bbb5373b2f44f49c9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Shalom-302
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@12860e2a654ca1c72dad467bbb5373b2f44f49c9 -
Trigger Event:
release
-
Statement type: