Iii iii-python-sdk
install
source · Clone the upstream repo
git clone https://github.com/iii-hq/iii
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/iii-hq/iii "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/iii-python-sdk" ~/.claude/skills/iii-hq-iii-iii-python-sdk && rm -rf "$T"
manifest:
skills/iii-python-sdk/SKILL.mdsource content
Python SDK
The async Python SDK for connecting workers to the iii engine.
Documentation
Full API reference: https://iii.dev/docs/api-reference/sdk-python
Install
pip install iii-sdk
Key Exports
| Export | Purpose |
|---|---|
| Connect to the engine, returns the client |
| Connection configuration |
| Register an async function handler |
| Bind a trigger to a function |
| Invoke a function synchronously |
| Invoke a function asynchronously |
| Access logger and trace context inside handlers |
/ | HTTP request/response types (pydantic) |
| Interface for custom stream implementations |
| Listen for function discovery |
| Monitor connection state |
| Bind a trigger with optional metadata |
Key Notes
returns a synchronous client; handlers are asyncregister_worker()
uses camelCaseApiResponse
(pydantic alias), notstatusCodestatus_code- End workers with
to keep the event loop alivewhile True: await asyncio.sleep(60) - Use
for CPU-heavy sync work inside handlersasyncio.to_thread() - The SDK implements both
and a synchronoustrigger_async(request)
. Usetrigger(request)
inside async handlers, andtrigger_async
in synchronous scripts or threads where blocking behavior is desired.trigger
Examples
# Async invocation (non-blocking, typical inside handlers) result = await iii.trigger_async({ "function_id": "greet", "payload": {"name": "World"} }) # Sync invocation (blocks the current thread, useful in sync contexts) result = iii.trigger({ "function_id": "greet", "payload": {"name": "World"} })
Pattern Boundaries
- For usage patterns and working examples, see
iii-functions-and-triggers - For HTTP middleware patterns, see
iii-http-middleware - For Node.js SDK, see
iii-node-sdk - For Rust SDK, see
iii-rust-sdk - For browser-side usage, see
iii-browser-sdk
When to Use
- Use this skill when the task is primarily about
in the iii engine.iii-python-sdk - Triggers when the request directly asks for this pattern or an equivalent implementation.
Boundaries
- Never use this skill as a generic fallback for unrelated tasks.
- You must not apply this skill when a more specific iii skill is a better fit.
- Always verify environment and safety constraints before applying examples from this skill.