Official Python SDK for the WorkWeek platform — query datasets, run agents, chat, and embed WorkWeek capabilities into your apps.
Project description
WorkWeek Python SDK
Official Python SDK for the WorkWeek platform.
Embed WorkWeek's data, agents, and chat capabilities into your own Python apps with
a thin, dependency-light HTTP client. Single runtime dependency: httpx.
Install
From git (until published to PyPI):
pip install "workweek @ git+https://github.com/rchow93/workweek-sdk-python.git@v0.2.2"
For local development:
git clone https://github.com/rchow93/workweek-sdk-python.git
cd workweek-sdk-python
pip install -e .
Quickstart
from workweek import WorkWeekClient
client = WorkWeekClient(
base_url="https://gw.askvai.com",
api_key="wk_rpt_...", # Get from Settings → API Keys in the WorkWeek portal
)
# Query an Iceberg dataset
result = client.data.query(
dataset="sf_food_trucks_permits",
sql="SELECT COUNT(*) AS n FROM tbl WHERE status = 'APPROVED'",
)
print(result["rows"]) # → [{"n": 163}]
# Stream a chat message (v0.2.0+)
for event in client.chat.stream("How many food trucks are active in SF?"):
if event.type == "token":
print(event.content, end="", flush=True)
Authentication
All requests use API key authentication via the X-API-Key header. Create a key
in the WorkWeek portal under Settings → API Keys. Pass it to WorkWeekClient:
client = WorkWeekClient(base_url="https://gw.askvai.com", api_key="wk_rpt_...")
The org and user context are derived from the API key — never pass org_id from
the client.
Modules
| Module | Purpose |
|---|---|
client.data |
Query Iceberg datasets via SQL, list available datasets, inspect schemas |
client.chat |
Conversational AI with tool-calling and streaming responses |
client.apps |
Tenant app config, page data, dashboard frontend management |
client.agents |
Saved agent CRUD |
client.teams |
Team listing |
client.knowledge |
Knowledge collection search |
client.analysis |
BACI and statistical analysis |
client.execution |
Submit and track agent executions |
Error Handling
from workweek import WorkWeekAPIError
try:
result = client.data.query(dataset="missing", sql="SELECT 1")
except WorkWeekAPIError as e:
print(f"HTTP {e.status_code}: {e.message}")
Requirements
- Python 3.10+
httpx>=0.27.0
License
Apache License 2.0 — see LICENSE.
Status
Alpha. API may change before 1.0. Pin to a specific version in production:
pip install "workweek @ git+https://github.com/rchow93/workweek-sdk-python.git@v0.2.2"
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 workweek-0.4.2.tar.gz.
File metadata
- Download URL: workweek-0.4.2.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f37b45ae5b90cb88868c92e9335c6cab1a76f8ba1d9f2774faa1d4e8397cc386
|
|
| MD5 |
9aa939910e00196965fc5c7c0fb43c92
|
|
| BLAKE2b-256 |
959dba5bd989a68ab0e4495e5ff8ab8066388d26690de6b025ae3795804e0e5d
|
File details
Details for the file workweek-0.4.2-py3-none-any.whl.
File metadata
- Download URL: workweek-0.4.2-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80453fffe5424714764f7b187706087c19210a6653c541be83be5d6267cf1156
|
|
| MD5 |
bf847cf6b65a1fb2e2b71b6f4fcdbc52
|
|
| BLAKE2b-256 |
fee5957ddab37c83952c45a727b64ffa6df983605e334eef1dd95125cb52e103
|