-
Notifications
You must be signed in to change notification settings - Fork 444
Closed
Labels
feature-requestfeature requestfeature requestparserParser (Pydantic) utilityParser (Pydantic) utility
Description
Use case
When using the event_parser
decorator to parse the event
, the type will be duplicated if using type hints as a best practice.
@event_parser(model=Order)
def handler(event: Order, context: LambdaContext):
...
Solution/User Experience
I am proposing that we can drop the model
parameter as we can infer it from event
s type hint.
@event_parser
def handler(event: Order, context: LambdaContext):
...
I am very happy to contribute this feature request, it should be very small and is totally backwards-compatible (model
will still be accepted and chosen before type hints are inspected).
Alternative solutions
Keep as-is.
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) TenetsShould this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NETTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
feature-requestfeature requestfeature requestparserParser (Pydantic) utilityParser (Pydantic) utility
Type
Projects
Status
Shipped
Milestone
Relationships
Development
Select code repository
Activity
boring-cyborg commentedon Oct 5, 2023
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
heitorlessa commentedon Oct 6, 2023
Great idea @Tom01098 -- please feel free to send a PR as you suggested 🫶
It's still within our Progressive tenet -- explicit for most of us, and implicit via type hint for the cutting edge.
Feel free to ping on Discord or here if we can help with anything
github-actions commentedon Oct 12, 2023
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.