Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

domani-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

domani-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file domani-0.1.0.tar.gz.

File metadata

  • Download URL: domani-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for domani-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4709c0f5b0156ff9401a9840170f94f31d777f1f8decae7de4376ce7cfbef98e
MD5 ee7663bf39e691331c34d828a0909aae
BLAKE2b-256 aec8304ad9694ae79e9bbfa67799f09cf9eb54b3f83e94391f7374cb39aef325

See more details on using hashes here.

File details

Details for the file domani-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: domani-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for domani-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 952b7a39ca598f7f9e899ac550a9db51a6535b9c2d5afee3b0adbc2486f95b8b
MD5 d88d3c4eafc96af9c237778f98858ca6
BLAKE2b-256 8554ab9a8b43fb7d0c7b39d75a35be4a42f609dd50d3d8ee5695f2f10b007996

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page