ClaimProofKit — Python implementation
Apache-2.0 licensed · Evidence-bound claim verification · Zero runtime dependencies
ClaimProofKit implements Claim Proof Specification v1: it checks whether the material claims in a generated document are supported by supplied evidence, and blocks publication when claims are unsupported or when no material claims can be extracted. It uses only the Python standard library at runtime.
The Swift ClaimProofKit is the reference implementation. This Python implementation is held in locked parity with it through the golden vectors under `conformance/vectors`. Fingerprints, verifier verdicts, and canonical payload bytes are checked across both implementations.
License
ClaimProofKit is licensed under the Apache License, Version 2.0. You may use, modify, distribute, and include it in commercial products subject to the license terms. No separate production-use license is required. See NOTICE and Licensing and commercial use.
The Apache-2.0 license applies to the code in this repository; it does not grant rights to project trademarks or imply endorsement.
Install and test
```sh pip install -e ".[dev]" pytest python conformance/run_conformance.py ```
Verify a document
A document with no extractable material claims is not considered safe to publish. A successful verification gate requires at least one claim, and every extracted claim must have an approved verdict. This avoids treating an empty or unrecognized document as verified by vacuous success.
```python from claimproofkit import ClaimVerifier, EvidencePassage, SourceType
evidence = [ EvidencePassage( id="order-1", source="Scheduling Order", source_type=SourceType.COURT_RECORD, text="The court denied the request for an extension.", ) ] report = ClaimVerifier().verify_document( "The court denied the request for an extension.", evidence ) assert report.is_safe_to_publish ```
The CLI accepts one input JSON file or a folder of input JSON files. Each JSON file must contain the usual `document` string and `evidence` array. Folder mode checks top-level `*.json` files in filename order, prints a report for every file, and returns a failing exit code if any document is blocked or unreadable. It does not recursively scan subfolders.
```sh
Verify one document
claimproofkit verify input.json
Verify every JSON document directly inside ./documents
claimproofkit verify ./documents
Optional: write one provenance trace per document into ./traces
claimproofkit verify ./documents --provenance ./traces
Benchmark a corpus
claimproofkit benchmark corpus.json [--json] ```
The CLI exposes the same core verification semantics and exit codes as the Swift binary (0 published, 2 blocked, 3 benchmark gate failed, 64 usage, 65 unreadable input, 73 trace write failed). In folder mode, exit code 0 means every discovered JSON document passed; 2 means at least one document was blocked; 65 means at least one document could not be read or parsed; 73 means a requested provenance trace could not be written.
Working with DProvenanceKit
`claimproofkit.provenance` exports a verification run as a DProvenanceKit-compatible trace, identical to the Swift bridge's output: stable `cpk_*` event vocabulary, canonical payload bytes (Trace Specification v1 §2), lineage edges, and the §5 run fingerprint.
```python from claimproofkit import ProvenanceExporter, VerificationPolicy
trace = ProvenanceExporter().trace(report, VerificationPolicy()) trace.events_json() # decodes as [TraceEvent] in Swift DProvenanceKit trace.manifest_json() # full manifest with fingerprints and edges ```
The conformance runner proves the fingerprint against the real Python dprovenancekit package when it is importable: recording the trace through its SQLite store reproduces the bridge's run fingerprint byte-for-byte. The same trace fingerprints identically in Swift ClaimProofKit, Swift DProvenanceKit, and Python dprovenancekit.
Changing locked behavior
Specification changes originate in the Swift repo (`Docs/PROOF_SPEC_V1.md`): bump the spec/verifier version there, regenerate vectors, then re-sync here with `conformance/sync-vectors.sh` and update this implementation to conform.
Metadata
Release files for claimproofkit 0.1.1
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 |
|---|---|---|---|---|
| claimproofkit-0.1.1.tar.gz | 35.9 kB | With provenance | Details for claimproofkit-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claimproofkit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for claimproofkit-0.1.1-py3-none-any.whl |
Total release size: 70.2 kB
Release files / claimproofkit-0.1.1.tar.gz
| Download URL | claimproofkit-0.1.1.tar.gz |
|---|---|
| Size | 35.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1f5519b551092e630e13c16fb43a68bdaa538141aab1916916e5457cecbf58d
|
|
BLAKE2b-256 checksum How to use checksums |
327e5b03b002510c06a7a5d5d51272139504ef3a733d1e8c10656bc6fc689674
|
| 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 14, 2026.
Transparency logRelease files / claimproofkit-0.1.1-py3-none-any.whl
| Download URL | claimproofkit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 34.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26fc536e0964946a898d69fe1fb512113fc2bd73424d2acad03daf8d35b144aa
|
|
BLAKE2b-256 checksum How to use checksums |
b402622c3e47339bbbcee00b865d278bc813fdb04237e37c5288e63b743dee15
|
| 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 14, 2026.
Transparency logSecurity for claimproofkit 0.1.1
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 claimproofkit-0.1.1.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 14, 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.