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.
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 approval_ledger-0.1.0.tar.gz.
File metadata
- Download URL: approval_ledger-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73916ec3576776980fbaf1bcde5240995464f23abe5ed59e9cf9bbcb1e8f3eb2
|
|
| MD5 |
e027f4d92408197a624206799fc64470
|
|
| BLAKE2b-256 |
356c8919b7a6498403f6219af8b5684bfae3a27eb59f1240bf61c3d62c2f6376
|
Provenance
The following attestation bundles were made for approval_ledger-0.1.0.tar.gz:
Publisher:
publish.yml on Mihailorama/approval-ledger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
approval_ledger-0.1.0.tar.gz -
Subject digest:
73916ec3576776980fbaf1bcde5240995464f23abe5ed59e9cf9bbcb1e8f3eb2 - Sigstore transparency entry: 2531609209
- Sigstore integration time:
-
Permalink:
Mihailorama/approval-ledger@e03ea18c45f2a8e052f7e8f4104c97f1decf579d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Mihailorama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e03ea18c45f2a8e052f7e8f4104c97f1decf579d -
Trigger Event:
release
-
Statement type:
File details
Details for the file approval_ledger-0.1.0-py3-none-any.whl.
File metadata
- Download URL: approval_ledger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b20a8cfe6826e504ee4d8470dbb8773c319463b1684d159c309ca653b6933b89
|
|
| MD5 |
7b7fbb03457cdc2913ea97dbe4252c39
|
|
| BLAKE2b-256 |
723d05ac1d67357008df4c65f7bbb90026c067adbc7d802bdfb9e5ae5b23af7d
|
Provenance
The following attestation bundles were made for approval_ledger-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Mihailorama/approval-ledger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
approval_ledger-0.1.0-py3-none-any.whl -
Subject digest:
b20a8cfe6826e504ee4d8470dbb8773c319463b1684d159c309ca653b6933b89 - Sigstore transparency entry: 2531609271
- Sigstore integration time:
-
Permalink:
Mihailorama/approval-ledger@e03ea18c45f2a8e052f7e8f4104c97f1decf579d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Mihailorama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e03ea18c45f2a8e052f7e8f4104c97f1decf579d -
Trigger Event:
release
-
Statement type: