Skip to main content

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

Metadata

Release files for Relay-python 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Relay-python 0.0.7
File Size Uploaded
Relay-python-0.0.7.tar.gz 6.1 kB Details

Release files / Relay-python-0.0.7.tar.gz

Download URL Relay-python-0.0.7.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
75b2428b7566cb07544879e0767e2d391e3ae3b8b193f9919fea05064c491a57
BLAKE2b-256 checksum
How to use checksums
a4f95ecb8ea0b535a1de1b9e936754e1fe5f109a0f7461b247db4ffce978e204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.17

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page