EDRI documentation¶
Event Driven Routing Infrastructure — a Python framework for building event-driven, parallel, and distributed applications.
EDRI is an application framework for Python that combines event-driven architecture, multiprocessing, and ASGI networking. It is designed for applications that need to route events between components running in separate processes, optionally distributed across machines.
When to use EDRI¶
Event-driven applications with multiple processing stages
Applications that distribute work across processes
Systems requiring real-time communication between components (WebSocket, HTTP)
Projects that need a structured event model with request/response patterns
Distributed event routing across machines via TCP
When not to use EDRI¶
Simple CRUD APIs — use FastAPI, Flask, or Django REST Framework
Pub/Sub at scale — use Kafka, RabbitMQ, or Redis Streams
Synchronous request-response only — a lightweight ASGI framework is sufficient
Embedded or resource-constrained environments — EDRI's process model is designed for server-class deployments
Quick facts¶
Property |
Detail |
|---|---|
Language |
Python 3.12+ |
Networking |
ASGI (uvicorn, hypercorn, daphne) |
Distribution |
TCP Switch with pickle protocol |
IPC |
multiprocessing Queues, SharedMemoryPipe |
Event model |
Dataclass-based events with type-safe request/response |
License |
MIT |
Getting Started
Core
API
Integrations
Operations
Examples
- Examples
- REST CRUD with validation
- HTML form: GET the form, POST it, redirect on success
- Offloading CPU-bound work to a WorkerProcess
- SharedMemoryPipe: streaming a ZIP of a folder
- Streaming an upload straight into MinIO / S3
- Scatter–gather (fan-out / fan-in) with
resolve_callback_worker - Periodic refresh into the Key-Value Store
- Pydantic AI: a support agent with tools that dispatch to a different Manager
- Asynchronous File Processing with WebSocket Feedback (Ticket Pattern)
- Middleware: Token authentication end-to-end
- Middleware: deferred (async) authentication with
replace_event+redirect_event - Middleware: per-stage latency as a
Server-Timingheader
API Reference