litestar-org / litestar

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

Enhancement: Add native support for CloudEvents #2256

Open zro00 opened 1 year ago

zro00 commented 1 year 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 1 year ago

Great suggestion!

Goldziher commented 1 year ago

How would this look?

JacobCoffee commented 12 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