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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aether_framework_sdk-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b1b5ca0a34b90ea55a84eca0e195697a945c781e122700db87fd89314edfb92b
MD5 f660d28ae033b9b097f2a62ac9178d72
BLAKE2b-256 604c811e4fd31ca5acec2c63636de4c770fbe31afa7f4ba6d508ba8de978ba2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aether_framework_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f273ac113bd1e7124081af797ac16749ce7b78d59c76cf1ffda7edf07498735a
MD5 d583a6d1388a569c27377a1f35a0a760
BLAKE2b-256 662532cd0b9e90776f37bdc6a9f164c91d9a1d0fea6010355c75b93dc5e7bc9f

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