Skip to content

feat: implement realtime client with WebSocket support #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Subbi8
Copy link

@Subbi8 Subbi8 commented Jul 6, 2025

What kind of change does this PR introduce?

Feature - Adding a new realtime client implementation with WebSocket support for real-time data synchronization.

What is the current behavior?

Currently, the Supabase Python client lacks realtime functionality implementation. The test file test_realtime.py shows a NotImplementedError for realtime channel functionality, indicating this feature is missing.

What is the new behavior?

  • Implemented a complete realtime client with WebSocket support
  • Added three main classes:
    • RealtimeMessage: Handles message formatting and serialization
    • RealtimeChannel: Manages channel subscriptions and message routing
    • RealtimeClient: Manages WebSocket connections and heartbeat mechanism
  • Added comprehensive test coverage with all tests passing
  • Implemented proper thread management and cleanup
  • Added support for channel subscriptions and message handling

Additional context

  • The implementation follows the Phoenix WebSocket protocol used by Supabase
  • Includes proper error handling and resource cleanup
  • Added detailed documentation in NEW_CONTRIBUTION.md
  • All tests are passing successfully, including integration tests
  • The implementation is thread-safe and handles connection lifecycle properly

@silentworks
Copy link
Contributor

This would not be a part of this repo. If you wish to contribute to the sync client for realtime, it should be done in the https://github.com/supabase/realtime-py repo.

@silentworks silentworks closed this Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants