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.9.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.9.tar.gz.
File metadata
- Download URL: relaybus_http-0.0.9.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 |
fb5894523e75cf5a35e17840d905537a4c2d09a2b2027754702feedd4e538723
|
|
| MD5 |
fd85cea4d8f3c239e8097923eb3aff62
|
|
| BLAKE2b-256 |
bd312261b9ce2e8eb224e1cd27d4efa303bca03ad6e3d9c2815cdb470d94799a
|
File details
Details for the file relaybus_http-0.0.9-py3-none-any.whl.
File metadata
- Download URL: relaybus_http-0.0.9-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 |
66a38981c9e6847aefc66129f24a6aa079afd5c5fe18242f0c7631e7df8a05c6
|
|
| MD5 |
d587e923ecfbcd6811f89eeb0e75bfba
|
|
| BLAKE2b-256 |
e4fd475a90c7d8308268e549d04c38db6d8d83daf245563e1211bb8a0c3168de
|