{"id":25895455,"url":"https://github.com/diamondlightsource/bluesky-stomp","last_synced_at":"2025-03-02T22:31:43.509Z","repository":{"id":251886093,"uuid":"838734372","full_name":"DiamondLightSource/bluesky-stomp","owner":"DiamondLightSource","description":"STOMP messaging integration for bluesky ","archived":false,"fork":false,"pushed_at":"2025-02-11T11:52:17.000Z","size":133,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-11T12:39:12.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiamondLightSource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T08:34:21.000Z","updated_at":"2025-02-03T14:55:16.000Z","dependencies_parsed_at":"2024-09-09T12:19:36.512Z","dependency_job_id":"9e1881a2-9b6b-49e4-84da-ca21bdf7a74d","html_url":"https://github.com/DiamondLightSource/bluesky-stomp","commit_stats":null,"previous_names":["diamondlightsource/bluesky-stomp"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fbluesky-stomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fbluesky-stomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fbluesky-stomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fbluesky-stomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiamondLightSource","download_url":"https://codeload.github.com/DiamondLightSource/bluesky-stomp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582515,"owners_count":19985845,"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":[],"created_at":"2025-03-02T22:31:27.055Z","updated_at":"2025-03-02T22:31:43.504Z","avatar_url":"https://github.com/DiamondLightSource.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/DiamondLightSource/bluesky-stomp/actions/workflows/ci.yml/badge.svg)](https://github.com/DiamondLightSource/bluesky-stomp/actions/workflows/ci.yml)\n[![Coverage](https://codecov.io/gh/DiamondLightSource/bluesky-stomp/branch/main/graph/badge.svg)](https://codecov.io/gh/DiamondLightSource/bluesky-stomp)\n[![PyPI](https://img.shields.io/pypi/v/bluesky-stomp.svg)](https://pypi.org/project/bluesky-stomp)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n# Bluesky Stomp\n\nSTOMP integration for bluesky\n\nSource          | \u003chttps://github.com/DiamondLightSource/bluesky-stomp\u003e\n:---:           | :---:\nPyPI            | `pip install bluesky-stomp`\nReleases        | \u003chttps://github.com/DiamondLightSource/bluesky-stomp/releases\u003e\n\n## Low Level API\n\nThe library comes with some helpers for interacting with a stomp broker:\n\n```python\nfrom bluesky_stomp.messaging import MessageContext, StompClient\nfrom bluesky_stomp.models import Broker, MessageQueue, MessageTopic\n\n# Assumes you have an unauthenticated broker such as ActiveMQ running on localhost:61613\nclient = StompClient.for_broker(Broker(host=\"localhost\", port=61613))\n\ntry:\n    # Connect to the broker\n    client.connect()\n\n    # Send a message to a queue and a topic\n    client.send(MessageQueue(name=\"my-queue\"), {\"foo\": 1, \"bar\": 2})\n    client.send(MessageTopic(name=\"my-topic\"), {\"foo\": 1, \"bar\": 2})\n\n    # Subscribe to messages on a topic, print all messages received,\n    # assumes there is another service to post messages to the topic\n    def on_message(message: str, context: MessageContext) -\u003e None:\n        print(message)\n\n    client.subscribe(MessageTopic(name=\"my-other-topic\"), on_message)\n\n    # Send a message and wait for a reply, assumes there is another service\n    # to post the reply\n    reply_future = client.send_and_receive(\n        MessageQueue(name=\"my-queue\"), {\"foo\": 1, \"bar\": 2}\n    )\n    print(reply_future.result(timeout=5.0))\nfinally:\n    # Disconnect at the end\n    client.disconnect()\n```\npython -m bluesky_stomp --version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondlightsource%2Fbluesky-stomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiamondlightsource%2Fbluesky-stomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondlightsource%2Fbluesky-stomp/lists"}