$npx skillfedfor your agent

fastapi-events

Event dispatching library for FastAPI

With conditionsPyPI Application FrameworksReleased Dec 2024219.4K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — fastapi_events-0.12.2-py3-none-any.whl
v0.12.2 · released 2024-12-21 · Python >=3.7

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

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
Same gist for agents: .md · .json

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.

With conditions

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

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 601 days since the last release
Last repo commit
First released
Downloads219,361 / month, #9,327 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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

Capabilities
fastapi event dispatchingasync event handling starlettepost-response event processingfastapi event queuebackground task eventsevent-driven fastapipydantic event validation
Topics
event-drivenasync-firstmiddleware
PyPI keywords
starlettefastapistarlitepydantic

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 Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

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.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

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.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

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.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also fastapi-mail · starlette-context · starlette-compress · pyeventsystem · sse-starlette · fastapi-pagination · observable · bubus · zope.event