feat: add high-level Redis Pub/Sub API for real-time applications#27
Open
massooti wants to merge 15 commits into
Open
feat: add high-level Redis Pub/Sub API for real-time applications#27massooti wants to merge 15 commits into
massooti wants to merge 15 commits into
Conversation
- Introduced `FastAPIJsonCoder` for JSON encoding of FastAPI-compatible values.
- Introduced `FastAPIJsonCoder` for JSON encoding of FastAPI-compatible values.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
- Coverage 98.29% 98.23% -0.06%
==========================================
Files 9 10 +1
Lines 764 795 +31
==========================================
+ Hits 751 781 +30
- Misses 13 14 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
emiliano-go
added a commit
to emiliano-go/fastapi-redis-sdk
that referenced
this pull request
Jul 23, 2026
get_async_redis now takes starlette.requests.HTTPConnection instead of fastapi.Request, so it works in both HTTP endpoints and WebSocket handlers. PubSubManagerDep and PubSubManager can now be injected directly in WebSocket endpoints without manually calling _get_pool_state. This approach was inspired by PR redis#27 (massooti).
massooti
marked this pull request as ready for review
July 25, 2026 06:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is belonging to this issue #24:
Without this feature, developers must manually:
With the helper:
Worker A ─┐
Worker B ─┼── Redis channel: room:42 ── broadcast to every connected client
Worker C ─┘
This adds a new project capability: the SDK moves from HTTP caching and raw Redis injection into reusable real-time FastAPI infrastructure. It directly supports chat
rooms, live notifications, job-progress updates, dashboards, and cross-worker broadcasts while reusing the existing Redis pool.