Skip to main content

Revvyn SDK

Python client for the Revvyn Governance API. Send a payment intent, receive an Ed25519-signed verdict (ALLOW / BLOCK / ESCALATE), verify it offline, and report the outcome back. Revvyn governs the decision; you settle on your own rail.

This SDK is licensed under the MIT License. The Revvyn service it connects to is proprietary and is not covered by this licence.

Install

pip install revvyn-sdk

Offline verdict verification needs cryptography; install it with the extra:

pip install "revvyn-sdk[verify]"

You do not need this package to verify a verdict — two widely used libraries are enough: pip install cryptography httpx. The integration guide shows the few lines of code.

Quick start

import httpx
from revvyn_sdk import RevvynClient, verify_verdict

client = RevvynClient(api_key="rvn_live_...")

# Governance-only: returns an Ed25519-signed verdict. Revvyn governs; you settle on your own rail.
signed = client.evaluate(amount=4500, currency="USD", agent_id="agt_your_agent")

jwks = httpx.get("https://api.revvyn.com/.well-known/jwks.json").json()
if verify_verdict(signed, jwks) == "ALLOW":
    ...  # execute on your own rail, then report the real outcome with client.observe(...)

evaluate() sends a reference number (Idempotency-Key) with every call and reuses it when it retries, so a retry never creates a second decision.

If Revvyn asks you to wait (a Retry-After header), the SDK waits that long before trying again, up to 30 seconds. list_rails() returns every rail Revvyn can check, with its display name and whether Revvyn suggests it.

requested_rail: the rail your agent will pay on. Revvyn checks the payment for that rail and records the decision. Revvyn never moves the money.

What it does

  • Typed responses (dataclasses)
  • Automatic retry with exponential backoff
  • Rate-limit tracking (client.last_rate_limit)
  • Error hierarchy: AuthenticationError, NotFoundError, RateLimitError, ValidationError
  • Offline verdict verification (verify_verdict) and inbound-webhook HMAC verification (verify_webhook)
  • Context-manager support (with RevvynClient(...) as client:)

Metadata

Release files for revvyn-sdk 0.4.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 revvyn-sdk 0.4.1
File Size Uploaded Provenance Actions
revvyn_sdk-0.4.1.tar.gz 16.9 kB With provenance Details for revvyn_sdk-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for revvyn-sdk 0.4.1
File Interpreter ABI Platform Actions
revvyn_sdk-0.4.1-py3-none-any.whl Python 3 none any Details for revvyn_sdk-0.4.1-py3-none-any.whl

Total release size: 34.5 kB

Release files / revvyn_sdk-0.4.1.tar.gz

Download URL revvyn_sdk-0.4.1.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e8f33f366351ffedefdc1f2cc7c4314c4c72cc785552fa1380c79eb12b994714
BLAKE2b-256 checksum
How to use checksums
8f0d54ac425b164d982100666508853382bc12a88b874a6775745b653c8fbdc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Release files / revvyn_sdk-0.4.1-py3-none-any.whl

Download URL revvyn_sdk-0.4.1-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d377243b6f6558054b584a0328879e4a059706404bd6a5ecba254fefd06bba54
BLAKE2b-256 checksum
How to use checksums
c7c32596265f5cac8962634f9a536abacf0e87c06a374cda1593ff8adf0ac5e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Security for revvyn-sdk 0.4.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.

Select from 2 files

Attestation for revvyn_sdk-0.4.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 Nov 7, 2026.

Transparency log

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.

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