Skip to main content

Python SDK for Aether workflow engine

Project description

Aether Python SDK

A Python SDK for the Aether workflow engine.

Installation

pip install aether-sdk

Quick Start

from aether import AetherService, step, activity, workflow

class MyService(AetherService):
    service_name = 'my-service'
    group = 'my-group'
    language = ['python']
    
    @step()
    def process_data(self, data: dict) -> dict:
        """Process data step"""
        return {**data, 'processed': True}
    
    @activity(max_attempts=3, timeout=30000)
    def analyze_data(self, data: dict) -> dict:
        """Analyze data with retry"""
        return run_analysis(data)
    
    @workflow()
    async def pipeline(self, ctx, data: dict) -> dict:
        """Complete processing pipeline"""
        processed = await ctx.step('self::process_data', data)
        return await ctx.step('self::analyze_data', processed)

# Start the service
service = MyService()
await service.start(port=50051)

Features

  • Decorators: @step(), @activity(), @workflow()
  • Service Registration: Automatic registration with Aether server
  • Context Methods: ctx.step(), ctx.activity(), ctx.child()
  • Retry Logic: Built-in retry with exponential backoff

API Reference

AetherService

class AetherService:
    service_name: str      # Unique service identifier
    group: str             # Logical grouping
    language: List[str]    # Programming languages
    
    async def start(self, host: str = '0.0.0.0', port: int = 50051)
    async def stop(self)

Decorators

@step(name: Optional[str] = None)
@activity(options: Optional[ActivityOptions] = None, name: Optional[str] = None)
@workflow(name: Optional[str] = None)

Context Methods

async ctx.step(name: str, input: Any) -> Any
async ctx.activity(name: str, input: Any, options: Optional[ActivityOptions] = None) -> Any
async ctx.child(workflow: str, args: List[Any]) -> Any

License

MIT

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

aether_framework_sdk-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

aether_framework_sdk-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file aether_framework_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: aether_framework_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aether_framework_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c3a25394a37a162daafdde20c627d3831dd1311e87f5e86e31e0cb335291da7
MD5 c36975c6266336373e92c0e47aad42fe
BLAKE2b-256 089171fc27dad6d1bd805301c4fee6a0e132219ea5f1ffe71ecafaa6b40b3fb1

See more details on using hashes here.

File details

Details for the file aether_framework_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aether_framework_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7b5bf1f6df2d6ecf34b7861bdb9ef407cdd691ef6f0e939ec87f27380ca3e31
MD5 36cd0289dc9f824df830b9c41a8445b2
BLAKE2b-256 123ec4e1a2c0ac2f079e79b7e0c973d0e44e4551281b7236ab056364f045a9a5

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