{"id":34063880,"url":"https://github.com/sander76/aiosubpub","last_synced_at":"2025-12-14T05:51:28.017Z","repository":{"id":43553407,"uuid":"237404175","full_name":"sander76/aiosubpub","owner":"sander76","description":"Async pubsub implementation","archived":false,"fork":false,"pushed_at":"2022-02-26T19:32:20.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T19:41:29.790Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sander76.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-31T10:05:40.000Z","updated_at":"2023-10-29T07:48:24.000Z","dependencies_parsed_at":"2022-07-25T03:04:41.008Z","dependency_job_id":null,"html_url":"https://github.com/sander76/aiosubpub","commit_stats":null,"previous_names":["sander76/pypubsub"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sander76/aiosubpub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sander76%2Faiosubpub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sander76%2Faiosubpub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sander76%2Faiosubpub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sander76%2Faiosubpub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sander76","download_url":"https://codeload.github.com/sander76/aiosubpub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sander76%2Faiosubpub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27718779,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-14T05:51:24.541Z","updated_at":"2025-12-14T05:51:28.008Z","avatar_url":"https://github.com/sander76.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![CI](https://github.com/sander76/mspyteams/workflows/CI/badge.svg)\n[![codecov](https://codecov.io/gh/sander76/pypubsub/branch/master/graph/badge.svg)](https://codecov.io/gh/sander76/pypubsub)\n\n\n# AioSubPub\n\nAsync pub sub implementation.\n\nInspired by someone else whose name I cannot find anymore. If you see your code (I did some improvements on it I think) please let me know and I am happy to give you credit.\n\n## Installation\n\n`pip install aiosubpub`\n\n## Usage\n\n```python\nimport aiosubpub\nimport asyncio\nloop=asyncio.get_event_loop()\n\n# create a channel\na_channel = aiosubpub.Channel()\n\n# subscribe to the channel using a callback.\ndef call_back(data):\n    print(data)\n\nsubscription = loop.create_task(a_channel.subscribe(call_back))\n\n# Publish a message.\na_channel.publish(\"a message\")\n\nsubscription.un_subscribe()\n\n\n# Without callback:\n\nsubscription = a_channel.get_subscription()\n\nasync def _custom_subscriber():\n    with subscription as sub:\n        result = await sub.get()\n        print(result)\n\na_channel.publish(\"a message\")\n\nresult = await _custom_subscriber()\n```\n\n## changelog\n\n### 1.0.10\n- Add `get_latest` to the channel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsander76%2Faiosubpub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsander76%2Faiosubpub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsander76%2Faiosubpub/lists"}