Skip to main content

III SDK for Python

Project description

III SDK for Python

Python SDK for the III Engine.

Installation

pip install iii-sdk

Usage

import asyncio
from iii import III

async def my_function(data):
    return {"result": "success"}

iii = III("ws://localhost:49134")
iii.register_function("my.function", my_function)

async def main():
    await iii.connect()

    result = await iii.call("other.function", {"param": "value"})
    print(result)

asyncio.run(main())

Register API trigger

import asyncio
from iii import III, ApiRequest, ApiResponse

iii = III("ws://localhost:49134")

async def create_todo(data):    
    req = ApiRequest(**data)
    return ApiResponse(status=201, data={"id": "123", "title": req.body.get("title")})

iii.register_function("api.post.todo", create_todo)

async def main():
    await iii.connect()

    iii.register_trigger(
        trigger_type="api",
        function_id="api.post.todo",
        config={
            "api_path": "/todo",
            "http_method": "POST",
            "description": "Create a new todo"
        }
    )

asyncio.run(main())

Features

  • WebSocket-based communication with III Engine
  • Function registration and invocation
  • Trigger registration
  • Context-aware logging
  • Async/await support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iii_sdk-0.0.2a20260210174202.tar.gz (49.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iii_sdk-0.0.2a20260210174202-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file iii_sdk-0.0.2a20260210174202.tar.gz.

File metadata

  • Download URL: iii_sdk-0.0.2a20260210174202.tar.gz
  • Upload date:
  • Size: 49.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iii_sdk-0.0.2a20260210174202.tar.gz
Algorithm Hash digest
SHA256 861f462e4da6f2de5eb3eb599dd32b1a652d41897b7e740d620778fe23650449
MD5 bedd57a92b7daa22cefc2981aa193484
BLAKE2b-256 9aa26cde17120bc318783020137c8a0aaebf7c212431e9080bf2fe9370c9653a

See more details on using hashes here.

File details

Details for the file iii_sdk-0.0.2a20260210174202-py3-none-any.whl.

File metadata

File hashes

Hashes for iii_sdk-0.0.2a20260210174202-py3-none-any.whl
Algorithm Hash digest
SHA256 d65c895d9921d5f154e8bc2f263386684738958e690bad7c8429adec36f044ba
MD5 dd7c26328aecf73f47fdaed0cbda0899
BLAKE2b-256 bd76cdac0517faadefada66acdd5418b4ba89ba36c9c4113213e79309e8e298c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page