Skip to main content

aztea-sdk — AgentWeb Python client

A small, dependency-free Python client for the AgentWeb API. Stdlib only (urllib, hmac) — nothing to install transitively. Use it on your backend; the API key is a server secret and must never reach a browser.

pip install aztea-sdk   # or: uv add aztea-sdk

Use it

from agentweb_sdk import AgentWeb

aw = AgentWeb(api_key="sk_live_...")  # or base_url=... for a private deployment

# Render only integrations that work in this customer surface.
integrations = aw.integrations.list(host_context="web")

# 1. Mint a single-use sign-in link and send it to your user.
link = aw.connections.create(
    end_user_id="user_42",                     # your own id for the person
    integration_id="amazon",
    return_url="https://app.example.com/connected",
)
print(link["connect_url"])

# 2. After the connection.created webhook fires, act as that user.
result = aw.execute(
    end_user_id="user_42",
    integration_id="amazon",
    operation="orders.list",
    arguments={"limit": 5},
    idempotency_key="orders-list-user42-0001",  # reuse on retry for writes
)
print(result["data"])

# List / revoke
aw.connections.list("user_42")
aw.connections.revoke("user_42", "amazon")

Calendar, Contacts, Messages, Notes, and Reminders are returned as device capabilities. They do not have hosted connect URLs. Callers should check compatible_with_host and connect_url_supported before rendering a connect control.

Every method returns the wire payload verbatim (snake_case, exactly what curl shows). Failures raise AgentWebError carrying the service's own code and kind — match on code, never on the message:

from agentweb_sdk import AgentWebError

try:
    aw.execute(end_user_id="user_42", integration_id="amazon",
               operation="orders.list", arguments={})
except AgentWebError as err:
    if err.code == "connection_needs_reauth":
        ...  # send the user a fresh connect link
    print(err.code, err.kind, err.status, err.retryable)

Verify webhooks

Pass the raw request body bytes (the signature is over the exact bytes sent), the X-AgentWeb-Signature header, and your webhook secret. Constant-time.

from agentweb_sdk import verify_webhook

# FastAPI
@app.post("/webhooks/agentweb")
async def hook(request: Request):
    raw = await request.body()
    sig = request.headers.get("X-AgentWeb-Signature", "")
    if not verify_webhook(raw, sig, WEBHOOK_SECRET):
        raise HTTPException(401)
    event = json.loads(raw)          # {"type": "connection.created", ...}

A fully generated client

This SDK is a hand-written, ergonomic surface over the common calls. If you want a client covering every endpoint, generate one from the live OpenAPI spec:

python sdk/python/scripts/dump_openapi.py > openapi.json
openapi-python-client generate --path openapi.json

Metadata

Release files for aztea-sdk 0.2.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 aztea-sdk 0.2.0
File Size Uploaded Provenance
aztea_sdk-0.2.0.tar.gz 10.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aztea-sdk 0.2.0
File Interpreter ABI Platform
aztea_sdk-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.9 kB

Release files / aztea_sdk-0.2.0.tar.gz

Download URL aztea_sdk-0.2.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4ca63e568d42992571d24083b6b417b5cdb566fd06560a4be1da5c6b6a471fd5
BLAKE2b-256 checksum
How to use checksums
e6753583c4bfdb632742b7e9ef7fe1bfd71523b245f49e3528c08efde313aaaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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 / aztea_sdk-0.2.0-py3-none-any.whl

Download URL aztea_sdk-0.2.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eca98ea3416b9adf921fe1685d33de6fd18069f7f1eb0b97438bde9558d5b5b2
BLAKE2b-256 checksum
How to use checksums
ba2bd8b5e89e18fcc3abf661f9d73849549fb9d706f2e8d33fbff63e6153beeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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 aztea-sdk 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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