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.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 cue-notify-client 0.2.0
File Size Uploaded
cue_notify_client-0.2.0.tar.gz 143.2 kB Details

Built distribution (wheel)

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

Total release size: 152.6 kB

Release files / cue_notify_client-0.2.0.tar.gz

Download URL cue_notify_client-0.2.0.tar.gz
Size 143.2 kB
Tags Source
SHA-256 checksum
How to use checksums
27263bb16114182cdc55edf701776506dc06adb0878fbcefc4eb44df9fafcc0f
BLAKE2b-256 checksum
How to use checksums
81e22dba6e59ad403924876e049ddb3c3787c207f3609f56891ea3494f802632
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.2.0-py3-none-any.whl

Download URL cue_notify_client-0.2.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e3f9b6eee9f06226f635f014894fe535e3f5f578547f855e3fb3ae49b4b659b
BLAKE2b-256 checksum
How to use checksums
638c40fd25b82de9be1cd2260d9e504787911bef92004136c3fdde272b422d23
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

0.3.0

2 release files

This release

0.2.0 This release

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