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.9.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.9-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for relaybus_http-0.0.9.tar.gz
Algorithm Hash digest
SHA256 fb5894523e75cf5a35e17840d905537a4c2d09a2b2027754702feedd4e538723
MD5 fd85cea4d8f3c239e8097923eb3aff62
BLAKE2b-256 bd312261b9ce2e8eb224e1cd27d4efa303bca03ad6e3d9c2815cdb470d94799a

See more details on using hashes here.

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

Hashes for relaybus_http-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 66a38981c9e6847aefc66129f24a6aa079afd5c5fe18242f0c7631e7df8a05c6
MD5 d587e923ecfbcd6811f89eeb0e75bfba
BLAKE2b-256 e4fd475a90c7d8308268e549d04c38db6d8d83daf245563e1211bb8a0c3168de

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