원클릭으로
iii-python-sdk
Python SDK for the iii engine. Use when building workers, registering functions, or invoking triggers in Python.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Python SDK for the iii engine. Use when building workers, registering functions, or invoking triggers in Python.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
KTG content marketing pipeline. Takes a written blog post and runs the full publishing workflow: repurpose for all platforms, generate hero image, SEO and AI citation optimisation, then pause for green-light before publishing to all channels via Composio. Local-first: uses Ollama for text tasks where quality allows, cloud for image gen and live data. Use when user says "hub", "/hub", "publish this", "run the pipeline", "post this everywhere".
KTG content marketing pipeline — SWARM MODE. Orchestrates 7 plugins via parallel agent dispatch. Drop a post, get it published everywhere with maximum parallelism. Local-first: Ollama for text, cloud for images and live data. Agents run simultaneously, not sequentially.
KTG content marketing pipeline — SWARM MODE v2. Concrete 11-agent parallel pipeline using the Agent tool. Local-first: Ollama for text, cloud for images and publish. Drop a post, spawn agents, publish everywhere.
Browser SDK for connecting to the iii engine from web applications via WebSocket. Use when building browser-based clients that register functions, invoke triggers, or consume streams from the frontend.
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
Registers cron triggers with 7-field expressions to run functions on recurring schedules. Use when scheduling periodic jobs, timed automation, crontab replacements, cleanup routines, report generation, batch processing, or calendar-based work that is genuinely time-driven.
| name | iii-python-sdk |
| description | Python SDK for the iii engine. Use when building workers, registering functions, or invoking triggers in Python. |
The Python SDK for connecting sync and async workers to the iii engine.
Full API reference: https://iii.dev/docs/api-reference/sdk-python
pip install iii-sdk
| Export | Purpose |
|---|---|
register_worker(address, options?) | Connect to the engine and return the client |
InitOptions(...) | Worker name, timeout, headers, reconnect, telemetry |
iii.register_function(id, handler, **options) | Register a sync or async local handler |
iii.register_function(id, HttpInvocationConfig(...)) | Register an external HTTP endpoint as a function |
iii.register_trigger({ type, function_id, config, metadata? }) | Bind a trigger to a function |
iii.trigger(request) | Invoke a function synchronously |
await iii.trigger_async(request) | Invoke a function asynchronously |
iii.create_channel() / await iii.create_channel_async() | Create binary/text channels |
ChannelReader / ChannelWriter | Consume/write channel payloads |
get_context() | Access logger and trace context inside handlers |
Logger | Structured logs |
OtelConfig | OpenTelemetry options |
IIIInvocationError / IIIForbiddenError / IIITimeoutError | SDK error classes |
on_connection_state_change(callback) | Monitor connection state |
register_worker() returns a synchronous client.ApiResponse uses camelCase statusCode (pydantic alias), not status_codewhile True: await asyncio.sleep(60) to keep the event loop aliveasyncio.to_thread() for CPU-heavy sync work inside handlerstrigger_async(request) and a synchronous trigger(request). Use trigger_async inside async handlers, and trigger in synchronous scripts or threads where blocking behavior is desired.trigger() / trigger_async() and bind engine::functions-available with register_trigger(). See /docs/how-to/discover-workers-functions-triggers.from iii import HttpInvocationConfig
iii.register_function(
"orders::validate",
validate_order,
description="Validate an order",
metadata={"owner": "orders"},
)
iii.register_function(
"legacy::charge",
HttpInvocationConfig(
url="https://legacy.example.com/charge",
method="POST",
timeout_ms=5000,
auth={"type": "api_key", "header": "X-API-Key", "value_key": "LEGACY_API_KEY"},
),
)
HTTP auth supports hmac, bearer, and api_key. Pass environment variable names in secret_key, token_key, or value_key, not raw secrets.
channel = iii.create_channel() in sync code.channel = await iii.create_channel_async() in async code.channel.reader_ref or channel.writer_ref through trigger payloads.ChannelWriter.write(bytes) sends binary chunks; send_message() sends text.ChannelReader supports read_all(), on_message(callback), and async iteration for incremental binary chunks.Catch IIIInvocationError for remote failures. IIIForbiddenError maps to FORBIDDEN; IIITimeoutError maps to TIMEOUT. All invocation errors expose code, message, function_id, stacktrace, and invocation_id when the engine provides them.
# 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-http-middlewareiii-channelsiii-error-handlingiii-node-sdkiii-rust-sdkiii-browser-sdkiii-python-sdk in the iii engine.