Skip to main content

ziffer — Python SDK (ACP-197)

Client for the Ziffer decision API plus the customer-side receipt verifier.

The verifier wraps the ACP reference implementation — it calls the reference's own functions (canon, h, sig_ok, Timestamp.parse, Bundle.suite_ok, the WE-4/L-17 nonce rules) and never reimplements them. Refusal names are the reference's clause ids, identically. The committed source here is the wrapper only; build.sh copies the needed reference/src/*.py modules from an engine checkout at the pin into src/ziffer/_engine/ (gitignored) at build/test time. This is build-time distribution under the public freeze, not a fork: the copy is verbatim, header-stamped with its source rev, and regenerated on every build.

./build.sh                                   # copies the engine at the pin
PYTHONPATH=src python3 -m unittest discover -s tests -v
python3 -m build                             # sdist + wheel (engine included)
import ziffer

client = ziffer.Client("https://api.example", api_key="zfr_...")
d = client.propose(proposal)                 # -> Decision(decision_id, status, ...)
d = client.wait(d.decision_id, timeout=30)

anchor = ziffer.TrustAnchor.from_file("receipt-identity.pub.json")  # acp-bundle pubkey output
verified = ziffer.verify(d.receipt, proposal_bytes, anchor)          # or raises RefusedError(name)

verify() runs the stateless §9.3 subset (AB-0, AB-6, CR-4, 9.3-1/CR-3, 9.3-2, 9.3-3, 9.3-5/L-14, WE-4/L-17). It does not — cannot, statelessly — check the policy basis (step 4), nonce single-use (CL-2), or steps 7–10; a Verified means the stateless half found nothing, not the full §9.3 verdict.

Release files for ziffer 0.1.0

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

Source distribution (sdist)

Source distribution for ziffer 0.1.0
File Size Uploaded
ziffer-0.1.0.tar.gz 62.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ziffer 0.1.0
File Interpreter ABI Platform
ziffer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 122.9 kB

Release files / ziffer-0.1.0.tar.gz

Download URL ziffer-0.1.0.tar.gz
Size 62.8 kB
Tags Source
SHA-256 checksum
How to use checksums
921db6c784cd295702e8a9696a498dcc4723a22eefd6ce6a2895133e782d66c9
BLAKE2b-256 checksum
How to use checksums
6fa10ebffb2f02def33d103a84b121037798fbc67fd69ec65ef7f95a5c67d51e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / ziffer-0.1.0-py3-none-any.whl

Download URL ziffer-0.1.0-py3-none-any.whl
Size 60.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6baee5b078584d4baf416c8eab38f39db0b7f7532cd7c42f8a3b02c1ef890bbb
BLAKE2b-256 checksum
How to use checksums
a7e270ef0bf7dd1d71166aa48556293b3044a8e9ae0389209fbc8ff8274bf2a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

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