Skip to main content
The woodwide package is the official Python client for Wood Wide. It provides typed methods, Pydantic responses, and IDE autocomplete for training and inference workflows. For your first upload → train → infer workflow, use the Python (SDK) tab in the API quickstart. This page covers installation, configuration, and SDK-specific features.

PyPI

Install, release history, and package README.

API quickstart

First workflow with an SDK tab alongside curl and JavaScript.
The SDK source repository is not public yet. Use the PyPI project page for the package README, or inspect methods in Python with help(client.api.models.prediction.train).

Install

Requires Python 3.9+.
pip install woodwide
Pin a version in production. Check PyPI for the latest release.

Configure authentication

export WOOD_WIDE_AI_API_KEY="sk_your_api_key_here"
export WOOD_WIDE_BASE_URL="https://api.woodwide.ai"
from woodwide import WoodWide

client = WoodWide()  # reads env vars; or pass api_key= / base_url=
The SDK uses WOOD_WIDE_AI_API_KEY and WOOD_WIDE_BASE_URL. The HTTP API and CLI use WOODWIDE_API_KEY and WOODWIDE_BASE_URL — same keys, different env names. Set WOOD_WIDE_BASE_URL explicitly; do not rely on the client default.
Verify authentication:
me = client.auth.retrieve_me()
print(me)
Never commit API keys to source control.

Async client

Use AsyncWoodWide with await on each call:
import asyncio
from pathlib import Path
from woodwide import AsyncWoodWide

async def main() -> None:
    async with AsyncWoodWide() as client:
        dataset = await client.api.datasets.upload(
            file=Path("train.csv"),
            name="async_train",
        )
        print(dataset.id)

asyncio.run(main())
Optional aiohttp backend: pip install woodwide[aiohttp]

Errors and retries

The SDK raises typed exceptions (AuthenticationError, RateLimitError, etc.) and retries connection errors and many 5xx responses by default.
import woodwide
from woodwide import WoodWide

client = WoodWide(max_retries=3)

try:
    client.auth.retrieve_me()
except woodwide.AuthenticationError:
    print("Check WOOD_WIDE_AI_API_KEY")
except woodwide.APIStatusError as e:
    print(e.status_code, e.response.text)
See the PyPI package README for timeouts, logging, and HTTP configuration.

Model types

Training and inference are grouped by task:
TaskTrainInfer
Predictionclient.api.models.prediction.train(...)client.api.models.prediction.infer(model_id, dataset_id=...)
Clusteringclient.api.models.clustering.train(...)client.api.models.clustering.infer(...)
Anomalyclient.api.models.anomaly.train(...)client.api.models.anomaly.infer(...)
Embeddingclient.api.models.embedding.train(...)client.api.models.embedding.infer(...)
Factorsclient.api.models.factors.train(...)client.api.models.factors.infer(...)
SearchHTTP API onlyHTTP API only
See Capabilities for task-specific examples with SDK tabs. Search and some HTTP-only options (such as anomaly per_row output) are not in the SDK yet — use the HTTP tabs on those pages.

Next steps

API quickstart

First workflow with an SDK tab alongside curl and JavaScript.

CLI

Script the same workflow from the shell.