-
Notifications
You must be signed in to change notification settings - Fork 397
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
feat(data-classes): decorator to instantiate data_classes and docs updates #442
feat(data-classes): decorator to instantiate data_classes and docs updates #442
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #442 +/- ##
========================================
Coverage 99.90% 99.90%
========================================
Files 104 105 +1
Lines 4193 4202 +9
Branches 205 205
========================================
+ Hits 4189 4198 +9
Misses 1 1
Partials 3 3
Continue to review full report at Codecov.
|
I like it - It solves these problems and branding, since data classes have grown to support methods and such. It also solves #346 with a more specific doc - I'd like to include this in 1.18.0, as I'd need some time to create docs, think on how much to keep in each section and format. |
Should i update the docs then to include this? |
Confirming here that I have blocked time to review and get this incorporated tomorrow. Just been abnormally busy in the last few days with a customer project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change to make it safer and more performant for the future, all rest LGTM :)
I don't have permission to push to your fork so will push the next release to early next week to ensure we incorporate these in time
aws_lambda_powertools/utilities/idempotency/persistence/base.py
Outdated
Show resolved
Hide resolved
hasattr doesn't work in the way you might think it does - it's a misnomer in Python, really. It'll effectively do a blanket try/except, throw the results away, and specially in this case it'll access all getters from data -- the more getters the worse the performance. Co-authored-by: Heitor Lessa <[email protected]>
@heitorlessa does this look go to you now? |
Yes, thanks a lot Mike! |
…tools-python into develop * 'develop' of https://github.com/awslabs/aws-lambda-powertools-python: chore(deps): bump boto3 from 1.17.88 to 1.17.89 (#466) feat(data-classes): add AttributeValueType to DynamoDBStreamEvent (#462) chore(deps): bump boto3 from 1.17.87 to 1.17.88 (#463) chore(deps-dev): bump mkdocs-material from 7.1.6 to 7.1.7 (#464) feat(data-classes): decorator to instantiate data_classes and docs updates (#442) chore(deps): bump boto3 from 1.17.86 to 1.17.87 (#459)
Issue #, if available:
#434
aws-powertools/powertools-lambda#19
Description of changes:
Changes:
data_classes
instances@event_source
exampleALBEvent
and format examples to work with PyCharm_generate_hash
to handle thedata
being an instance ofDictWrapper
Example usage
And can be used with any of the existing data classes like:
And this still works with the existing idempotent handler
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.