finds.dev

permitio/fastapi_websocket_pubsub

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

View on GitHubHomepage ↗

★ 592PythonMITupdated Jul 2025

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
592
Forks
57
Language
Python
License
MIT
Last commit
15 Jul 2025

// nearby

If fastapi_websocket_pubsub isn't quite it.

All repos →