Python SDK
Python Management SDK for the Wocha Customer API.
wocha is the Python SDK for the Wocha authentication and authorisation platform Management API. Use it for server-side user management, permissions, webhooks, and tenant configuration.
Installation
Requires Python 3.10+.
Configuration
Use tenant for Wocha Cloud — the SDK resolves https://{tenant}.api.wocha.ai/v1:
For self-hosted deployments, pass base_url instead:
Environment variables WOCHA_API_KEY and WOCHA_TENANT are used as fallbacks.
Quick start
Async client
Key resources
| Resource | Example |
|---|---|
users | client.users.create(email="alice@example.com") |
organisations | client.organisations.create(slug="eng", display_name="Engineering") |
permissions | client.permissions.check(...) |
sessions | client.sessions.revoke_all("usr_abc") |
webhooks | Verify with wocha.webhooks.verify_webhook() |
applications | client.applications.rotate_secret("app_abc") |