Skip to main content

RedisBridge

RedisBridge is a Python package that handles sending and receiving messages across clients via a Redis server.

Installation

pip install RedisBridge

Requirements

  • RedisBridge is intended to connect to a Redis server. To install and run Redis, see the instructions here.
  • RedisBridge supports Python 3.6 or later.

Getting Started

  1. Spin up a Redis server
$ redis-server --port 6379 &
  1. Create a bridge on each client
>>> from RedisBridge import RedisBridge
>>> bridge = RedisBridge(host='localhost', port=6379)
  1. Register callbacks to receive messages
>>> def callback(msg):
...     print('Received message:', msg)

>>> bridge.register_callback(callback, 'my_channel')
  1. Start each bridge to begin sending/receiving messages
>>> bridge.start()
  1. Send messages to other clients via bridge
>>> bridge.send('Hello World!', 'my_channel')

Each bridge calls all callbacks registered with it on the given channel

Received message: <Message: id='t2yedxi3', channel='my_channel', data='Hello World!'>
  1. Stop a bridge to close its connection to the server
>>> bridge.stop()

Docs

For much more detail about RedisBridge classes, messages, and usage patterns, check out the documentation. Seriously, go take a look.

Demos

For some toy examples and demos, check out the demos folder.

Metadata

Release files for RedisBridge 2.0.4

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

Source distribution (sdist)

Source distribution for RedisBridge 2.0.4
File Size Uploaded Provenance Actions
RedisBridge-2.0.4.tar.gz 10.0 kB Without provenance Details for RedisBridge-2.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for RedisBridge 2.0.4
File Interpreter ABI Platform Actions
RedisBridge-2.0.4-py3-none-any.whl Python 3 none any Details for RedisBridge-2.0.4-py3-none-any.whl

Total release size: 22.1 kB

Release files / RedisBridge-2.0.4.tar.gz

Download URL RedisBridge-2.0.4.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cb01e6f952c0e6ad66ecf93ebd02b806f1386f95279bc7a5911393c7cb8572ac
BLAKE2b-256 checksum
How to use checksums
21b2cece46dc01f86e84eb7883c025b881325ce5dcc00249d79e2f4200bd4cd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / RedisBridge-2.0.4-py3-none-any.whl

Download URL RedisBridge-2.0.4-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdbc2ab2105f04e1c1d3ed3d56d9542c729bdb4d9b54a71b0ebcb4385c9327a3
BLAKE2b-256 checksum
How to use checksums
2e84ad0344e7869704a61b380d5f04139ac6010f5f682d645021cb9b5a7150ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for RedisBridge 2.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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