fastapi-cloudevents
FastAPI plugin for CloudEvents Integration
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—CloudEvents parsing and serialization—in a way that feels natural to FastAPI developers. Use it if you're building event-driven systems that need to consume or produce CloudEvents over HTTP.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with only three runtime dependencies (fastapi, cloudevents, pydantic-settings).
- Repository is actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
last release 2024-02-24 (902 days) · last repo commit 2026-07-01 · 118 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 264,375 downloads/mo, #8,340 on PyPI
Alternatives
Verify before relying
pip install fastapi-cloudevents
from fastapi import FastAPI
from fastapi_cloudevents import CloudEvent, install_fastapi_cloudevents
app = FastAPI()
app = install_fastapi_cloudevents(app)
@app.post("/")
async def on_event(event: CloudEvent) -> CloudEvent:
return CloudEvent(type="my.response", data=event.data)- Whether the package supports Python versions beyond 3.10 (classifiers list 3.7–3.10 but requires_python is unspecified)
What it is and what it does
fastapi-cloudevents is a FastAPI plugin that bridges the gap between the CloudEvents specification and FastAPI's native request/response handling. Instead of manually calling CloudEvents library functions like `to_structured()` and `from_http()`, you declare CloudEvent as a parameter type in your route handler and FastAPI automatically parses incoming requests—whether they use binary format (headers prefixed with `ce-`) or structured format (JSON body)—into CloudEvent objects. Responses are similarly serialized back to the appropriate format.
The plugin integrates with FastAPI's dependency injection and validation systems via pydantic-settings, so you can configure default response modes (binary or structured), custom source fields, and type-based routing using Pydantic discriminators. It handles the CloudEvents specification details transparently, making event-driven REST APIs feel like ordinary FastAPI development.
Use it for
- Build event-driven microservices that receive and emit CloudEvents over HTTP without boilerplate serialization code.
- Implement webhook handlers that accept CloudEvents from external event sources in either binary or structured format.
- Route incoming CloudEvents to different handlers based on the event type field using Pydantic discriminators.
- Create REST APIs that emit CloudEvents as responses, automatically formatting them according to client expectations.
- Integrate with event brokers or platforms (Knative, AWS EventBridge, etc.) that emit CloudEvents over HTTP.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—CloudEvents parsing and serialization—in a way that feels natural to FastAPI developers. Use it if you're building event-driven systems that need to consume or produce CloudEvents over HTTP.
Install
fastapi-cloudevents on PyPI
Before you install
Low install friction with only three runtime dependencies (fastapi, cloudevents, pydantic-settings). Repository is actively maintained with recent commits and no known vulnerabilities.
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install fastapi-cloudevents
from fastapi import FastAPI
from fastapi_cloudevents import CloudEvent, install_fastapi_cloudevents
app = FastAPI()
app = install_fastapi_cloudevents(app)
@app.post("/")
async def on_event(event: CloudEvent) -> CloudEvent:
return CloudEvent(type="my.response", data=event.data)
Verify before relying
- Whether the package supports Python versions beyond 3.10 (classifiers list 3.7–3.10 but requires_python is unspecified)
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesfastapicloudeventspydantic-settings |
| Maintenance | Actively maintained 902 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 264,375 / month, #8,340 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: fastapi_cloudevents-2.0.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cloudevents fastapi integration”
- fastapi-cloudeventsFastAPI plugin that automatically parses and serializes CloudEvents…
- cloudeventsProvides Python primitives to create, serialize, and deserialize…
- google-eventsProvides Python classes for Google CloudEvents event types, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also cloudevents · google-events · fastapi · fastapi-cli · functions-framework · microsoft-agents-hosting-fastapi · fastapi-events · sse-starlette · fastapi-cloudauth · stac-fastapi-types