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.4.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.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aether_framework_sdk-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5e3ec3c25a9f73cddbfb40108209df3fa0566d0c5c943afe4f8751aca9f49e3e
MD5 7985d3d715f25494e1d7bedce3d70ff4
BLAKE2b-256 ca955b509c23b5b78fe4822eec895424db5f6b164e95eb8f6bae0d22a711d407

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aether_framework_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2fbbae8f846e62d4d77ffdbf3fef734734a03ce0723881f5be12a4e4f9b2c16c
MD5 e2559e96eb00475258db30ef5dacecc2
BLAKE2b-256 8f25b73fbcbcc85ac558731d5a10b6d31bed44b13b176ac4be8f5e6fa31904ce

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