honornet-sdk
The Python merchant SDK for the HonorNet acceptance network — authorize AI-agent-initiated transactions in real time.
Async-first, with a synchronous wrapper. Pure Python, no native dependencies.
Install
pip install honornet-sdk
Authorize a transaction
from honornet import Client, Money, Transaction
client = Client("https://api.honornet.ai", api_key="sk_live_...")
result = client.authorize(
credential=agent_credential, # presented by the agent
transaction=Transaction(
merchant_id="merchant_123",
amount=Money("USD", 4999), # integer minor units
merchant_category_code="5732",
country="US",
),
)
if result.approved:
fulfil_order(result.authorization_code)
else:
handle_decline(result.decline_reason)
authorize returns an AuthorizeResult for every outcome — approve,
decline, or review. Call result.raise_for_decision() to turn a
non-approval into a typed exception (ScopeDeclinedError,
CredentialDeclinedError, …) instead.
Async
from honornet import AsyncClient
async with AsyncClient("https://api.honornet.ai") as client:
result = await client.authorize(credential=cred, transaction=txn)
Verify a decision
Every decision is recorded in HonorNet's append-only, cryptographically
verifiable log. Confirm one independently — record signature, Merkle inclusion
proof, signed log root, and that the signing key is a genuine published HonorNet
ledger key — with the public honornet-verify library:
from honornet import verify_decision
# Trust-anchored to the published HonorNet key-set by default.
verified = verify_decision(client, result.decision_id)
assert verified.verification.ok and verified.trust_anchored
Pass trusted_keys= to pin to a different key-set (e.g. a sandbox ledger), or
trusted_keys=None for structural-only verification. Verification adds a round
trip, so latency-sensitive paths skip it and verify out of band.
Built in
- Idempotency — every call carries an auto-generated idempotency key, so a
retried request never creates a second decision. Override it with
idempotency_key=.... - Retries — connection errors, timeouts, HTTP 429 and 5xx are retried up to three times with exponential backoff.
- Typed errors — transport failures raise
HonorNet*Error; declines map toDeclinedErrorsubclasses;DeclineReasonenumerates the full taxonomy.
Framework middleware
Drop-in middleware for FastAPI lives at honornet.middleware.fastapi — see
examples/fastapi-middleware.
Licence
Apache-2.0.
Metadata
Release files for honornet-sdk 0.2.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 |
|---|---|---|---|---|
| honornet_sdk-0.2.0.tar.gz | 18.7 kB | With provenance | Details for honornet_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| honornet_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for honornet_sdk-0.2.0-py3-none-any.whl |
Total release size: 37.2 kB
Release files / honornet_sdk-0.2.0.tar.gz
| Download URL | honornet_sdk-0.2.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bc2f0dd8b71e9831780df05ca25485c5fb330277cbd5183e6121c973519b2d5
|
|
BLAKE2b-256 checksum How to use checksums |
a7020ac55f2f5773c34bd1fdcbc29e95537de2847155b223eeb8af2e4ada28bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / honornet_sdk-0.2.0-py3-none-any.whl
| Download URL | honornet_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
229b46431fcfb014dbd0a19f0296b826eb14c91b1dd846d0ac6b9a053b41426b
|
|
BLAKE2b-256 checksum How to use checksums |
8f0c1604c61c5c52ab8e0ac1d98759b6d0624e13539921b4566d45bfa5cea78e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logSecurity for honornet-sdk 0.2.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 honornet_sdk-0.2.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 Jun 12, 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.