Python: Broadcast a message

Broadcast a message to all connected clients to a channel.

Examples

Send a message via websocket

channel = supabase.channel('room1')

def on_subscribe(status, err):
  if status == RealtimeSubscribeStates.SUBSCRIBED:
    channel.send_broadcast('cursor-pos', \{ "x": random.random(), "y": random.random() \})

channel.subscribe(on_subscribe)