# Ambient Event Bus Client
## Typical usage example
```python
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)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ambientlabscomputing/ambient-event-bus-client",
"name": "ambient-event-bus-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Jose Catarino",
"author_email": "jose@ambientlabscomputing.com",
"download_url": "https://files.pythonhosted.org/packages/6f/52/d94b10c520f3b5d9a83cac465aa168ec7feb624c2e38dd8aa7c2ea9a1635/ambient_event_bus_client-1.1.2.tar.gz",
"platform": null,
"description": "# Ambient Event Bus Client\n\n## Typical usage example\n\n```python\nfrom ambient_event_bus_client import Client, ClientOptions\n\noptions = ClientOptions(\n event_api_url=\"http://localhost:8000\",\n connection_service_url=\"http://localhost:8001\",\n api_token = \"my_token\"\n)\nclient = Client(options)\nawait client.init_client() # ensure you are in an async context\n\n# add subscriptions\nawait client.add_subscription(topic=\"test\")\n\n# read messages from subscriptions\nasync for message in client.subscribe():\n print(message)\n\n# publish a message\nmessage = MessageCreate(topic=\"my_topic\", message=\"my_message\")\nawait client.publish(message)\n```\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A library to interact with the Ambient Labs Event Bus.",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://github.com/ambientlabscomputing/ambient-event-bus-client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3814f5d2ee0beb045fa6692cc249f7cd6f9a182745ef5032a90bc775f82140e9",
"md5": "3b9b30a90c1b896b67dad72b3f77c5ff",
"sha256": "09e8472e358b440d5914e5a6da680b7344ce6f0a2fa6b559cc3088aa97958bdd"
},
"downloads": -1,
"filename": "ambient_event_bus_client-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b9b30a90c1b896b67dad72b3f77c5ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6782,
"upload_time": "2024-10-06T05:59:04",
"upload_time_iso_8601": "2024-10-06T05:59:04.952272Z",
"url": "https://files.pythonhosted.org/packages/38/14/f5d2ee0beb045fa6692cc249f7cd6f9a182745ef5032a90bc775f82140e9/ambient_event_bus_client-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f52d94b10c520f3b5d9a83cac465aa168ec7feb624c2e38dd8aa7c2ea9a1635",
"md5": "59621e4073649068b973084c58e34097",
"sha256": "f365894c2a01cad9b36680f9090f59a88e79a996a86d0d6aa43c254c3c982d61"
},
"downloads": -1,
"filename": "ambient_event_bus_client-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "59621e4073649068b973084c58e34097",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5183,
"upload_time": "2024-10-06T05:59:06",
"upload_time_iso_8601": "2024-10-06T05:59:06.346120Z",
"url": "https://files.pythonhosted.org/packages/6f/52/d94b10c520f3b5d9a83cac465aa168ec7feb624c2e38dd8aa7c2ea9a1635/ambient_event_bus_client-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-06 05:59:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ambientlabscomputing",
"github_project": "ambient-event-bus-client",
"github_not_found": true,
"lcname": "ambient-event-bus-client"
}