Skip to main content

paxiom-receipts (Python Reference SDK — v0.1.3)

Zero-dependency Python 3.10+ reference implementation of paxiom.receipt.v0 — cryptographic proof-of-delivery receipts, pre-payment x402 seller readiness checks, live Base USDC settlement verification, and FastAPI / Starlette ASGI middleware.

  • Zero required dependencies: Ships a pure-stdlib RFC 8032 Ed25519 implementation (automatically accelerating via OpenSSL cryptography when installed in the environment).
  • 100% byte-compatible with @paxiom/receipts (Node.js): Shares identical PKCS#8 PEM keys, RFC 8785 JCS canonicalization, base64url X-Paxiom-Receipt headers, and all 15 deterministic trust states.
  • Inline PEP 561 types (py.typed): Full type hints for mypy, pyright, and IDE autocomplete.

Install

# From PyPI:
pip install paxiom-receipts

# Optional OpenSSL Ed25519 acceleration:
pip install "paxiom-receipts[fast]"

# Or install directly from the signed GitHub Release wheel (zero dependencies):
pip install https://github.com/k-luecke/paxiom-static/releases/download/v0.1.3/paxiom_receipts-0.1.3-py3-none-any.whl

Seller Quickstart (FastAPI / Starlette / Litestar ASGI)

import os
from fastapi import FastAPI
from paxiom_receipts import PaxiomReceiptMiddleware

app = FastAPI()

if os.environ.get("PAXIOM_PRIVATE_KEY_PEM"):
    app.add_middleware(
        PaxiomReceiptMiddleware,
        private_key=os.environ["PAXIOM_PRIVATE_KEY_PEM"],
        issuer={"name": "acme-python-api", "uri": "https://api.acme.dev", "keyId": "seller-01"},
        service_name="Inference API",
    )

@app.post("/v1/infer")
async def infer():
    return {"answer": "42"}  # Automatically emits signed X-Paxiom-Receipt header!

Buyer Quickstart (LangGraph / CrewAI / httpx / requests)

import os
from paxiom_receipts import (
    preflight_x402,
    verify_response_receipt,
    verify_receipt_live,
)

# 1. Pre-payment seller safety scan ($0.01 USDC via x402 or PAXIOM_API_KEY)
scan = preflight_x402(
    "https://seller.example/v1/infer",
    max_budget_atomic="50000",
    api_key=os.environ.get("PAXIOM_API_KEY"),
)

# 2. Free offline verification on any httpx / requests / dict response
check = verify_response_receipt(paid_response, output=paid_response.json())

# 3. Live Base USDC settlement + Paxiom root counter-attestation ($0.002 USDC)
if check["trustState"] == "settlement_claimed_not_checked":
    live = verify_receipt_live(
        check["receipt"],
        output=paid_response.json(),
        expected_pay_to="0xSellerAddress...",
        api_key=os.environ.get("PAXIOM_API_KEY"),
    )

Metadata

Release files for paxiom-receipts 0.1.3

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

Source distribution (sdist)

Source distribution for paxiom-receipts 0.1.3
File Size Uploaded Provenance Actions
paxiom_receipts-0.1.3.tar.gz 25.2 kB Without provenance Details for paxiom_receipts-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for paxiom-receipts 0.1.3
File Interpreter ABI Platform Actions
paxiom_receipts-0.1.3-py3-none-any.whl Python 3 none any Details for paxiom_receipts-0.1.3-py3-none-any.whl

Total release size: 48.5 kB

Release files / paxiom_receipts-0.1.3.tar.gz

Download URL paxiom_receipts-0.1.3.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a3dc8af712d08146bb6628cb3538f68255953d0470416d5f96f7f0cbc8d63e6
BLAKE2b-256 checksum
How to use checksums
6814fb57baf1da4ef1f12a03245ff602eb6a9ca2c64f72a3b96a58d335a87539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / paxiom_receipts-0.1.3-py3-none-any.whl

Download URL paxiom_receipts-0.1.3-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ecafa9fdbb9d7707aa86a1d161e25515c42fb2fd198f7fb60bc185b1a2cc24c
BLAKE2b-256 checksum
How to use checksums
1a3abb28319300210f43ebb7299f3d456b7403986b53c172c772b824a76c471c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for paxiom-receipts 0.1.3

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