Approval Ledger
Hash-bound human approval and idempotent dispatch for automated actions.
Approval Ledger is deliberately channel-neutral. It does not know about social networks, email providers, recipients or credentials. It stores an action's canonical JSON digest, required gate results, the approval attached to that exact digest and one durable dispatch result.
Install
pip install approval-ledger
Example
from approval_ledger import SQLiteLedger
ledger = SQLiteLedger("ledger.sqlite3")
action = ledger.create_action(
{"target": "draft", "body": "Human-approved message"},
required_gates=("artifact-qa",),
)
ledger.record_gate(action.id, action.digest, "artifact-qa", passed=True)
ledger.approve(action.id, action.digest, approver="editor@example.test")
receipt = ledger.dispatch(
action.id,
lambda payload, key: "provider-delivery-id",
)
assert receipt.status == "completed"
Safety model
- A changed payload has a different SHA-256 digest and needs a new approval.
- Required gates must pass before approval.
- A dispatch reservation is durable before the callback runs.
- A transport exception produces indeterminate state; the library does not retry and risk duplicate delivery.
- The package makes no claim of legal approval, content compliance or cryptographic signer identity.
Use a real authenticated audit identity and an application-specific transport outside this package.
Development
PYTHONPATH=src python -m unittest discover -s tests -v
uv build
License
MIT. See LICENSE.
Metadata
Release files for approval-ledger 0.1.0
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 | |
|---|---|---|---|---|
| approval_ledger-0.1.0.tar.gz | 5.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| approval_ledger-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / approval_ledger-0.1.0.tar.gz
| Download URL | approval_ledger-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73916ec3576776980fbaf1bcde5240995464f23abe5ed59e9cf9bbcb1e8f3eb2
|
|
BLAKE2b-256 checksum How to use checksums |
356c8919b7a6498403f6219af8b5684bfae3a27eb59f1240bf61c3d62c2f6376
|
| 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 Aug 20, 2026.
Transparency logRelease files / approval_ledger-0.1.0-py3-none-any.whl
| Download URL | approval_ledger-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b20a8cfe6826e504ee4d8470dbb8773c319463b1684d159c309ca653b6933b89
|
|
BLAKE2b-256 checksum How to use checksums |
723d05ac1d67357008df4c65f7bbb90026c067adbc7d802bdfb9e5ae5b23af7d
|
| 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 Aug 20, 2026.
Transparency logSecurity for approval-ledger 0.1.0
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 approval_ledger-0.1.0.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 Aug 20, 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.