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.7.tar.gz
(4.0 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.7.tar.gz.
File metadata
- Download URL: relaybus_http-0.0.7.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a8b919319623611445d2cb8a57ae1cac9f2f4cd3c5fa9dd3b5c60b208d0eacd
|
|
| MD5 |
08b859f9edb5f75d86cd210121467fa0
|
|
| BLAKE2b-256 |
3ef25ab5b358ad20c3d61bbb54cbaf8e79c17d7b976c9c9ca3f17e128b1684c1
|
File details
Details for the file relaybus_http-0.0.7-py3-none-any.whl.
File metadata
- Download URL: relaybus_http-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.5 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 |
22f86cb596b7fcf6aa02977a8502dc545259341b9f3c1deb2c89f393efc99c48
|
|
| MD5 |
ec3b6114e1f203920d8b0f94405ff3b3
|
|
| BLAKE2b-256 |
d89f2b88cf3cacf4bb072049a4e84acf542f3a24c8d7efe65a0e607c616a208f
|