Skip to main content

django-spec-cli

CI PyPI Python versions Django versions Docs Coverage Ruff License

Run a django-service-specs registry from manage.py: one subcommand per spec, an option for each of its parameters, a principal named on the command line, and an exit code for every refusal.

It is the kernel's management-command transport, moved out of the kernel with its history so the kernel carries no transport. The command line, the exit codes and the SpecCommand subclass contract are the ones the kernel shipped; the import path, the system check ids and the setting key are this package's.

Install

pip install django-spec-cli

Python 3.10 or later, Django 4.2 or later, and django-service-specs 0.35.0 or later, which it installs.

Quickstart

Subclass SpecCommand in one of your apps' management/commands/ modules and name a registry; the module's name is the command's:

# yourapp/management/commands/notes.py
from django_spec_cli import SpecCommand

from yourapp.specs import notes  # a django_service_specs.SpecRegistry


class Command(SpecCommand):
    registry = notes
$ python manage.py notes rename-note --as-user 1 --pk 1 --title Final --json
{"id":1,"title":"Final"}

The run goes through the kernel's dispatch, so the permission checks are enforced for the user --as-user names. --explain lists the specs that authorize nothing.

The terminal screens

pip install 'django-spec-cli[tui]'
python manage.py notes --tui --as-user 1

--tui opens a keyboard-driven app over the registry: the specs it serves, each run from a form (a write asks for a second ctrl+s) or, for a list selector, browsed as a paged, filterable table. See the docs page.

The system check

List "django_spec_cli" in INSTALLED_APPS and manage.py check reports every open spec a SpecCommand serves as django_spec_cli.W001, a command that could not be loaded as django_spec_cli.W003, and a spec the kernel's check_seeds refuses under the command's pool_seeds as django_spec_cli.W004. A run of a spec W004 reports is refused whether or not the app is listed. The command itself needs no app listed.

The kernel keeps no check of its own: its app registers nothing, so a project listing only "django_service_specs" gets no check for a command. List "django_spec_cli".

Documentation

https://artui.github.io/django-spec-cli/

License

MIT. See LICENSE.

Metadata

Release files for django-spec-cli 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-spec-cli 0.8.1
File Size Uploaded Provenance Actions
django_spec_cli-0.8.1.tar.gz 233.4 kB With provenance Details for django_spec_cli-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-spec-cli 0.8.1
File Interpreter ABI Platform Actions
django_spec_cli-0.8.1-py3-none-any.whl Python 3 none any Details for django_spec_cli-0.8.1-py3-none-any.whl

Total release size: 281.2 kB

Release files / django_spec_cli-0.8.1.tar.gz

Download URL django_spec_cli-0.8.1.tar.gz
Size 233.4 kB
Tags Source
SHA-256 checksum
How to use checksums
329ce9ca5b756479deb4737ed50cb1f2da97ccd00211b4b24566d4e1d541d8cc
BLAKE2b-256 checksum
How to use checksums
30d340f965de4872fd3065cc8eabeb84edec8a51c7c494962c8aa640a7c6ea9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Release files / django_spec_cli-0.8.1-py3-none-any.whl

Download URL django_spec_cli-0.8.1-py3-none-any.whl
Size 47.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81ee5217bc461ea1d2c9062e025deccd5287b0ed735cd9847c4722821919f6ae
BLAKE2b-256 checksum
How to use checksums
be514723057a1e67ca19ccd893013f1b892be6f3d63be28311eb313159644b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Security for django-spec-cli 0.8.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_spec_cli-0.8.1.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 Nov 23, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page