Skip to main content

ledgerproof-anthropic

LedgerProof adapter for the Anthropic Python SDK.

Emits side-channel cryptographic transparency receipts for AI-touched interactions, suitable as an evidence layer for EU AI Act Article 50 (transparency obligations for providers and deployers of AI systems).

This adapter works with anyone using the Anthropic SDK directly, including users of:

  • anthropic.Anthropic / anthropic.AsyncAnthropic clients
  • Claude Code (which uses the Anthropic SDK under the hood)
  • The Claude Agent SDK (tool-use receipts via agent_action/v1)

5-minute quickstart

pip install ledgerproof-anthropic
export ANTHROPIC_API_KEY=sk-ant-...
from anthropic_ledgerproof import LedgerProofAnthropic, LogEmitter

client = LedgerProofAnthropic(
    deployer_id="acme-corp-eu",
    emitter=LogEmitter(),
)

response = client.messages.create(
    model="claude-opus-4-1",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}],
)

print(response.content[0].text)
# Receipt has already been emitted to the log emitter side-channel.

The Anthropic response object is returned unchanged. The receipt is emitted to the side channel only.

Three integration patterns

  1. Client wrapper (recommended) — LedgerProofAnthropic wraps anthropic.Anthropic and intercepts messages.create(). Sync, async, streaming and non-streaming all supported.
  2. Decorator — @lpr_track(deployer_id="...") for user-defined functions that wrap Anthropic calls.
  3. Manual emission — emit_receipt(response, deployer_id, regulatory_context) for full control.

See examples/ for runnable code.

Architectural discipline (C1–C8)

This adapter is implemented under the LedgerProof protocol's load-bearing constraints:

  • C1: No claim of regulator endorsement. No claim of Article 40 presumption of conformity.
  • C4: Local verification only. The adapter does not phone home to LedgerProof servers during normal operation.
  • C6: Stream-aware signing. Streaming messages are signed using an incremental SHA-256 over text deltas.
  • C7: Side-channel emission only. The adapter cannot and does not modify the Anthropic response payload.

Scope disclaimer

LedgerProof provides an evidence layer for Article 50 transparency obligations only.

It does not cover:

  • Article 9 (risk management system)
  • Article 10 (data and data governance)
  • Article 13 (transparency and information to deployers)
  • Article 15 (accuracy, robustness, and cybersecurity)
  • Article 72 (post-market monitoring)

LedgerProof does not confer presumption of conformity under Article 40. LedgerProof is not endorsed by the European Commission, the AI Office, any national competent authority, or Anthropic, PBC.

This adapter wraps the official Anthropic Python SDK; it is not affiliated with Anthropic.

License

Apache 2.0. Copyright 2026 LedgerProof Foundation (in formation: US 501(c)(3) Delaware + Dutch Stichting EU subsidiary).

Metadata

Release files for anthropic-ledgerproof 0.1.1

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

Source distribution (sdist)

Source distribution for anthropic-ledgerproof 0.1.1
File Size Uploaded Provenance
anthropic_ledgerproof-0.1.1.tar.gz 20.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for anthropic-ledgerproof 0.1.1
File Interpreter ABI Platform
anthropic_ledgerproof-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.5 kB

Release files / anthropic_ledgerproof-0.1.1.tar.gz

Download URL anthropic_ledgerproof-0.1.1.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e9e4964fb7424f4ef6988fbebe81d6086b2939194b91e9bf95f82de43218785a
BLAKE2b-256 checksum
How to use checksums
a68b8da8025bd2f4dd2281c904f91dbb290d6d6be3e5db6aa0b9b4b1afd7d05a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / anthropic_ledgerproof-0.1.1-py3-none-any.whl

Download URL anthropic_ledgerproof-0.1.1-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4e89996d2cd101846e107ae19b0ababbfc7d79d1d345df2b6584f2c70b36ff6
BLAKE2b-256 checksum
How to use checksums
b80fb2ff46ae5d0b2715651ec315b24f1aa97599a025d8f31669d278369810f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for anthropic-ledgerproof 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.

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