Async Lambda Durable Execution SDK for Python
Project description
Async Durable Execution SDK for Python
Build AWS Lambda Durable Functions With Async Python
✨ Key Features
- Automatic checkpointing - Resume execution after Lambda pauses or restarts
- Durable steps - Run work with retry strategies and deterministic replay
- Waits and callbacks - Pause for time or external signals without blocking Lambda
- Parallel and map operations - Fan out work with configurable completion criteria
- Child contexts - Structure complex workflows into isolated subflows
- Replay-safe logging - Use
context.loggerfor structured, de-duplicated logs - Local and cloud testing - Validate workflows with the testing SDK
🚀 Quick Start
Install the execution SDK:
pip install async-durable-execution
Create a durable Lambda handler:
from async_durable_execution import (
DurableContext,
StepContext,
durable_execution,
durable_step,
)
from async_durable_execution.config import Duration
@durable_step
async def validate_order(step_ctx: StepContext, order_id: str) -> dict:
step_ctx.logger.info("Validating order", extra={"order_id": order_id})
return {"order_id": order_id, "valid": True}
@durable_execution
async def handler(event: dict, context: DurableContext) -> dict:
order_id = event["order_id"]
context.logger.info("Starting workflow", extra={"order_id": order_id})
validation = await context.step(validate_order(order_id), name="validate_order")
if not validation["valid"]:
return {"status": "rejected", "order_id": order_id}
# simulate approval (real world: use wait_for_callback)
await context.wait(duration=Duration.from_seconds(5), name="await_confirmation")
return {"status": "approved", "order_id": order_id}
📚 Documentation
- AWS Documentation - Official AWS Lambda durable functions guide
💬 Feedback & Support
📄 License
See the LICENSE file for our project's licensing.
Project details
Release history Release notifications | RSS feed
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 async_durable_execution-0.1.0.tar.gz.
File metadata
- Download URL: async_durable_execution-0.1.0.tar.gz
- Upload date:
- Size: 180.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cd70391a90ed65302dc3f3f8ab9b8820528cdee1abe21c1df7e1706b0964e92
|
|
| MD5 |
2a97f9c58115c31894239a5747a1e0e3
|
|
| BLAKE2b-256 |
9767bde4a79ca04b4ae7cf8e4a1db3b37e3562471bdb757527431783a65a56b1
|
Provenance
The following attestation bundles were made for async_durable_execution-0.1.0.tar.gz:
Publisher:
pypi.yml on zhongkechen/async-durable-execution
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
async_durable_execution-0.1.0.tar.gz -
Subject digest:
0cd70391a90ed65302dc3f3f8ab9b8820528cdee1abe21c1df7e1706b0964e92 - Sigstore transparency entry: 1089398149
- Sigstore integration time:
-
Permalink:
zhongkechen/async-durable-execution@5eb5e571b19c43f9785cb091ad3df1da6a709082 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhongkechen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@5eb5e571b19c43f9785cb091ad3df1da6a709082 -
Trigger Event:
release
-
Statement type:
File details
Details for the file async_durable_execution-0.1.0-py3-none-any.whl.
File metadata
- Download URL: async_durable_execution-0.1.0-py3-none-any.whl
- Upload date:
- Size: 84.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81812fccc5f14a07cd1f3b3b1c5b645c59f431ba3f6d83418f1bbd216b45823a
|
|
| MD5 |
924e15d33d4eed43998226b148d7962c
|
|
| BLAKE2b-256 |
ed4278c7a87067d9a386435be96327cfba72438a3eb71ea955558a9d15d0aa20
|
Provenance
The following attestation bundles were made for async_durable_execution-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on zhongkechen/async-durable-execution
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
async_durable_execution-0.1.0-py3-none-any.whl -
Subject digest:
81812fccc5f14a07cd1f3b3b1c5b645c59f431ba3f6d83418f1bbd216b45823a - Sigstore transparency entry: 1089398191
- Sigstore integration time:
-
Permalink:
zhongkechen/async-durable-execution@5eb5e571b19c43f9785cb091ad3df1da6a709082 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhongkechen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@5eb5e571b19c43f9785cb091ad3df1da6a709082 -
Trigger Event:
release
-
Statement type: