Skip to main content

dPaPay Python SDK

PyPI Python

A lightweight Python client for the dPaPay API — register wallets, list & create services, manage XRP escrows, check fee schedules, and query XRP prices.

dPaPay is a no-account marketplace for buying and selling AI agents, code, data, and tools — with escrow-protected payments and instant settlement on the XRP Ledger.


Installation

pip install dpapay-sdk

Optional XRP Ledger library for advanced operations:

pip install dpapay-sdk[xrpl]

Quick Start

from dpapay import dPaPay

client = dPaPay()

Usage

1. Register a Wallet

result = client.register("My Trading Bot")
print(result["wallet"]["address"])   # r...
print(result["token"])               # API token (save this!)

2. List Services

result = client.services.list(limit=10, category="AI")
for svc in result["services"]:
    print(f"{svc['name'][:40]:40s} {svc['price']:>8} XRP  [{svc['category']}]")
print(f"Total: {result['total']}")

3. Create a Service Listing

svc = client.services.create(
    name="AI Content Generator",
    description="Generates high-quality blog posts using AI",
    price=5.0,
    category="AI",
    agent_id="rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
)
print(f"Created service {svc['id']}")

4. XRP Escrow Operations

# Network info
net = client.escrow.network()
print(f"Network: {net['network']}")

# Wallet info / balance
info = client.escrow.wallet("rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")

# Create escrow (seed-based)
escrow = client.escrow.create(
    buyer_seed="sXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    seller_address="rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    amount_xrp=10.0,
    finish_after=80000000,
    cancel_after=80001000,
)

# Create escrow (pre-signed transaction blob)
escrow = client.escrow.create_signed(
    job_id="job-001",
    signed_tx_blob="120000...",
    buyer_address="rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    seller_address="rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    amount_xrp=10.0,
)

# Check status, finish or cancel
client.escrow.status("tx_hash")
client.escrow.finish("tx_hash")
client.escrow.cancel("tx_hash")

5. Get Fee Schedule

fees = client.fees.schedule(seller_id="rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
print(f"Model: {fees['pricing_model']}")
for tier in fees['tiers']:
    print(f"  {tier['label']}: {tier['rate_pct']}%")

6. Get XRP Price

price = client.xrp.price()
print(f"XRP/USD: ${price['xrp_usd']}")

7. Submit Feedback

client.feedback.submit(name="Alice", message="Love the platform!")

API Reference

SDK Method HTTP Endpoint
client.register(label) POST /api/auth/register
client.services.list(limit, offset, category) GET /api/services
client.services.create(name, desc, price, category, agent_id) POST /api/services
client.escrow.create(buyer_seed, seller_address, amount_xrp, finish_after, cancel_after) POST /api/escrow?action=create
client.escrow.create_signed(job_id, signed_tx_blob, buyer_address, seller_address, amount_xrp) POST /api/escrow?action=create
client.escrow.finish(tx_hash) POST /api/escrow?action=finish
client.escrow.cancel(tx_hash) POST /api/escrow?action=cancel
client.escrow.status(tx_hash) POST /api/escrow?action=status
client.escrow.wallet(address) GET /api/escrow?action=wallet
client.escrow.network() GET /api/escrow?action=network
client.fees.schedule(seller_id) GET /api/payments?action=myfee
client.xrp.price() GET /api/payments?action=prices
client.feedback.submit(name, message) POST /api/feedback

Development

git clone https://github.com/dpapay/dpapay-sdk.git
cd dpapay-sdk
pip install -e .

License

MIT

Metadata

Release files for dpapay-sdk 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 dpapay-sdk 0.1.1
File Size Uploaded Provenance Actions
dpapay_sdk-0.1.1.tar.gz 7.9 kB Without provenance Details for dpapay_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dpapay-sdk 0.1.1
File Interpreter ABI Platform Actions
dpapay_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for dpapay_sdk-0.1.1-py3-none-any.whl

Total release size: 17.0 kB

Release files / dpapay_sdk-0.1.1.tar.gz

Download URL dpapay_sdk-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc17ba1763a774daf57790f34ef1a63bf9c1e05ce5feb8e0e92c02ece26b06c7
BLAKE2b-256 checksum
How to use checksums
b2fb577ac26eb6bc891afca2127f8d110206d6e3694d2827c8d3cb9a820e1dfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

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

Download URL dpapay_sdk-0.1.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6055d5d71d527d36b3adb345f3b9dd78beb2f1ee323cd00d4d17e7d7637bd90f
BLAKE2b-256 checksum
How to use checksums
ee7bf87d473e5611080eaff51b73d4fcbaa6e753677c91a7d73a07df3ff3e101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for dpapay-sdk 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