powertools-lambda-python
powertools-lambda-python copied to clipboard
Feature request: Idempotent decorator for asynchronous functions
Use case
Would love to be able to use the AsyncBatchProcessor
and async_process_partial_response
function along with the idempotency utility.
Solution/User Experience
def async_idempotent_function():
def wrapper(func):
@functools.wraps(func)
async def wrapped(*args):
return await func(*args)
return wrapped
return wrapper
Alternative solutions
No response
Acknowledgment
- [X] This feature request meets Powertools for AWS Lambda (Python) Tenets
- [ ] Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET