Metadata-Version: 2.4
Name: aex-sdk
Version: 1.3.0b4
Summary: Python SDK for AEX — the Agent Exchange Protocol.
Author-email: Icaro Holding <oss@spize.io>
License: Apache-2.0
Project-URL: Homepage, https://spize.io
Project-URL: Repository, https://github.com/icaroholding/aex
Project-URL: Documentation, https://github.com/icaroholding/aex/tree/master/docs
Keywords: aex,agent,protocol,identity,transfer,p2p
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx[http2]>=0.27
Requires-Dist: cryptography>=42
Requires-Dist: dnspython>=2.6
Requires-Dist: mnemonic>=0.21
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: ruff>=0.3; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"

# spize (Python SDK)

Python client for the [Agent Exchange Protocol (AEX)](https://github.com/icaroholding/aex).

## Install

```sh
pip install spize
```

## Quick start

```python
from spize import Identity, SpizeClient

# One-time: create + register an identity.
identity = Identity.generate(org="acme", name="alice")
identity.save("alice.key")

client = SpizeClient(base_url="http://localhost:8080", identity=identity)
client.register()

# Send.
transfer = client.send(
    recipient="spize:acme/bob:aabbcc",
    file="invoice.pdf",
    declared_mime="application/pdf",
)
print(transfer.state)  # 'ready_for_pickup' or 'rejected'

# Receive (as Bob).
bob = Identity.load("bob.key")
bob_client = SpizeClient(base_url="http://localhost:8080", identity=bob)
bytes_in = bob_client.download(transfer.transfer_id)
bob_client.ack(transfer.transfer_id)
```

## Components

- `Identity` — Ed25519 keypair + canonical agent_id derivation. Save/load to disk.
- `SpizeClient` — thin HTTP wrapper over the control plane. Handles signing + replay nonces.
- `wire` — canonical byte functions that mirror `spize_core::wire` exactly; change only in lockstep.
