Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Export SQSRecord in data_classes module #6639

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

AlisonVilela
Copy link

Issue number: #6637

Summary

Changes

Export SQSRecord class in the main aws_lambda_powertools.utilities.data_classes module to allow for more consistent import patterns when working with SQS events.

User experience

Before:
Developers need to use inconsistent import patterns:

from aws_lambda_powertools.utilities.data_classes import SQSEvent
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord

After:
Developers can use a single, consistent import pattern:

from aws_lambda_powertools.utilities.data_classes import SQSEvent, SQSRecord

This improves developer experience by providing a more intuitive API when working with SQS events.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@AlisonVilela AlisonVilela requested a review from a team as a code owner May 9, 2025 08:40
@AlisonVilela AlisonVilela requested a review from anafalcao May 9, 2025 08:40
Copy link

boring-cyborg bot commented May 9, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 9, 2025
Copy link

sonarqubecloud bot commented May 9, 2025

@AlisonVilela
Copy link
Author

This doesn't fix a bug, as developers can already import SQSRecord directly from the submodule. The intent is simply to make the API more consistent and intuitive by allowing SQSEvent and SQSRecord to be imported from the same place, which aligns with how other event types are handled in the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant