Skip to main content

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


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.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

haja_workers-0.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file haja_workers-0.1.0.tar.gz.

File metadata

  • Download URL: haja_workers-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for haja_workers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75c88ccd6cdc9db8b1a8e1b7eb29d62b163b179b306ebf86d989890d9da35390
MD5 f4182db76a1a64ce32a6f81bfff8d11c
BLAKE2b-256 b2e47ceb981e3d2b7db1e10f2f68025ef2135eaae5f3558189af99dfbd73939a

See more details on using hashes here.

File details

Details for the file haja_workers-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: haja_workers-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for haja_workers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1506cd5c26e3e5ff248860d4a1fe06a74bbf7c3b15d6a230650e963a41c03050
MD5 ea65a3f67bf59d1f9a15aae6ae854a20
BLAKE2b-256 977b476e7930b42c072dd566e726cf9a235632f9f05f9c60aacb058b739e580b

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