Metadata-Version: 2.4
Name: modexiaagentpay
Version: 0.3.0
Summary: Modexia AgentPay — Python SDK for agent wallets & payments (USDC)
Author-email: Modaniels <modaniels@modexia.software>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Modaniel/SDKs
Project-URL: Repository, https://github.com/Modaniel/SDKs
Project-URL: Documentation, https://github.com/Modaniel/SDKs/docs
Project-URL: Changelog, https://github.com/Modaniel/SDKs/releases
Keywords: modexia,agentpay,sdk,payments,usdc
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: requests-mock; extra == "dev"
Dynamic: license-file

# 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` (or `get_balance`) helpers

Installation

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

Quick start

```python
from modexia import ModexiaClient

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

# you can also override the base url, or skip network validation
# client = ModexiaClient(api_key="mx_test_...", base_url="http://custom.url", validate=False)
# It will also respect the MODEXIA_BASE_URL environment variable

# read balance
print(client.retrieve_balance())
# print(client.get_balance()) # alias

# 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, base_url: Optional[str] = None, validate: bool = True)
	- retrieve_balance() -> str
	- get_balance() -> str (alias for retrieve_balance)
	- 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:

```bash
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)

```bash
pip install modexiaagentpay
```

If you prefer to try the local copy while iterating:

```bash
pip install -e packages/SDKs/pythonSdk
```
