@Pawel Czop The current version of Azure Function Python package does not have an implementation to handle events in the format of CloudEvent
You can find the supported Python classes for the Azure functions in Event Grid from the downloaded package azure_functions-1.23.0\azure\functions\_eventgrid.py
file. Python version of Azure function only supports EventGridEvent
.
The C# code you have referenced does support this CloudEvent
format which is why the data from the routing is successful. Since Event Grid Namespace routing to a custom topic only works with Cloud Event Schema
type, I would say this is a limitation with Python code.
I will take this limitation to the product team and see if this gets addressed in the future versions.
If this answers your query, please do click Accept Answer
and Yes
, as it might be beneficial to other community members reading this thread. If you have any further query, do let us know. Thank you