cloudevents / sdk-python

Python SDK for CloudEvents
https://pypi.org/p/cloudevents/
Apache License 2.0
266 stars 53 forks source link

refactor: create abstract cloudevent #186

Closed sasha-tkachev closed 1 year ago

sasha-tkachev commented 1 year ago

Changes

Created an abstract cloudevent class to be used in #182

xSAVIKx commented 1 year ago

@sasha-tkachev can you please not resolve comments? It's usually up to the person who opened the comment to resolve it as soon as he can understand that it was actually addressed. It's a bit annoying to go over your comments, unresolved them and answer then 🙂

sasha-tkachev commented 1 year ago

@xSAVIKx did not realize that his is how it works 😅

sasha-tkachev commented 1 year ago

@xSAVIKx i tried to implement the alias trick but pydantic does not like it at all and i thought about a new way of implementing it

super simple - get_data_ and get_attributes classmethods

simple, polymorphic and implementation independent

Also i dont need to think about the mutability of the resulted attributes

xSAVIKx commented 1 year ago

@sasha-tkachev please let me know if you'd like to continue on this one. I can jump in if needed.

sasha-tkachev commented 1 year ago

@xSAVIKx It's ok, I have a-lot of motivation for this project. Just did not have enough free time for it in the past few days.

sasha-tkachev commented 1 year ago

@xSAVIKx waiting for your answers

xSAVIKx commented 1 year ago

@sasha-tkachev I'm sorry for the late reply. Somehow I missed the notifications.

You can also find me in CNCF Slack workspace if you need to poke me. Join here: https://communityinviter.com/apps/cloud-native/cncf