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).

Metadata

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

Built distribution (wheel)

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

Total release size: 145.6 kB

Release files / cue_notify_client-0.1.0.tar.gz

Download URL cue_notify_client-0.1.0.tar.gz
Size 139.6 kB
Tags Source
SHA-256 checksum
How to use checksums
59f5b4058716602dc906be2f8fd090ef67beb15807e5767e8411f709cd49c089
BLAKE2b-256 checksum
How to use checksums
aefd17536cc689f2db3cabce1b7b59dbd555a521fc0508acec6f965fd0f9241c
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.1.0-py3-none-any.whl

Download URL cue_notify_client-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdd33a48bab26b6cabe96678809395bc29e1917e2b3f89ba98d5a57fe9dd4f30
BLAKE2b-256 checksum
How to use checksums
758d5dfcbca488fb5e9197be5de8039ac3a62524fe20ec973d895fbed50ecf3b
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

0.2.0

2 release files

This release

0.1.0 This release

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