Skip to main content

Modexia AgentPay — Python SDK for agent wallets & payments (USDC)

Project description

Modexia Python SDK

Lightweight Python client for interacting with the Modexia AgentPay API.

Features

  • Simple programmatic access to agent wallets and payments
  • Reliable retry/backoff for HTTP calls
  • Small surface area: ModexiaClient with transfer + retrieve_balance helpers

Installation

# install locally (editable)
pip install -e packages/SDKs/pythonSdk

Quick start

from modexia import ModexiaClient

client = ModexiaClient(api_key="mx_test_...")

# read balance
print(client.retrieve_balance())

# make a transfer (wait=True polls for on-chain confirmation)
receipt = client.transfer(recipient="0xabc...", amount=5.0, wait=True)
print(receipt)

API (short)

  • ModexiaClient(api_key: str, timeout: int = 15)
    • retrieve_balance() -> str
    • transfer(recipient: str, amount: float, idempotency_key: Optional[str] = None, wait: bool = True) -> dict
    • smart_fetch(url, ...) -> requests.Response

Errors / Exceptions

  • ModexiaAuthError — authentication problems
  • ModexiaPaymentError — payment/server errors
  • ModexiaNetworkError — network/connection failures

Testing

Run the unit tests with pytest from the repository root:

pytest -q packages/SDKs/pythonSdk

Contributing

Open a PR against the develop branch. Keep API names stable — this package uses ModexiaClient and transfer(...) as the canonical surface.

Install (PyPI)

pip install modexiaagentpay

If you prefer to try the local copy while iterating:

pip install -e packages/SDKs/pythonSdk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modexiaagentpay-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modexiaagentpay-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file modexiaagentpay-0.1.0.tar.gz.

File metadata

  • Download URL: modexiaagentpay-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for modexiaagentpay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ce705fccb1069ee2804fef7c50493a0484f8cd1376021267ba6795208ff370d
MD5 356934c005cc7bd3ce4568d13293a961
BLAKE2b-256 2b1fd8d0369ea4011ca1fbb06372991e7fa8bcd73ad40e4098580e7ed3c2a656

See more details on using hashes here.

File details

Details for the file modexiaagentpay-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for modexiaagentpay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7de0951173d1798a15fdad1c18a80b5f42322bf6f30288b2ff756325d01dd007
MD5 7b43625a6315c4f6e63589723a924440
BLAKE2b-256 f9a3fcede5f7e85fd61bdb29ef8cb37a73f9b9baf5e00e34bb464ab0162c2123

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page