Relaybus HTTP publisher and subscriber
Project description
relaybus-http (Python)
HTTP publisher and subscriber utilities for Relaybus.
Install
pip install relaybus-http
Example
from relaybus_core import OutgoingMessage
from relaybus_http import (
HttpPublisher,
HttpPublisherConnectConfig,
HttpSubscriber,
HttpSubscriberConfig,
HttpSubscriberListenConfig,
)
subscriber = HttpSubscriber(
HttpSubscriberConfig(
on_message=lambda msg: print(msg.topic, msg.payload),
)
)
subscriber.listen(HttpSubscriberListenConfig(port=8088))
publisher = HttpPublisher.connect(
HttpPublisherConnectConfig(endpoint="http://localhost:8088/{topic}")
)
publisher.publish("relaybus.demo", OutgoingMessage(topic="relaybus.demo", payload=b"hello"))
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
relaybus_http-0.0.4.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relaybus_http-0.0.4.tar.gz.
File metadata
- Download URL: relaybus_http-0.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9001787f2cf8fad401a6fc552b98c888b8a0a964c6ab1c0c38be60e8476db34
|
|
| MD5 |
4f96ae8c685f4510d2b1d02a710273ed
|
|
| BLAKE2b-256 |
68200429f2bcc36c35010ada0e5c2de551fb118b5205a835e32f82f5349d2400
|
File details
Details for the file relaybus_http-0.0.4-py3-none-any.whl.
File metadata
- Download URL: relaybus_http-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b83ffb964f78cff30c7e15e07c41cc51b0970785f8c2367a5e665b386cb25782
|
|
| MD5 |
52db1dc6af4313fae3c17ef4cf7c2941
|
|
| BLAKE2b-256 |
a29dd9174acd0ca0f9282180d12967d86685a8edb54b55ac1807a07f574fcb6d
|