Metadata-Version: 2.4
Name: domani
Version: 0.1.0
Summary: Official Python SDK for the domani API - domains, email, and identity for AI agents.
Project-URL: Homepage, https://domani.run
Project-URL: Repository, https://github.com/gwendall/domani
Author: domani
License: MIT
Keywords: agents,api,domains,domani,email,mcp,sdk
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# domani

Official Python SDK for the [domani](https://domani.run) API - domains, email, and identity for AI agents. Typed, generated from the OpenAPI spec, standard-library only (no dependencies).

## Install

```bash
pip install domani
```

Requires Python 3.8+.

## Quickstart

```python
from domani import Domani, DomaniError

domani = Domani(api_key="domani_sk_...")

# Search availability + pricing
results = domani.search(query={"q": "myagent.com"})

# Give an agent an inbox
domani.create_mailbox_by_address(body={"address": "hi@myagent.com"})

# Send mail
domani.send_email_by_address(
    "hi@myagent.com",
    body={"to": "user@example.com", "subject": "Hello", "text": "Sent from my domani mailbox."},
)

# Errors carry the API's structured code + hint
try:
    domani.send_email_by_address("hi@myagent.com", body={"to": "bounced@example.com", "text": "..."})
except DomaniError as e:
    print(e.status, e.code, e.hint)  # e.g. 400 RECIPIENTS_SUPPRESSED
```

## API

`Domani(api_key, base_url=..., timeout=...)` exposes one method per API operation (named after its operationId in snake_case). Path parameters are positional; request bodies (`body=`) and query objects (`query=`) are keyword arguments. Every method returns the parsed JSON response and raises `DomaniError` (`status`, `code`, `hint`, `documentation_url`) on non-2xx.

Full endpoint reference: <https://domani.run/docs> · OpenAPI spec: <https://domani.run/.well-known/openapi.json>

## Generated

`domani/__init__.py` is generated from the domani OpenAPI spec - do not edit it by hand. It is regenerated whenever the API surface changes.

## License

MIT
