CLI scaffold and linting tools for Stapel/Django microservices
Project description
stapel-tools
CLI scaffold and linting tools for Stapel/Django projects.
Install
pip install git+https://github.com/usestapel/stapel-tools.git
Or as a dev dependency in your project:
pip install -e path/to/stapel-tools
Commands
stapel-create-project — interactive project wizard
stapel-create-project # full wizard
stapel-create-project my-app --type monolith # skip some wizard steps
stapel-create-project my-app \
--type monolith \
--title "My App" \
--url https://myapp.com \
--company-name "ACME" \
--company-email hello@myapp.com \
--modules auth billing # fully non-interactive
Project types: monolith (recommended), microservices, minimal (no Docker, SQLite).
stapel-new-service — add a service to an existing project
stapel-new-service auth
stapel-new-service auth --title "Auth Service" --prefix iron-
stapel-new-service blog --celery
stapel-new-service blog --dry-run
stapel-new-library — scaffold a standalone stapel-* package repo
For contributing a new reusable package to the framework (or building your
own to the same standard). Materializes the Stapel library standard: flat
layout, STAPEL_<NAME> settings namespace, comm surface with JSON schemas,
serializer seams, MODULE.md, community files, CI with the codecov
ratchet/floor policy, ruff git hooks. The generated repo's own test suite
is green out of the box.
stapel-new-library search # L2 service module
stapel-new-library attributes --kind library # L1 importable lib
stapel-new-library support-chat --title "Support chat" --dir ~/Projects
Kinds: module (default — Django app with models/views/comm surface;
modules never import each other) and library (importable package without
service identity, like stapel-attributes).
stapel-new-module — add a Django app to a service
cd svc-auth/
stapel-new-module users
stapel-new-module billing --title "Billing Plans"
stapel-remove-service — remove a service
stapel-remove-service auth
stapel-remove-service auth --prefix iron- --yes
stapel-remove-service auth --dry-run
stapel-lint — project-specific static linter
stapel-lint # scan current directory
stapel-lint svc-auth/ # scan specific service
stapel-lint --stats # show per-rule counts
stapel-lint --ignore R002 # skip a rule
Rules: R001 bare Response(), R002 serializers.ValidationError, R003 undocumented @action,
R004 @dataclass without docstring, R005 hardcoded error string, R006 StapelResponse(dict).
Suppress per-line: # noqa: R001
Available modules
| Module | Description |
|---|---|
core |
Core framework (always included) |
auth |
Authentication — JWT, OAuth, OTP |
billing |
Billing & subscriptions |
cdn |
File uploads & CDN |
notifications |
Email / push notifications |
profiles |
User profiles |
translate |
Translations & i18n |
workspaces |
Workspaces & multi-tenancy |
gdpr |
GDPR — data export & deletion |
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 stapel_tools-0.3.1.tar.gz.
File metadata
- Download URL: stapel_tools-0.3.1.tar.gz
- Upload date:
- Size: 44.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67a47fd345f892cf7f848338c63061f7b0db6841a3f4d915a8224c76fd7dec0
|
|
| MD5 |
a34db6c115a076347849df2f648fe86f
|
|
| BLAKE2b-256 |
d1eaea6812954af5248f833c3222a598377a2306f6da585adef3d170e89543e0
|
Provenance
The following attestation bundles were made for stapel_tools-0.3.1.tar.gz:
Publisher:
publish.yml on usestapel/stapel-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stapel_tools-0.3.1.tar.gz -
Subject digest:
a67a47fd345f892cf7f848338c63061f7b0db6841a3f4d915a8224c76fd7dec0 - Sigstore transparency entry: 2069412638
- Sigstore integration time:
-
Permalink:
usestapel/stapel-tools@8cd938721307dd2a955782a28ec5fbfa1c56d274 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/usestapel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8cd938721307dd2a955782a28ec5fbfa1c56d274 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stapel_tools-0.3.1-py3-none-any.whl.
File metadata
- Download URL: stapel_tools-0.3.1-py3-none-any.whl
- Upload date:
- Size: 48.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 |
088ffbf9811a072df2b2ff8ebdc1fb4b8a7184f0f6b5b4f2ec0b32c166001285
|
|
| MD5 |
9941f72e4874ea287c8f91961beb7313
|
|
| BLAKE2b-256 |
157f5d0be233190d9644068646a87c64ca3c5f216703eafb7c3c42946b4deedd
|
Provenance
The following attestation bundles were made for stapel_tools-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on usestapel/stapel-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stapel_tools-0.3.1-py3-none-any.whl -
Subject digest:
088ffbf9811a072df2b2ff8ebdc1fb4b8a7184f0f6b5b4f2ec0b32c166001285 - Sigstore transparency entry: 2069412893
- Sigstore integration time:
-
Permalink:
usestapel/stapel-tools@8cd938721307dd2a955782a28ec5fbfa1c56d274 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/usestapel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8cd938721307dd2a955782a28ec5fbfa1c56d274 -
Trigger Event:
push
-
Statement type: