Skip to main content

A library to interact with the Ambient Labs Event Bus.

Project description

Ambient Event Bus Client

Typical usage example

from ambient_event_bus_client import Client, ClientOptions

options = ClientOptions(
    event_api_url="http://localhost:8000",
    connection_service_url="http://localhost:8001",
    api_token = "my_token"
)
client = Client(options)
await client.init_client() # ensure you are in an async context

# add subscriptions
await client.add_subscription(topic="test")

# read messages from subscriptions
async for message in client.subscribe():
    print(message)

# publish a message
message = MessageCreate(topic="my_topic", message="my_message")
await client.publish(message)

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

ambient_event_bus_client-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file ambient_event_bus_client-0.1.2.tar.gz.

File metadata

File hashes

Hashes for ambient_event_bus_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 db66f8f69d59eaf0be73f94331d094e6f2748885caea11cb1100d43d530732a5
MD5 77231ec335b07b85e6a497b1abf45479
BLAKE2b-256 c1847bdc03ded06562857da55cdad67a3d04a45c0016d406f52ceb36f3eba716

See more details on using hashes here.

File details

Details for the file ambient_event_bus_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ambient_event_bus_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bfeb8472a81d2221c77c6c48352eedd3f6ca468fcfa5c7fc3bfd3030b4ea6d7b
MD5 c6dd10afb7f1f83c356ec4ee799a39a7
BLAKE2b-256 fc2053868603910a767a7940ad93df91bb1dada0901c60ddaa1a0dac3ad9f3b7

See more details on using hashes here.

Supported by

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