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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b592c35f7b5d6717513e9890ba8c8255174ce90ce087b38871280abd5a2cba99
MD5 f173260e7838f94f716ac60ce6723587
BLAKE2b-256 f9e6800f9ae4ecad8b581707080db07fd3f3e73203305ddb8449e022c246ab6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 16817c25110dfbaa6981b0dc107b91aaab01d08c3dfb0c4ea77d1398e065100c
MD5 f2610ff2d7e6124365cf71c6bba42837
BLAKE2b-256 a4e3bb56c90ffc2ea2581435d3ae022698cff41141bfd03407fef7832932aaaa

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