whodb-sdk
Official Python SDK for the WhoDB hosted platform — your ontology, datasets, and sources as in-code function APIs.
Install
pip install whodb-sdk
Requires Python ≥ 3.10.
Quickstart
import os
from whodb import WhoDB
# Production: API key (create one in org settings → API keys).
whodb = WhoDB(api_key=os.environ["WHODB_API_KEY"])
# Local development: zero config — reuses your `whodb login` session.
# whodb = WhoDB()
users = whodb.ontology("User")
user = users.get("u_123")
active = users.list(where={"status": {"eq": "active"}}, page_size=100).all()
users.create({"email": "a@b.co"})
users.create_many(rows, idempotency_key="import-42")
users.update("u_123", {"plan": "pro"})
orders = users.follow_link("u_123", "orders").all()
# Behavior-managed workflow:
order = whodb.ontology("Order")
capabilities = order.capabilities("order_123")
order.preview_action("approve", "order_123", {"note": "Looks good"})
order.action(
"approve", "order_123", {"note": "Looks good"},
expected_version=capabilities.get("recordVersion"),
idempotency_key="approve-order-123",
)
history = order.action_executions("order_123")
# Iterate everything, page by page:
for page in users.list(page_size=500).pages():
print(len(page.rows))
# Async client:
from whodb import AsyncWhoDB
awhodb = AsyncWhoDB(api_key=os.environ["WHODB_API_KEY"])
user = await awhodb.ontology("User").get("u_123")
Authentication
Credential precedence: constructor args (api_key= / token= /
credentials=) → WHODB_API_KEY env var → the whodb CLI's stored login.
Workspace (org= / project=) is optional with an API key; pass project=
when the key has access to more than one project.
Inside a WhoDB Function, WhoDB() auto-detects the runtime and needs no
configuration at all.
Typed clients
whodb sdk generate --language python --out whodb_gen/
License
Apache-2.0
Release files for whodb-sdk 0.127.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| whodb_sdk-0.127.3.tar.gz | 28.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whodb_sdk-0.127.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.1 kB
Release files / whodb_sdk-0.127.3.tar.gz
| Download URL | whodb_sdk-0.127.3.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b9fcbbc8cc4d1449ebb6aacdc3b5ea391fbef1b77e9de1e92ce1c79bb4d7ba2
|
|
BLAKE2b-256 checksum How to use checksums |
aa1044e5b92239b19e327412a83b920ca49722637050cd521acc09209896e340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / whodb_sdk-0.127.3-py3-none-any.whl
| Download URL | whodb_sdk-0.127.3-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7d43caee9690b13d7ee12d48a44bad9e6706432f6b7d6508411880ca8c97487
|
|
BLAKE2b-256 checksum How to use checksums |
f9378e47e87e78ca6186f62714570f14863467a2f8e42d810638d1325f057e5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency log