Skip to main content

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

Project description

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Relay-python-0.0.7.tar.gz (6.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page