Kodexa Python SDK
raw JSON → 7.4.421830084132 verified Sat May 09 auth: no python
Python SDK for the Kodexa Platform, enabling AI-powered document processing, content extraction, and workflow automation. Current version 7.4.421830084132, with rapid, automated releases. Requires Python >=3.11,<3.14.
pip install kodexa Common errors
error ModuleNotFoundError: No module named 'kodexa.client' ↓
cause Incorrect import path for KodexaClient; users often try `from kodexa.client import KodexaClient` based on older patterns.
fix
Use
from kodexa import KodexaClient error kodexa.exceptions.KodexaApiError: 401 Unauthorized ↓
cause Missing or invalid API key. The SDK expects a valid Kodexa API key set as `KODEXA_API_KEY` environment variable or passed as `api_key` parameter.
fix
Set environment variable
KODEXA_API_KEY or pass api_key='your-key' to KodexaClient() Warnings
breaking The SDK versioning uses a four-part semver with timestamp-based patch; major/minor bumps may include breaking changes without notice. Always pin your dependency and test thoroughly before upgrading. ↓
fix Pin to exact version: kodexa==7.4.421830084132
deprecated The `KodexaPlatform` class (imported from `kodexa.platform`) is deprecated in favor of `KodexaClient`. Update all code using the old client. ↓
fix Replace `from kodexa.platform import KodexaPlatform` with `from kodexa import KodexaClient` and adjust method calls accordingly.
gotcha The SDK internally uses `httpx` with a default timeout of 30 seconds. Long-running document processing may timeout. Adjust client timeout via `KodexaClient(timeout=120)` if needed. ↓
fix Pass `timeout` parameter during client instantiation: `KodexaClient(..., timeout=120)`
Imports
- KodexaClient wrong
from kodexa.client import KodexaClientcorrectfrom kodexa import KodexaClient - Document
from kodexa import Document
Quickstart
from kodexa import KodexaClient
import os
client = KodexaClient(api_key=os.environ.get('KODEXA_API_KEY', ''))
print(client.get_me())