Official Python SDK for the ClarityLift public API.
Project description
claritylift
Official Python SDK for the ClarityLift public API.
Install
pip install claritylift
Quickstart
import os
from claritylift import ClarityLiftClient
with ClarityLiftClient(token=os.environ["CLARITYLIFT_API_TOKEN"]) as client:
teams = client.list_teams()
for team in teams:
if team.get("kind") == "scored":
print(team["name"], team["score"], team.get("deviationLabel"))
trends = client.trending_topics(window="30d")
topic = client.query_topics(q="benefits plan", window="30d")
if topic.get("belowFloor"):
print("Insufficient volume for this query.")
else:
print(topic.get("synthesis"))
Scopes
Create tokens at /dashboard/settings/api-tokens. Minimum scope per call:
| Method | Scope |
|---|---|
list_teams / list_team_signals / team_scores_timeseries |
read:teams / read:signals / read:scores |
trending_topics / query_topics |
read:topics |
create_intervention |
write:interventions |
create_goal / update_goal / archive_goal |
write:goals |
create_webhook / list_webhooks / delete_webhook |
write:webhooks |
Idempotency
Every write accepts an optional idempotency_key:
client.create_intervention(
signal_id=signal_id,
notes="1:1 scheduled",
confidence="medium",
idempotency_key="action-2026-04-22-abc",
)
Replays within 24 hours return the original response.
Rate limits
Per-token default: 600 requests/hour. On 429 the client waits for the
Retry-After seconds (capped at 60s) and retries once. Subsequent
429s raise ApiError — let the caller back off.
Error handling
from claritylift import ApiError
try:
client.create_goal(name="Ship Q2 rollout")
except ApiError as err:
print(err.status, err.code, err.message)
Spec
The OpenAPI definition lives at
/api/public/v1/openapi.json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claritylift-0.1.0.tar.gz.
File metadata
- Download URL: claritylift-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48299f27e233c72dae6220faa9d1aa6f8a84947463bee57ac3770524e3afdea3
|
|
| MD5 |
22c7fa064e77db29d5dfdf11b9bf8251
|
|
| BLAKE2b-256 |
02468cab45b259dc3f3603079dd4e51dae4845c53e1265c9e673f802332e7d07
|
File details
Details for the file claritylift-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claritylift-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2aebc632b3c8d60d7dccc0b5628107782743c8ffb1b0c2fc208dbfb26a03fec
|
|
| MD5 |
b6f453dc85c6a10cd8cafb9e8475a7db
|
|
| BLAKE2b-256 |
47f99e5e2551a80350817090ab5223cdbcd6da9aaa8f9305ba2d0df32c609162
|