Loading...
Loading...
Python SDK for the iii engine. Use when building workers, registering functions, or invoking triggers in Python.
npx skill4agent add iii-hq/skills iii-python-sdkpip install iii-sdk| 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 |
register_worker()ApiResponsestatusCodestatus_codewhile True: await asyncio.sleep(60)asyncio.to_thread()trigger_async(request)trigger(request)trigger_asynctrigger# 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"}
})iii-functions-and-triggersiii-node-sdkiii-rust-sdkiii-python-sdk