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

Uploaded Source

Built Distribution

ambient_event_bus_client-1.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2b4e88d407d3bc5f51c21df857e6b480df2eb2acb43003100d27ce2499ce7274
MD5 1ca92aa28df3c5bf67b1b5e4f47e6b4c
BLAKE2b-256 dc1048bb7d62f51478f9b4f706cbe4f58d9e895a009b7fe9966d74005b469b11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cd16eedc6cb613a8570a62af79033944b49ec05ce433fe717968ab7bb7bfbf9
MD5 929a265383ef06a7d617771819187a9b
BLAKE2b-256 dae3dc094dded8570374b3a5c1362e4b5977d9ddd11b7a1635d35bab4343ec69

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