simple_module_api_tokens
Personal access tokens and service API keys for simple_module apps.
smpat_…tokens act for their owner,smsk_…service keys act for no one, with roles chosen at creation (neveradmin) and a pinned tenant.- Every token carries scopes, which cap what it can do on every request, even when its owner is an admin. Demoting the owner shrinks the token at once.
- Only
sha256(token)is stored, and the secret is shown once. Revocation applies on the next request. - Tokens can only be created, listed and revoked from a signed-in browser session, with a CSRF token.
Install
pip install simple_module_api_tokens
Add simple_module_api_tokens to your host's dependencies and generate a
migration. It needs the auth, users and settings modules.
Usage
curl -H "Authorization: Bearer smpat_…" https://app.example.com/api/feature_flags/
| Route | Page | Purpose |
|---|---|---|
GET /api-tokens/ |
ApiTokens/Index |
Your own tokens (api_tokens.use) |
GET /admin/api-tokens/ |
ApiTokens/Admin |
All tokens and service keys (api_tokens.manage) |
Settings: max_lifetime_days (default 365), DB-backed.
See docs/modules/api_tokens.md for the resolution order, the scope cap and the tenancy rules.
Metadata
Release files for simple-module-api-tokens 0.0.37
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 | |
|---|---|---|---|---|
| simple_module_api_tokens-0.0.37.tar.gz | 35.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_module_api_tokens-0.0.37-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.8 kB
Release files / simple_module_api_tokens-0.0.37.tar.gz
| Download URL | simple_module_api_tokens-0.0.37.tar.gz |
|---|---|
| Size | 35.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed999c8d43588bc47445733a167168fcd3fd37e4f5c4437aea93145cda61f323
|
|
BLAKE2b-256 checksum How to use checksums |
36cdcd30f0db9c5e769a06630b5c5b24728ee2763f69e18611febc1e161e327a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / simple_module_api_tokens-0.0.37-py3-none-any.whl
| Download URL | simple_module_api_tokens-0.0.37-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e38750c0046a9b3472f8f5e90c108da14179d909f79a72e8da431c005b76d28e
|
|
BLAKE2b-256 checksum How to use checksums |
888ce766f74f5ec3812de4044a1872a331a99a11af12ec753bef1aa73a5ed0a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logSecurity for simple-module-api-tokens 0.0.37
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 simple_module_api_tokens-0.0.37.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 Oct 19, 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.