Official Python SDK for the domani API - domains, email, and identity for AI agents.
Project description
domani
Official Python SDK for the domani API - domains, email, and identity for AI agents. Typed, generated from the OpenAPI spec, standard-library only (no dependencies).
Install
pip install domani
Requires Python 3.8+.
Quickstart
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file domani-0.1.1.tar.gz.
File metadata
- Download URL: domani-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a645c4f91f6fac8e27965c5d0f61cde465c07f3aaf05058833ca60a739a2e3b7
|
|
| MD5 |
45b2510d7549f82c86bd8acac1b43c7f
|
|
| BLAKE2b-256 |
45505ecdb8e905427453d75f7a3b58581d23901cf22a83756598ddc7a21344ff
|
File details
Details for the file domani-0.1.1-py3-none-any.whl.
File metadata
- Download URL: domani-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a6bb0e83cb47170a09275f1b6325934c9cf95dbb4d77bbe47139d8553af4a76
|
|
| MD5 |
028f313110152d90d40cd6fc78995017
|
|
| BLAKE2b-256 |
9ebbc0e68aa70129c376163cc64537ec3f4c6c7363a95e55882c860366df1d0f
|