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.5.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.5.tar.gz.
File metadata
- Download URL: relaybus_http-0.0.5.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 |
6337513d2f79f31d07c77c1a2dcae65152137fd66024547a647b0e3281857c2a
|
|
| MD5 |
fed30e80a870c57c0c5157ef3115c99b
|
|
| BLAKE2b-256 |
8f29c09abc1b9d78ec8c0a38a89262a8bbd49ac4759b6759ca4c127a39bc0388
|
File details
Details for the file relaybus_http-0.0.5-py3-none-any.whl.
File metadata
- Download URL: relaybus_http-0.0.5-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 |
6c57c632dbfab306542a42330989fb42ff2b044fbacd68d75b779d455dba9d80
|
|
| MD5 |
ba6d6aa7112dcc6880ced93afafaad09
|
|
| BLAKE2b-256 |
72bff8453071eaccc3b3a490245e984fb5c5048fd1ad580d7a2604ad631fe917
|