docs: new parser utility#192
Conversation
* develop: (23 commits) improv: rename schema to model as per Tom's review improv: rename to event_parser as per Tom's review Update aws_lambda_powertools/utilities/parser/pydantic.py chore: remove flake8 polyfill as explicit dep chore: explicit DynamoDB Stream schema naming improv: expose all pydantic imports improv: adjust high level imports improv: add docstrings; event internal param renamed improv: propagate exception to parser chore: lint feat: add standalone parse function chore: kwarg over arg to ease refactoring fix: code inspect issues improv: simplify base envelope; increase test cov improv: test parser fix: unnecessary return; better error handling Update README.md (#190) improv: raise own exception; remove duplicates fix: snake_case improv: envelope structure & import ...
Codecov Report
@@ Coverage Diff @@
## develop #192 +/- ##
========================================
Coverage 99.87% 99.87%
========================================
Files 65 66 +1
Lines 2451 2457 +6
Branches 108 107 -1
========================================
+ Hits 2448 2454 +6
Misses 3 3
Continue to review full report at Codecov.
|
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Co-authored-by: Joris Conijn <jco@woodwing.com>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
…da-powertools-python into docs/parser * 'docs/parser' of https://github.com/heitorlessa/aws-lambda-powertools-python: chore: typo in list
|
hey @risenberg-cyberark @koxudaxi - Would appreciate if you could review the new parser's docs before we release it. Parser is a thin wrapper on top of Pydantic |
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
* develop: fix: high and security peer dependency vulnerabilities fix: change to Yarn to support manual resolutions docs: use yarn's resolution to fix incompatible dependency build(deps): bump object-path from 0.11.4 to 0.11.5 in /docs
koxudaxi
left a comment
There was a problem hiding this comment.
@heitorlessa
Thank you for requesting a review.
I wrote some comments.
I think TypeVar can support that users decide types of models.
I guess _parse and parse methods should have TypeVar arguments for Models.
All great comments; I'll reply to them
Thanks a lot everyone |
|
All addressed @koxudaxi and I've just learned we don't need the additional |
@heitorlessa |
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
|
Thanks a lot @risenberg-cyberark and @koxudaxi for the review - I'm merging this now with all feedbacks being addressed, and will work on the 1.7.0 release tomorrow by EOD to include this publicly ;) |
Issue #, if available: #118
Description of changes:
Documentation for upcoming advanced parser.
Rendered doc: https://github.com/heitorlessa/aws-lambda-powertools-python/blob/docs/parser/docs/content/utilities/parser.mdx
Checklist
pydantic,typing_extension)event_parserdecoratorparsestandalone functionroot_validatorandvalidatorValidationErroras opposed to ours given its utility functionsjson(),errors(), etc. Original implementation also provided a better experience for those migrating existing Pydantic models and validations, which I can only see why not.Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.