Metadata-Version: 2.1
Name: ambient_event_bus_client
Version: 0.1.0
Summary: A library to interact with the Ambient Labs Event Bus.
Home-page: https://github.com/ambientlabscomputing/ambient-event-bus-client
Author: Jose Catarino
Author-email: jose@ambientlabscomputing.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: aiohttp
Requires-Dist: websockets
Requires-Dist: pydantic

# event-client

## Typical usage example

```python

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)
```
