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(
type="http",
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
Release history Release notifications | RSS feed
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.3.0.tar.gz
(66.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
iii_sdk-0.3.0-py3-none-any.whl
(26.3 kB
view details)
File details
Details for the file iii_sdk-0.3.0.tar.gz.
File metadata
- Download URL: iii_sdk-0.3.0.tar.gz
- Upload date:
- Size: 66.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f1ce3ba4b194741885fcdb1525176bff9d164381885f980e48843f4ad98fcd
|
|
| MD5 |
4408822445ab70198aaa2464e2fd836c
|
|
| BLAKE2b-256 |
2fad19e4c2db7dffa90e9b54281e29c07e2a9fa14c486925cf5f35244df8e63d
|
File details
Details for the file iii_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: iii_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e24c2febf382d9675b4bdcfdab61376362ce2edafc6c70ec1124ef15e19984
|
|
| MD5 |
fcf7985db55af410327a7646e540905f
|
|
| BLAKE2b-256 |
4f21e9e5541a2e66e5c6032a306b3f9622da60abb7276ce260e0cefa2a09d4b5
|