Skip to content

Feature request: Parser models for API GW Websockets Events #5543

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

Closed
2 tasks done
ran-isenberg opened this issue Nov 12, 2024 · 6 comments · Fixed by #5597
Closed
2 tasks done

Feature request: Parser models for API GW Websockets Events #5543

ran-isenberg opened this issue Nov 12, 2024 · 6 comments · Fixed by #5597
Assignees
Labels
feature-request feature request

Comments

@ran-isenberg
Copy link
Contributor

Use case

I can implement it myself, it's been a while :)
I'd like to present/demo this feature in an upcoming blog post

3 times of events:
connect: https://gist.github.com/ran-isenberg/7c73a1db17a5d47ac5da5e19f0a3529f

message over a route : https://gist.github.com/ran-isenberg/35ceae2179ed9c26e459450825561369

disconnect: https://gist.github.com/ran-isenberg/2bffedaacc4423d7d23901b803cc280a

Solution/User Experience

Add Parser models and envelope to parse the event.
Same experience as API GW usage.

Alternative solutions

write the model by myself and use pure pydantic like a savage.

Acknowledgment

@leandrodamascena
Copy link
Contributor

Hi @ran-isenberg! Thanks a lot for opening this issue!

I'm working on adding support for Python 3.13 and I'll take a look at this issue tomorrow and we can add this to the parser/eventsource schemas/class.

@leandrodamascena leandrodamascena removed the triage Pending triage from maintainers label Nov 14, 2024
@leandrodamascena leandrodamascena self-assigned this Nov 14, 2024
@ran-isenberg
Copy link
Contributor Author

lemme know if you want to write it yourself, or do you want me to give it a try ;)

@anafalcao anafalcao moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Nov 19, 2024
@anafalcao
Copy link
Contributor

Hi Ran,
Thank you for opening this issue! I'm the new maintainer of Powertools, and I'll be working with you on this. Great catch, it will simplify the process when using WebSocket and Lambda together.
Would you like to submit this PR? I noticed it's been a while since we've had a pull request from you 😄
It'd be a pleasure to work with you to get this merged!
Let me know if you need any assistance or have any questions along the way

@ran-isenberg
Copy link
Contributor Author

Hey @anafalcao , nice to meet you!
Looking forward to meeting you and seeing the team again at Vegas!
I'll try to write a PR later tonight, it's been a while!

@ran-isenberg
Copy link
Contributor Author

@anafalcao see #5597

@ran-isenberg
Copy link
Contributor Author

@leandrodamascena when will you release it?

@leandrodamascena leandrodamascena moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
Status: Shipped
Development

Successfully merging a pull request may close this issue.

3 participants