Skip to main content

anaella

A small Python client for the Anaella /v1 API, one API for agents: typed tools (web research, SEO, images and video, documents, phone, meetings) plus the accounts you connect (mail, calendars, Drive, Slack, ads, payments, social, WordPress and Ghost sites, any MCP server). It mirrors @anaella/client: same calls, same response shapes.

pip install anaella

One runtime dependency (httpx), Python 3.9+.

from anaella import AnaellaClient

anaella = AnaellaClient()  # reads ANAELLA_API_KEY (create one under Settings → API keys)

tools = anaella.find("unread emails")                      # capabilities for a task
spec = anaella.explain("email.messages.list")              # its input schema and price
job = anaella.do("email.messages.list", {"query": "is:unread"})
done = anaella.wait_for_job(job["id"])                     # async tools return a queued job

Async code uses AsyncAnaellaClient, which has the same methods, awaited:

from anaella import AsyncAnaellaClient

async with AsyncAnaellaClient() as anaella:
    job = await anaella.do("web.search", {"query": "anaella"})

What it covers

  • Tools: find(q), explain(id), do(id, input), job(id), wait_for_job(id), balance().
  • Accounts: list_channels(), create_connect_session(), connect_with_credentials(), import_connection(), delete_channel(id), request() for raw calls to a connected account's API.
  • Social posts: create_post, update_post, list_posts, get_post, delete_post, get_analytics, get_post_analytics, plus upload_urls / upload_files for media.
  • Webhooks: create_webhook, list_webhooks, delete_webhook, get_webhook_deliveries, and verify_webhook_signature for the requests Anaella sends you.

Responses are plain dicts with the API's own keys (job["costUsd"]), typed with TypedDicts in anaella.types for editors and type checkers. Request bodies are plain dicts too, so a new API field works before the client knows about it.

Building for your own users

If your app lets its users connect their accounts, pass external_user_id on every call made for one of them. Anaella then refuses a channel that isn't theirs (403 end_user_mismatch):

link = anaella.create_connect_session(
    {"platform": "gmail", "externalUserId": "user_42", "returnUrl": "https://app.example.com/done"}
)
anaella.do("email.messages.list", {}, external_user_id="user_42")
anaella.list_channels(external_user_id="user_42")

Errors

Any non-2xx response, and any network failure, raises AnaellaApiError with status, code, message, and when present details, next (a connect or reconnect link) and schema (the JSON Schema an invalid_input input should have matched):

from anaella import AnaellaApiError

try:
    anaella.do("gsc.queries.list", {})
except AnaellaApiError as e:
    if e.code == "channel_required":
        print("Connect Search Console:", e.next)
    elif e.code == "reconnect_required":
        print("Reconnect:", e.next)
    else:
        raise

Reads retry a gateway error (502, 503, 504) on their own. A write is sent once, since it may have run.

Webhooks

from anaella import verify_webhook_signature

# raw_body: the request body exactly as received, before JSON parsing
if not verify_webhook_signature(raw_body, request.headers["X-Anaella-Signature"], secret):
    return Response(status_code=401)

Configuration

AnaellaClient(api_key=None, *, base_url=None, timeout=60.0, http_client=None). The key falls back to ANAELLA_API_KEY and the address to ANAELLA_API_URL (default https://api.anaella.com). Pass your own httpx.Client / httpx.AsyncClient for proxies, retries at the transport level, or tests. Use the client as a context manager (or call close()) to release its connections.

License

MIT

Metadata

Release files for anaella 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anaella 0.1.0
File Size Uploaded Provenance Actions
anaella-0.1.0.tar.gz 13.8 kB Without provenance Details for anaella-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anaella 0.1.0
File Interpreter ABI Platform Actions
anaella-0.1.0-py3-none-any.whl Python 3 none any Details for anaella-0.1.0-py3-none-any.whl

Total release size: 27.3 kB

Release files / anaella-0.1.0.tar.gz

Download URL anaella-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7d01f83bc66b70af915eebd5d13dba4ff2d2366969d7061ec2389960174a5e70
BLAKE2b-256 checksum
How to use checksums
6bc1faf42c7b6c2c0caf0645bb5eb0aae34d03bd1fd51c66e24a89979ecd002b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / anaella-0.1.0-py3-none-any.whl

Download URL anaella-0.1.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b272533b0a30baef9b568b3e8a4789ed7d107ba11bba5fefa948baae3c11c616
BLAKE2b-256 checksum
How to use checksums
06347be28f20c08cf175c34b1940286e2490b1dd0abc212d3ca19e2585bff588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for anaella 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page