Skip to main content

cue-notify-client

Python client for Cue, the attention layer between software, AI agents and people. Its only dependency is httpx.

pip install cue-notify-client

The package is imported as cue_client.

from cue_client import Cue

with Cue(api_key="ck_…", base_url="https://cue.example.com") as cue:
    cue.upsert_recipient(
        "user-42",
        timezone="Europe/Berlin",
        addresses=[{"channel": "email", "value": "ann@example.com"}],
    )
    cue.send_event(
        "order.shipped", "user-42", {"order_id": "1001"}, idempotency_key="order-1001-shipped"
    )

AsyncCue has the same methods for asyncio. Errors raise CueError with the problem details Cue returns (status, title, detail, errors). Rate limits and gateway errors are retried automatically for requests that are safe to repeat: reads, profile updates, and sends with an idempotency key.

Verifying webhooks

If Cue delivers to your service through its webhook connector, check every request before trusting it:

from cue_client import InvalidSignatureError, verify_webhook


def handle(request):
    try:
        verify_webhook(request.body, request.headers.get("Cue-Signature"), secret=WEBHOOK_SECRET)
    except InvalidSignatureError:
        return 401
    message = json.loads(request.body)
    ...

Verify the raw body bytes, before parsing them. Requests signed more than five minutes ago are rejected (tolerance= changes this).

Asking a person first

asked = cue.request_approval("Refund order 9?", ["lead"], body="Never arrived.")
cue.get_approval(asked["id"])["status"]  # pending, approved, rejected or expired

CrewAI Flows: cue_client.crewai.CueFeedbackProvider. Dapr Agents: cue_client.dapr.approval_request and approval_response. See approval requests.

Metadata

Release files for cue-notify-client 0.3.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 cue-notify-client 0.3.0
File Size Uploaded
cue_notify_client-0.3.0.tar.gz 150.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cue-notify-client 0.3.0
File Interpreter ABI Platform
cue_notify_client-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 166.1 kB

Release files / cue_notify_client-0.3.0.tar.gz

Download URL cue_notify_client-0.3.0.tar.gz
Size 150.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b74faf2c8feb36a82095436c51bf57066402659ff7ec2d8a476191c22d7e7450
BLAKE2b-256 checksum
How to use checksums
f44a4d9575f9dced2f856532d7beb59857dd4e223d9336c6b861409e028c896c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cue_notify_client-0.3.0-py3-none-any.whl

Download URL cue_notify_client-0.3.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2c6792e0a7dcc535b983ce5e8ea8880461b896e73b7d2f9bc73ac266fe290b3
BLAKE2b-256 checksum
How to use checksums
ac75d47bfa2089d4939579c660a79ac94827ab39ffa74bfaee5ea30924243877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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