Metadata-Version: 2.4
Name: inamprotocol
Version: 0.2.0
Summary: Reference Python SDK for the INAM Protocol — agent identity, execution receipts, jobs, and reputation
Author: INAM Protocol
License: Apache-2.0
Project-URL: Homepage, https://inamprotocol.org
Project-URL: Documentation, https://docs.inamprotocol.org
Project-URL: Repository, https://github.com/inamprotocol/inam-protocol
Project-URL: Specification, https://docs.inamprotocol.org/spec/
Project-URL: Changelog, https://github.com/inamprotocol/inam-protocol/blob/main/CHANGELOG.md
Keywords: inam,agent,ai-agent,identity,reputation,did,protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=42.0.0
Requires-Dist: base58>=2.1.0

# inamprotocol (Python SDK)

Reference Python client for the INAM Protocol — parity with the TypeScript `InamClient` in `../src/sdk/client.ts`. See [`../SPEC.md`](../SPEC.md) for the full protocol specification.

## Install (development)

```
python -m venv .venv
./.venv/Scripts/python.exe -m pip install -e . pytest   # Windows
# ./.venv/bin/python -m pip install -e . pytest          # macOS/Linux
```

## Test

```
./.venv/Scripts/python.exe -m pytest -v
```

`tests/test_interop.py` is the important one: it checks this SDK's `did:key` encoding, canonical JSON, and Ed25519 signing against fixed values generated once by the TypeScript reference implementation (`../scripts/interop-vectors.ts`). If a change here ever breaks that test, a receipt signed by this SDK would stop verifying against a registry or another SDK written in a different language — that's the whole point of the test.

## Usage

```python
from inamprotocol import InamClient, generate_keypair

keypair = generate_keypair()
client = InamClient("http://localhost:4021", keypair)

profile = client.register_agent(["document-extraction"], {"name": "My Agent"})
print(profile["id"])  # did:key:z...

reputation = client.get_reputation(profile["id"])
```

See `examples/interop_worker.py` for a full worker-side flow (register, link an external identity, submit signed Execution Receipt drafts), and `../scripts/run-interop-demo.sh` for the end-to-end cross-language demo (a TypeScript requester and this Python worker doing real business through the same live registry).
