fastapi-events
Event dispatching library for FastAPI
Decision gist · record as of 2026-08-14
Yes, if you need post-response event handling in FastAPI or Starlette. The library is stable, has no runtime dependencies, and solves a real problem (async event processing without response delay). The dormant maintenance status is a minor concern—verify compatibility with your FastAPI version before adopting, but the straightforward API and Pydantic integration make it a solid choice for event-driven patterns.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies in the base package.
- The project shows dormant maintenance (last commit 2024-12-21, 601 days since release) but remains marked Production/Stable and supports current Python versions (3.8–3.13).
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
last release 2024-12-21 (601 days) · last repo commit 2024-12-21 · 611 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 219,361 downloads/mo, #9,327 on PyPI
Alternatives
Verify before relying
pip install fastapi-events
from fastapi import FastAPI
from fastapi_events.dispatcher import dispatch
from fastapi_events.middleware import EventHandlerASGIMiddleware
from fastapi_events.handlers.local import local_handler
app = FastAPI()
app.add_middleware(EventHandlerASGIMiddleware, handlers=[local_handler])
@app.get("/")
def index():
dispatch("my-event", payload={"id": 1})
return {"status": "ok"}- Whether the dormant maintenance status (601 days since last release) affects compatibility with the latest FastAPI/Starlette versions
- Performance characteristics when handling high event volumes or with remote queue backends
What it is and what it does
Fastapi-events is a middleware-based library that decouples event emission from event handling in FastAPI and Starlette applications. You register handlers (local, AWS, GCP, or custom) with the middleware, then call dispatch() anywhere in your request handlers to emit events. The library guarantees that handlers run after the response is sent, so event processing never blocks client responses.
The package supports Pydantic model validation for event payloads, event chaining (dispatching events within handlers), OpenTelemetry instrumentation, and FastAPI dependency injection in local handlers. Events can be dispatched as plain dicts or as Pydantic models, and handlers can be synchronous or async coroutines.
Use it for
- Send confirmation emails or notifications after an API request completes without delaying the response
- Emit domain events for audit logging or analytics after a database write
- Chain events: have one handler dispatch additional events based on the first event
- Pipe events to remote queues (AWS SQS, GCP Pub/Sub) for distributed processing
- Validate event payloads with Pydantic schemas before handlers execute
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need post-response event handling in FastAPI or Starlette.
The library is stable, has no runtime dependencies, and solves a real problem (async event processing without response delay). The dormant maintenance status is a minor concern—verify compatibility with your FastAPI version before adopting, but the straightforward API and Pydantic integration make it a solid choice for event-driven patterns.
Install
fastapi-events on PyPI
Before you install
Installation is straightforward with no runtime dependencies in the base package. The project shows dormant maintenance (last commit 2024-12-21, 601 days since release) but remains marked Production/Stable and supports current Python versions (3.8–3.13).
License in practice
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install fastapi-events
from fastapi import FastAPI
from fastapi_events.dispatcher import dispatch
from fastapi_events.middleware import EventHandlerASGIMiddleware
from fastapi_events.handlers.local import local_handler
app = FastAPI()
app.add_middleware(EventHandlerASGIMiddleware, handlers=[local_handler])
@app.get("/")
def index():
dispatch("my-event", payload={"id": 1})
return {"status": "ok"}
Verify before relying
- Whether the dormant maintenance status (601 days since last release) affects compatibility with the latest FastAPI/Starlette versions
- Performance characteristics when handling high event volumes or with remote queue backends
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 601 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 219,361 / month, #9,327 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/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: fastapi_events-0.12.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 › “fastapi event dispatching”
- fastapi-eventsFastapi-events is an event dispatching and handling library for…
- PyPyDispatcherPyPyDispatcher implements a multi-producer-multi-consumer signal…
- blinkerBlinker provides a lightweight event dispatching system that lets any…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
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.
See also fastapi-mail · starlette-context · starlette-compress · pyeventsystem · sse-starlette · fastapi-pagination · observable · bubus · zope.event