Skip to main content

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

Metadata

Release files for whodb-sdk 0.131.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 whodb-sdk 0.131.0
File Size Uploaded
whodb_sdk-0.131.0.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whodb-sdk 0.131.0
File Interpreter ABI Platform
whodb_sdk-0.131.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.8 kB

Release files / whodb_sdk-0.131.0.tar.gz

Download URL whodb_sdk-0.131.0.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
62f46aabb5951600d1f70006eeef5eddbe4cc687491532122f97f8da8f0c4b63
BLAKE2b-256 checksum
How to use checksums
fd9c6633a85fcd020f7db1aa998834954a02a4480381aa795948014da5c64e53
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 28, 2026.

Transparency log

Release files / whodb_sdk-0.131.0-py3-none-any.whl

Download URL whodb_sdk-0.131.0-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40a950a7c3df21bf7b8a51402ab02306e245c58fb6eae2a0fa4753fc919bb416
BLAKE2b-256 checksum
How to use checksums
ca18a232711d65491e513f9d10a9e58558085a0d1cda327da3901922226baccd
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 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

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