Skip to main content

inherence-verifier (Python)

PyO3 bindings over the Rust verifier. Published on PyPI as inherence-verifier.

Why bindings and not pure Python?

The verification protocol requires Groth16 over BN254 — the same elliptic-curve pairing arithmetic that the issuer's proving side runs. We use the audited arkworks crates via Rust and expose them through PyO3, rather than relying on a pure-Python pairing implementation. The bindings are abi3-py39 compatible (one wheel per OS×arch covers every Python 3.9+).

Install

pip install inherence-verifier

(After publishing — see Build from source below for development.)

Build from source

cargo install maturin
maturin develop --release         # local dev, installs into the active venv
maturin build --release --strip   # build a wheel for distribution

The local Rust verifier crate is a path dep (../inherence-verifier-rs). For published builds, point it at a tagged version of inherence-verifier on crates.io.

API

from inherence_verifier import VerifyConfig, verify_receipt
import json

cfg = VerifyConfig()
cfg.pin_authority_jwk(json.dumps(authority_jwk))   # dict or JSON string
cfg.pin_vk_b64(vk_hash_hex, vk_b64)                # OR pin_vk(hash, bytes)

out = verify_receipt(receipt_jwt, cfg)
if out["verdict"] == "VALID":
    pass
else:
    code = out["failure_code"]   # SPEC §8 controlled vocabulary
    detail = out["detail"]

verify_receipt never raises for verification failures — outcomes are values. It raises ValueError only for malformed input (e.g. an authority JWK that isn't valid JSON).

Conformance

The same 22 vectors from inherence-python/spec/receipts/v1/FIXTURES.json. Replay them with:

pytest tests/test_vectors.py

Metadata

Release files for inherence-verifier 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 inherence-verifier 0.1.0
File Size Uploaded Provenance Actions
inherence_verifier-0.1.0.tar.gz 36.4 kB Without provenance Details for inherence_verifier-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inherence-verifier 0.1.0
File Interpreter ABI Platform Actions
inherence_verifier-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for inherence_verifier-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 483.7 kB

Release files / inherence_verifier-0.1.0.tar.gz

Download URL inherence_verifier-0.1.0.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3deb2a95cf75a57107fc36759df37abc571811621de3f4fd3a01255c59f862bd
BLAKE2b-256 checksum
How to use checksums
433645a28a4c9417916737bc8b043e1ef91cde72a1b77415c6c333865ada3c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / inherence_verifier-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL inherence_verifier-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 447.3 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a2aa14a950e5104c9f46c69e0ebfba4943b36c509543de05223fdf74e504d95
BLAKE2b-256 checksum
How to use checksums
43d8a6b623b1657ceae87192e46cb8c7ba6e71553a654df565c4f80541f9cfbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Security for inherence-verifier 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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