Skip to content

Instantly share code, notes, and snippets.

@onesecurity
onesecurity / fastapi_websocket_redis_pubsub.py
Created January 29, 2023 09:28 — forked from timhughes/fastapi_websocket_redis_pubsub.py
FastAPI Websocket Bidirectional Redis PubSub
"""
Usage:
Make sure that redis is running on localhost (or adjust the url)
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html
pip install -u uvicorn
Install dependencies