Skip to content

GetmeUK/relay-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relay Python Library

A Python client for the relay service which relays server-side messages to client-side subscribers (e.g. browser) via websockets.

Installation

pip install relay-python

Requirements

  • Python 3.7+

Usage

import relay

client = relay.Client('your_api_key...')

# Publish a message to subscribers over the nav channel
client.publish(
    ['global'],
    {
        'action': 'nav_update',
        'payload': {
            'inbox_unread': 2
        }
    }
)

# Close a subscriber with the user Id burt
client.close('burt')

About

Client library for relay - a service for relaying server side messages to the client side browsers via websockets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages