Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stapel_tools-0.3.1.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stapel_tools-0.3.1-py3-none-any.whl (48.0 kB view details)

Uploaded Python 3

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

Hashes for stapel_tools-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a67a47fd345f892cf7f848338c63061f7b0db6841a3f4d915a8224c76fd7dec0
MD5 a34db6c115a076347849df2f648fe86f
BLAKE2b-256 d1eaea6812954af5248f833c3222a598377a2306f6da585adef3d170e89543e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_tools-0.3.1.tar.gz:

Publisher: publish.yml on usestapel/stapel-tools

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

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

Hashes for stapel_tools-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 088ffbf9811a072df2b2ff8ebdc1fb4b8a7184f0f6b5b4f2ec0b32c166001285
MD5 9941f72e4874ea287c8f91961beb7313
BLAKE2b-256 157f5d0be233190d9644068646a87c64ca3c5f216703eafb7c3c42946b4deedd

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_tools-0.3.1-py3-none-any.whl:

Publisher: publish.yml on usestapel/stapel-tools

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