-
Notifications
You must be signed in to change notification settings - Fork 429
Enhancement: Export SQSRecord in main data_classes module #6637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
|
1 similar comment
|
Static type checker used
mypy (project's standard)
AWS Lambda function runtime
3.12
Powertools for AWS Lambda (Python) version
latest
Static type checker info
When using AWS Lambda Powertools with Python type hints, the SQSEvent class is properly exported and can be imported directly from aws_lambda_powertools.utilities.data_classes.
However, SQSRecord - which is closely related to SQSEvent - is only available from the internal module:
While this works, it creates an inconsistent developer experience when working with SQS events since:
This inconsistency forces developers to know the internal package structure rather than having a clean, intuitive API.
Code snippet
Possible Solution
Export SQSRecord in the aws_lambda_powertools.utilities.data_classes module by adding it to the
__all__
list or by explicitly exporting it in the__init__.py
file.Suggested implementation:
In
aws_lambda_powertools/utilities/data_classes/__init__.py
:This small change would improve developer experience by allowing more consistent and intuitive imports when working with SQS events.
The text was updated successfully, but these errors were encountered: