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
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 aether_framework_sdk-0.1.3.tar.gz.
File metadata
- Download URL: aether_framework_sdk-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13081cc853e1637fb1d35e2b4f9563d4bdca6caee1cc9578f9c3354197f33a0c
|
|
| MD5 |
0a9f37e91b76035511622c9b84bf0153
|
|
| BLAKE2b-256 |
b2862180f9afd440685e28e221a7dc2cd1d3a1a0bfd52652a49b34a6e0008d00
|
File details
Details for the file aether_framework_sdk-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aether_framework_sdk-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b99a65719b9bbb84f82f6136a3bd0bf8e8dc4a2d60b018033931e48bb8219d7
|
|
| MD5 |
dbb3e640c13a11aef6a93203cd146c66
|
|
| BLAKE2b-256 |
7926433b6218f258756e6e99ee88efa87a4cf6a4112dd6c94adbe0771b11df72
|