A fast and durable Pub/Sub channel over Websockets for realtime data propagation in FastAPI applications.
FastAPI Websocket Pub/Sub is a Python library that implements a scalable publish/subscribe pattern over WebSockets, enabling real-time multi-cast communication across the web and cloud. It combines FastAPI's ASGI platform with a robust bidirectional channel to facilitate live data updates, remote control, and distributed computing. The library emphasizes durability, real-time performance, and integration with modern Python async ecosystems.
Python developers building real-time web applications that require bi-directional communication, such as live updates, remote control systems, or distributed computing solutions. It is particularly suited for those already using or familiar with FastAPI who need scalable Pub/Sub functionality.
Developers choose this library because it seamlessly integrates with FastAPI, leveraging its dependency injection for authentication and other logic, while providing structured data serialization with Pydantic models. Its unique selling point is the combination of WebSockets with a durable Pub/Sub pattern, supporting cross-server syncing via backends like Redis or PostgreSQL for scalable multi-instance deployments.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Events carry structured data serialized with Pydantic models, ensuring type safety and easy validation, as highlighted in the README's foundation section.
Supports both server-to-client and client-to-client publishing through the server, enabling flexible real-time communication for multi-user applications.
Integrates with broadcaster backends like Redis or PostgreSQL to sync events across server instances, making it ideal for cloud deployments with load balancing.
Leverages FastAPI's dependency injection for authentication and logic, allowing seamless integration and security enhancements in WebSocket connections.
As a fork pointing to the original permitio repository, it may lag behind upstream updates or diverge, posing potential maintenance and compatibility issues.
Cross-server syncing requires additional setup with broadcaster backends, increasing deployment complexity compared to simpler, single-server WebSocket solutions.
Heavily dependent on FastAPI's ASGI platform, limiting flexibility for projects using other web frameworks without significant adaptation or rework.