Skip to main content

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.8.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relaybus_http-0.0.8-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file relaybus_http-0.0.8.tar.gz.

File metadata

  • Download URL: relaybus_http-0.0.8.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

Hashes for relaybus_http-0.0.8.tar.gz
Algorithm Hash digest
SHA256 2cab6f9056b957ba2cff3b4c44c6a67ee536ce8159ff45d778699cc7b02de13f
MD5 89beed6ef1560042b697f1ac9ad4fca9
BLAKE2b-256 183d19f5c1bd8c98cd34d42195cae3480e335b23f5ac0ff362cc819a00ea4154

See more details on using hashes here.

File details

Details for the file relaybus_http-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: relaybus_http-0.0.8-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

Hashes for relaybus_http-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8562a18fcfd1ddeb2d6bdce62002a324e6438c4f160c466190bc0d325f11ce59
MD5 dda377636c881d3a981788110abb2b74
BLAKE2b-256 d4498c96cf4badae4f1d10df501f0f039df97bb62335c249dac86a5b764837d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page