finds.dev← search

// the find

permitio/fastapi_websocket_pubsub

★ 592 · Python · MIT · updated Jul 2025

A fast and durable Pub/Sub channel over Websockets. FastAPI + WebSockets + PubSub == ⚡ 💪 ❤️

A pub/sub layer built on top of fastapi-websocket-rpc that lets clients subscribe to string-keyed topics over a persistent WebSocket connection. The server can publish directly or fan out across instances via a broadcaster backend (Redis, Postgres, Kafka). Aimed at Python teams already on FastAPI who need real-time push without standing up a separate message broker.

Built-in reconnection via Tenacity means clients recover from drops without you wiring that up yourself. Multi-instance sync through broadcaster is a genuine feature — most toy WebSocket libraries skip this entirely. Pydantic serialization for event payloads means you get type-safe structured data rather than raw JSON blobs. Test coverage is solid: reconnect tests, broadcaster tests, multiprocess tests, and remote-ID tests are all there.

The dependency chain is deep — you're pulling in fastapi-websocket-rpc on top of this, and that project has its own staleness risks; any breakage there propagates here immediately. No built-in auth or topic-level access control — the README punts to FastAPI dependency injection, which means you have to wire it yourself and it's easy to leave a gap. Last meaningful activity was 2025 but stars stopped growing years ago and the issue tracker shows unanswered questions; this feels like maintained-but-not-developed. The broadcaster backend config is an arbitrary connection string rather than a typed config object, so misconfiguration fails at runtime, not import time.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →