decision-cert (Python verifier)
A pure-Python verifier for decision certificates (decision-certificate.v1.3, v1.2, v1.1 and v1), a port of the Rust crate in
rust/. Dependencies: rfc8785 and cryptography, nothing else. The reference issuer is
an optional extra, pip install 'decision-cert[issue]' (module decision_cert.issue); the verifier
never imports it.
from decision_cert import Histogram, loads, shift_score, verify
cert = loads(open("cert.json").read()) # strict JSON, as the Rust crate parses it
keys = loads(open("trusted-keys.json").read()) # key id -> base64url raw Ed25519 public key
v = verify(cert, keys) # raises Invalid, UntrustedKey, BadKey or BadSignature
v.id, v.threshold_for("north"), v.is_expired(datetime.now(UTC))
# v1.2: compare recent cases' confidences with the stored histogram;
# pass None for a case the rule abstains on whatever the threshold: unscored, or above cannot_tell_above
window = Histogram.of(v.confidence_bins(), recent_confidences)
shift_score(v.histogram_for("north"), window).p_value # small: measure again; never a finding about the bound
# v1.2: apply the certificate's calibration map (temperature or dr) to a case's raw scores
v.confidence(raw_scores) >= v.threshold_for("north") # None when the map's kind is not one this package applies
# v1.3: the options decided automatically, and the answered share and error among them (descriptive)
v.automate_options(), v.automated_for("north")
The Rust crate is the reference. This package passes the same conformance fixtures
(fixtures/); where the two disagree, this package is wrong. A certificate
describes a measured process and never promises an outcome; see the
spec.
pip install decision-cert
python -m decision_cert verify cert.json --keys trusted-keys.json # exit 0 / 1 / 2
Development, from python/ in the repository:
uv sync && uv run pytest && uv run ruff check && uv run mypy
Metadata
Release files for decision-cert 0.11.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 | Actions |
|---|---|---|---|---|
| decision_cert-0.11.0.tar.gz | 420.6 kB | With provenance | Details for decision_cert-0.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| decision_cert-0.11.0-py3-none-any.whl | Python 3 | none | any | Details for decision_cert-0.11.0-py3-none-any.whl |
Total release size: 571.1 kB
Release files / decision_cert-0.11.0.tar.gz
| Download URL | decision_cert-0.11.0.tar.gz |
|---|---|
| Size | 420.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5608e2873bfa7de7824e89bcd9bf4d5b4a35eb6574c30ef3c4b8d5cdb47cfe7a
|
|
BLAKE2b-256 checksum How to use checksums |
8bc10960843ee3c3d51774bfa83bb19c2ba75a0ad170aa4d4f258b0f4a9c4c03
|
| 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 Dec 4, 2026.
Transparency logRelease files / decision_cert-0.11.0-py3-none-any.whl
| Download URL | decision_cert-0.11.0-py3-none-any.whl |
|---|---|
| Size | 150.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fe4a7329d1f08eac80d3959dc747cb99ab3dc8c0a6f950b13bbdab297715526
|
|
BLAKE2b-256 checksum How to use checksums |
261fdfb7885b45eec829b3013e18790bd4ca0397f2b64cb2e6e1d22ec4e04399
|
| 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 Dec 4, 2026.
Transparency logSecurity for decision-cert 0.11.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
Both files in this release have been uploaded with provenance metadata.
Attestation for decision_cert-0.11.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 Dec 4, 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.