Public Python SDK and CLI for the ctxd platform.
Project description
ctxd
Public Python SDK and CLI for the ctxd platform.
Install:
pip install ctxd
The SDK exposes sync and async clients:
ClientAsyncClient
Authentication:
- Preferred for headless and scripts: create a user-bound API key through the authenticated application backend
- Provide it with
Client(api_key=...)orCTXD_API_KEY - The SDK sends that key as the bearer token directly to the MCP server
ctxd login --api-key ...validates and stores an API key in the OS credential store for future CLI and SDK usagectxd loginwithout--api-keyvalidates and storesCTXD_API_KEY, validates an existing secure-store key, or prompts for an API key when neither is available- If the OS credential store is unavailable, use
CTXD_API_KEYfor CI/headless usage or explicitly setCTXD_CREDENTIAL_STORE=encrypted-fileto store the API key in an encrypted local file
Base URL resolution order:
base_url=passed to the clientCTXD_BASE_URL~/.ctxd/config.jsonhttps://mcp.ctxd.dev
Example:
from ctxd import Client
client = Client(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11")
results = client.search("text:deployment application:slack")
profile = client.get_profile()
document = client.fetch_document("doc-123")
API key example:
from ctxd import Client
client = Client(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11")
results = client.search("text:deployment application:slack")
Async example:
from ctxd import AsyncClient
async with AsyncClient(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11") as client:
results = await client.search("text:deployment")
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
ctxd-0.1.9.tar.gz
(10.4 kB
view details)
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
ctxd-0.1.9-py3-none-any.whl
(12.9 kB
view details)
File details
Details for the file ctxd-0.1.9.tar.gz.
File metadata
- Download URL: ctxd-0.1.9.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba6124dbd9424c7fa5dbc9e9c83899ee9191e89fde9e33edcd6cb850a85609d5
|
|
| MD5 |
ac60f2745ec0e1053aeefa80cefd93bc
|
|
| BLAKE2b-256 |
3f856db5118442999bcdfa4a07bac53b7b473f4ee46411c600162c2d8a3e5975
|
File details
Details for the file ctxd-0.1.9-py3-none-any.whl.
File metadata
- Download URL: ctxd-0.1.9-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81270392be98fa95e52b5edac8ec17980b96cdd8c8cd6d30feeb616a4a317ed
|
|
| MD5 |
529189456325fef5d65a1df58c9a3437
|
|
| BLAKE2b-256 |
a3b50406dc2bd0380120ab047ca75f8f0d02b0613d48a9cb260853f27e1df6c3
|