{"repo":"permitio/fastapi_websocket_pubsub","free":true,"listed":false,"github":"https://github.com/permitio/fastapi_websocket_pubsub","clone":"git clone https://github.com/permitio/fastapi_websocket_pubsub.git","description":"A fast and durable Pub/Sub channel over Websockets. FastAPI + WebSockets + PubSub == ⚡ 💪 ❤️","language":"Python","stars":593,"topics":["fastapi","pubsub","publish","realtime-messaging","subscribe","websocket","broadcast","pubsub-websocket","fastapi-websocket","realtime"],"license":"MIT","category":"networking-infra","readme_excerpt":"⚡🗞️ FastAPI Websocket Pub/Sub A fast and durable Pub/Sub channel over Websockets. The easiest way to create a live publish / subscribe multi-cast over the web. Supports and tested on Python = 3.7 As seen at PyCon IL 2021 and EuroPython 2021 Installation 🛠️ Intro The classic pub/sub pattern made easily accessible and scalable over the web and across your cloud in realtime; while enjoying the benefits of FastAPI (e.g. dependency injection). FastAPI + WebSockets + PubSub == ⚡💪 ❤️ - Subscribe - Clients subscribe to topics (arbitrary strings) and receive relevant events along with structured data (serialized with Pydantic). - Publish - Directly from server code to connected clients. - From client to client (through the servers) - Across server instances (using broadcaster and a backend medium (e.g. Redis, Kafka, ...)) - No matter which server a client connects to - it will get the messages it subscribes to see examples/pubsub broadcaster server example.py for full usage example Note: Requires install with dependencies e.g. pip install fastapi websocket pubsub[redis] , pip install fastapi websocket pubsub[postgres] , pip install fastapi websocket pubsub[kafka] or pip install fastapi websocket pubsub[all] to get support for all three backends Usage example (server publishing following HTTP trigger): In the code below, a client connects to the server and subscribes to a topic named \"triggered\". Aside from PubSub websocket, the server also exposes a regular http route, which trigge","default_branch":null,"files":null,"tree":[],"storefront":"/r/permitio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/permitio/fastapi_websocket_pubsub/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}