{"id":20885812,"url":"https://github.com/compas-dev/compas_eve","last_synced_at":"2025-05-12T19:31:29.598Z","repository":{"id":179972695,"uuid":"664297816","full_name":"compas-dev/compas_eve","owner":"compas-dev","description":"COMPAS Event Extensions: adds event-based communication infrastructure to the COMPAS framework.","archived":false,"fork":false,"pushed_at":"2024-05-27T18:02:38.000Z","size":18704,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-10-05T20:04:11.520Z","etag":null,"topics":["architecture","compas","event-bus","events","mqtt"],"latest_commit_sha":null,"homepage":"http://compas.dev/compas_eve/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compas-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-09T14:41:36.000Z","updated_at":"2024-07-31T20:55:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"20e7514c-beaa-4132-a0e2-0cd1a5a9dd69","html_url":"https://github.com/compas-dev/compas_eve","commit_stats":null,"previous_names":["gramaziokohler/compas_eve","compas-dev/compas_eve"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compas-dev%2Fcompas_eve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compas-dev%2Fcompas_eve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compas-dev%2Fcompas_eve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compas-dev%2Fcompas_eve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compas-dev","download_url":"https://codeload.github.com/compas-dev/compas_eve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224360349,"owners_count":17298319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","compas","event-bus","events","mqtt"],"created_at":"2024-11-18T08:14:43.402Z","updated_at":"2024-11-18T08:14:44.001Z","avatar_url":"https://github.com/compas-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# COMPAS EVE\n\nEvent-based communication for the COMPAS framework.\n\n```python\n\u003e\u003e\u003e import compas_eve as eve\n\u003e\u003e\u003e pub = eve.Publisher(\"/hello_world\")\n\u003e\u003e\u003e sub = eve.EchoSubscriber(\"/hello_world\")\n\u003e\u003e\u003e sub.subscribe()\n\u003e\u003e\u003e for i in range(10):\n...    pub.publish(dict(text=f\"Hello World {i}\"))\n```\n\nIt is extremely easy to send messages around. COMPAS EVE supports\ndifferent transport mechanisms to send messages between different threads, processes, computers, etc.\n\n## Installation\n\nInstall using `pip`:\n\n```bash\n\n    pip install compas_eve\n```\n\nOr using `conda`:\n\n```bash\n\n    conda install compas_eve\n```\n\n## Supported features\n\n* Publisher/subscriber communication model (N-to-N communication)\n* In-process events\n* MQTT support\n* CPython \u0026 IronPython support\n\n## Examples\n\n### In-process events\n\nThe simplest option is to use in-process events. This works for\nsimple applications and allows to communicate between threads.\n\n```python\nimport compas_eve as eve\n\npub = eve.Publisher(\"/hello_world\")\nsub = eve.EchoSubscriber(\"/hello_world\")\nsub.subscribe()\n\nfor i in range(10):\n    pub.publish(dict(text=f\"Hello World {i}\"))\n```\n\n### MQTT\n\nMQTT is a protocol that allows to send messages between different\nsystems/computers. Using MQTT is very simple as well:\n\n```python\nimport compas_eve as eve\nfrom compas_eve.mqtt import MqttTransport\n\ntx = MqttTransport(\"broker.hivemq.com\")\neve.set_default_transport(tx)\n\npub = eve.Publisher(\"/hello_world\")\nsub = eve.EchoSubscriber(\"/hello_world\")\nsub.subscribe()\n\nfor i in range(10):\n    pub.publish(dict(text=f\"Hello World {i}\"))\n```\n\nThis example shows how to send and receive from a single script, but\nrunning publishers and subscribers on different scripts, different processes, or even different computers will work the exact same way.\n\n\n### Usage from Rhinoceros 3D\n\nIt is possible to use the same code from within Rhino/Grasshopper.\n\nMake sure you have installed it to Rhino using the COMPAS installation mechanism:\n\n```bash\n    python -m compas_rhino.install -v 7.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompas-dev%2Fcompas_eve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompas-dev%2Fcompas_eve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompas-dev%2Fcompas_eve/lists"}