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
Metadata
Release files for shaapi 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shaapi-0.3.2.tar.gz | 290.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shaapi-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 646.2 kB
Release files / shaapi-0.3.2.tar.gz
| Download URL | shaapi-0.3.2.tar.gz |
|---|---|
| Size | 290.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43eca6316b478db5331e515de2470bef076524f793b5244347d95af380e3bc47
|
|
BLAKE2b-256 checksum How to use checksums |
492e583accb75a7cd9a79bb33cf4fc542f4845a24f9f1828477217c92b5cd0c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logRelease files / shaapi-0.3.2-py3-none-any.whl
| Download URL | shaapi-0.3.2-py3-none-any.whl |
|---|---|
| Size | 356.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0704c146de26964fe18fbaa40b93464b455a18695f0e64f83cce36f795fa2cab
|
|
BLAKE2b-256 checksum How to use checksums |
dbad3335e9222be4f80cfdd646d1e07a3bfb35a53edb28477b081b31208a3acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logSecurity for shaapi 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for shaapi-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.