litestar-org / litestar

Production-ready, Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
https://litestar.dev/
MIT License
5.18k stars 354 forks source link

Enhancement: Add native support for CloudEvents #2256

Open zro00 opened 11 months ago

zro00 commented 11 months ago

Summary

CloudEvents which is a specification for describing event data in a common way (https://cloudevents.io/). This is starting to see wider adoption within the big three cloud providers (Azure, GCP, AWS).

There is a similar project here for FastAPI: https://github.com/sasha-tkachev/fastapi-cloudevents

It would be nice if it was possible for Litestar to natively support this out of the box.

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


Funding

Fund with Polar

cofin commented 11 months ago

Great suggestion!

Goldziher commented 10 months ago

How would this look?

JacobCoffee commented 7 months ago

Note whoever takes this that cloudevents Python SDK by itself doesn't depend on Pydantic but it offers a [pydantic] extra.

https://github.com/cloudevents/sdk-python