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.3.tar.gz (2.9 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.3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for relaybus_http-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9795d15441c14a6d80e4939baf1f08d869eb306132ed35a13488745d2eb51501
MD5 30cdbf0abfd8d05607a567ebb1e6fa89
BLAKE2b-256 29136eafe7d5a1b3dc9509e09e395c2477dd1419e0c027cc8887094ff3b25c80

See more details on using hashes here.

File details

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

File metadata

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

Hashes for relaybus_http-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3c286ece75187b290fe9364793c36efd8efc17e3dbafb933a16299a1cf29905e
MD5 6329d5402f83b714a68f1e8e2738136e
BLAKE2b-256 d040ad6b1ddd06fb6e088cd789f8eede6f0c0807c6e4aebd6d18035b034525fe

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