RPP402 Python SDK - programmable commerce for autonomous AI agents on Robinhood Chain. Engineered for agentic frameworks.
Project description
RPP402 Python SDK
Engineered for agentic frameworks. The programmable commerce protocol for autonomous AI agents on Robinhood Chain, as an idiomatic Python package - one call per primitive, every response validated against the same @rpp402/protocol JSON Schemas the TypeScript and Rust SDKs use.
pip install rpp402
from rpp402 import create_client
client = create_client(agent_wallet="0xabc...", sign_typed_data=my_signer)
service = client.discover("market-data.example") # RPP402-001
session = client.session.create(service) # RPP402-003
session.quote(service, { # RPP402-002
"capability": "market-data.quote",
"settlement_asset": usdg,
})
session.intent({"asset": usdg}) # RPP402-004
session.settle() # RPP402-005
receipt = session.receipt() # RPP402-006
Surface
| Function | Primitive |
|---|---|
create_client(...) |
entry point |
discover(domain_or_url) |
RPP402-001 Discovery |
Session.quote(service, params) |
RPP402-002 Quote + attach leg |
Session.intent(params) |
RPP402-004 Payment Intent |
Session.settle() |
RPP402-005 Settlement (polls to terminal state) |
Session.receipt() |
RPP402-006 Receipt |
Errors: Rpp402Error (RFC 9457 problem+json) and Rpp402ValidationError (wire-format mismatch).
Cross-runtime determinism
Amounts are exact decimal strings, never floats (add_decimal_strings), and every response is validated against the vendored canonical schemas. The Python, TypeScript, and Rust SDKs run the same conformance fixtures in ../conformance, so all three agree on the wire format byte-for-byte.
Develop
python -m unittest discover -s tests
Zero runtime deps beyond jsonschema; HTTP uses the standard library. MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rpp402-0.1.0.tar.gz.
File metadata
- Download URL: rpp402-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77f11af35a4757f0c4cf9c18c315cc68fdf44c3ad242f618120f47443ee157a
|
|
| MD5 |
523eddcc50913ec132f1af0bbba5e68d
|
|
| BLAKE2b-256 |
b9120dcff49fabe8c5525848058ff67dc8b24dabe50ec99db3223015fe00ad7b
|
File details
Details for the file rpp402-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rpp402-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
940995d83f36161d35878dff077d1739889bafdaf57e8da9f558186e1877ae3b
|
|
| MD5 |
f731ecb4817e55ac6545f3bd3e515bd0
|
|
| BLAKE2b-256 |
bfec5256a1c33fe429a2a08c52257721cc7d3bd748b8551c3cdb4859ccd5f4b4
|