sasha-tkachev/fastapi-cloudevents
62.7
Adequate · 22 September 2026
846
lines of production code
Python
primary language
7
measurements over time
What this system is
This system is a Python library that integrates CloudEvents support into FastAPI applications. It provides models and request/response handlers for both structured and binary encoding formats, along with utilities for type-based routing and custom source configuration. The project includes comprehensive test coverage and example server implementations to demonstrate its capabilities.
Features
Add FastAPI/Pydantic v2 example for CloudEvents
Added a new example demonstrating a FastAPI application using Pydantic v2's BaseModel, featuring CloudEvent handling and model responses. The example includes a server script and curl commands to test the endpoints.
_examples/events\_and\_basemodels\mixed · high confidence
Add example for custom default source configuration
Added an example demonstrating how to configure a custom default source for CloudEvents using FastAPI. The example includes a Python server script that sets 'my-source' as the default source for CloudEvents, a shell script to test the endpoint, and a sample response file showing the CloudEvent headers.
_examples/custom\_default\source · high confidence
Add example servers for CloudEvents in structured and binary formats
Added example implementations for a FastAPI-based CloudEvents server that supports both structured and binary encoding formats. The examples demonstrate how to handle incoming CloudEvents and return responses, with separate server configurations for each encoding style. The binary format example includes a shell script for sending requests and a text file showing the expected response headers and body, while the structured format example provides a similar set of files. These examples serve as templates for integrating CloudEvents into a FastAPI application.
_examples/simple\server · high confidence
Add type routing example with content mode configuration
A new example in the type\_routing directory demonstrates how to configure CloudEvents routing based on event type. The example server uses FastAPI and the fastapi-cloudevents library to route requests to different handlers (MyEvent or YourEvent) using a discriminator on the 'type' field. It also configures the default response mode to 'structured' via CloudEventSettings. Request and response samples are provided to show the expected HTTP interactions and JSON payloads for both event types.
_examples/type\routing · high confidence
Initial project scaffolding and build configuration
The repository was initialized with essential build and development infrastructure, including a .gitignore file to exclude build artifacts and caches, a MANIFEST.in to include the py.typed marker for PEP 561 compliance, and a setup.py defining the package metadata and dependencies. Additionally, a mypy.ini was added to enforce strict type checking, and a tox.ini was introduced to automate testing and linting across multiple Python versions.
(repo-wide) · high confidence
Introduce CloudEvents integration for FastAPI
Added a new \fastapi\_cloudevents\ package that provides CloudEvents support for FastAPI applications. This includes a \CloudEvent\ model, \CloudEventRequest\ for parsing incoming CloudEvents, and \StructuredCloudEventResponse\/\BinaryCloudEventResponse\ classes for serializing responses. The library offers an \install\_fastapi\_cloudevents\ function to configure the FastAPI app with default response classes and route handlers, supporting both binary and structured content modes via \CloudEventSettings\.
_fastapi\cloudevents · high confidence
Test coverage
Added comprehensive test coverage for CloudEvent handling; Added regression tests for CloudEvents example servers.
Dependencies
Add project and test dependencies
The project now includes a requirements.txt file specifying fastapi (\>=0.62.0), cloudevents with pydantic support, and pydantic\_settings. For testing, tests/requirements.txt adds flake8 and related linting tools, pytest with coverage, and testing libraries requests, uvicorn, pytest-asyncio, and httpx.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 60 → 63 (+2.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 54 → 54 (+0.0)
- Readiness 57 → 61 (+4.5)
- Security 71 → 88 (+16.9)
Resolved (9)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Scanner failed to run — not a clean result
- Test reliability not included
New (11)
- Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- Workflow token permissions not restricted
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sasha-tkachev/fastapi-cloudevents was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f9e0de6085968cbbc75ac517d66d05fcd2b91694 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.