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

Uploaded Source

Built Distribution

ambient_event_bus_client-0.1.5-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-0.1.5.tar.gz
Algorithm Hash digest
SHA256 be93e4018275ed9851dadb5d727d712b560a60c5d8bdfe244e405c34bceaffd7
MD5 fde47c63848ca31e047dd63f38a57116
BLAKE2b-256 863659ca4a4fb995766b87c2d40014602bc79b6fe5aa021bd509d71634df060a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ambient_event_bus_client-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 74e74ebc20310fe0dba9c2127184b95eb188af05f37cafa295890cd5344e3408
MD5 b9ebfbc6833fe145472403b90c3d32ef
BLAKE2b-256 98fa3b8435fef50178455378f51f8aa1b016ef86837d038ae2e3f78b7e0b5794

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