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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ambient_event_bus_client-0.1.4.tar.gz
.
File metadata
- Download URL: ambient_event_bus_client-0.1.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fba5b65033e13cb11c8f666f982f8a01ce2d3e88a31c550cfe5731601964f41 |
|
MD5 | f092a6234e0b1ecd89562e2d2ff88684 |
|
BLAKE2b-256 | c74cd1781cbc1008a1cae431a80b28b04976c66cfc9da3a76649358b133035c8 |
File details
Details for the file ambient_event_bus_client-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: ambient_event_bus_client-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1301b0f13f5dc7be5e68b8db7ce53ea8b57a0f8805ff03ffeb246b5666094306 |
|
MD5 | df608f1812c578dc2085aa99a55d8e83 |
|
BLAKE2b-256 | 5b254f5719f276374770e5022b7ddaa22d5b11ce40fabad68609bba26c30b00d |