Haja Workers SDK - Python implementation for workflow functions
Project description
Haja Workers SDK
Python SDK for building workers that integrate with the Haja workflow system.
Installation
pip install haja_workers
Quick Start
import asyncio
from haja_workers import Server, SimpleFunction
async def main():
server = Server()
# Define a simple function
echo = SimpleFunction[dict, dict](
name="echo",
version="1.0.0",
description="Echoes input"
).with_handler(lambda inputs: inputs)
# Register and start
server.register_function(echo)
await server.start()
if __name__ == "__main__":
asyncio.run(main())
Features
- Create input functions
- Store chat history
- Handle workflow events
- Communicate with the Haja workflow system
Examples
See the examples/ directory for more detailed usage examples.
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
haja_workers-0.1.1.tar.gz
(21.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
File details
Details for the file haja_workers-0.1.1.tar.gz.
File metadata
- Download URL: haja_workers-0.1.1.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d5a579d0a4580a764e84d2192368cf3b16458c68a1ae9331552ca0046b13862
|
|
| MD5 |
30fd1817a4ea1e2a4e3c0bf1b50e3df5
|
|
| BLAKE2b-256 |
f7f9dbf3a5dad5aa51d5564eda2555a93077bff453f99cac68aa836e53789127
|
File details
Details for the file haja_workers-0.1.1-py3-none-any.whl.
File metadata
- Download URL: haja_workers-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c44f1f585486e775881ea7f44f951beee81b648192bc853a7ec871384ce7b39
|
|
| MD5 |
22d46a565c96d3ef0e8536c187e888e9
|
|
| BLAKE2b-256 |
9d8f557c15ed81b7321e7e832d41ea8f2c5cf66141ce66eccc547f0498691f41
|