{"id":19921938,"url":"https://github.com/drakkar-software/async-channel","last_synced_at":"2025-06-12T15:33:03.870Z","repository":{"id":39897754,"uuid":"187099036","full_name":"Drakkar-Software/Async-Channel","owner":"Drakkar-Software","description":"Python async multi-task communication library. Used by OctoBot project.","archived":false,"fork":false,"pushed_at":"2023-10-05T10:23:19.000Z","size":358,"stargazers_count":22,"open_issues_count":0,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T19:15:22.644Z","etag":null,"topics":["async","channels","concurrency","cython","go-channel","parallelism","python"],"latest_commit_sha":null,"homepage":"https://www.octobot.cloud","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Drakkar-Software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-16T20:46:24.000Z","updated_at":"2025-02-25T18:24:34.000Z","dependencies_parsed_at":"2023-02-08T08:15:47.083Z","dependency_job_id":"ad126e21-0ff9-4a82-820a-a4773b1fb20f","html_url":"https://github.com/Drakkar-Software/Async-Channel","commit_stats":{"total_commits":180,"total_committers":6,"mean_commits":30.0,"dds":0.2055555555555556,"last_synced_commit":"7a6ec276654b1b6ece90c0fe371d0042c32b87b6"},"previous_names":["drakkar-software/octobot-channels"],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakkar-Software%2FAsync-Channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakkar-Software%2FAsync-Channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakkar-Software%2FAsync-Channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakkar-Software%2FAsync-Channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Drakkar-Software","download_url":"https://codeload.github.com/Drakkar-Software/Async-Channel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156692,"owners_count":21703327,"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":["async","channels","concurrency","cython","go-channel","parallelism","python"],"created_at":"2024-11-12T22:08:52.308Z","updated_at":"2025-05-03T07:30:31.686Z","avatar_url":"https://github.com/Drakkar-Software.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async-Channel [2.2.1](https://github.com/Drakkar-Software/Async-Channel/blob/master/CHANGELOG.md)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/523d43c62f1d4de08395752367f5fddc)](https://www.codacy.com/gh/Drakkar-Software/Async-Channel/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Drakkar-Software/Async-Channel\u0026amp;utm_campaign=Badge_Grade)\n[![PyPI](https://img.shields.io/pypi/v/async-channel.svg)](https://pypi.python.org/pypi/async-channel/)\n[![Github-Action-CI](https://github.com/Drakkar-Software/Async-Channel/workflows/Async-Channel-Default-CI/badge.svg)](https://github.com/Drakkar-Software/Async-Channel/actions)\n[![Build Status](https://cloud.drone.io/api/badges/Drakkar-Software/Async-Channel/status.svg)](https://cloud.drone.io/Drakkar-Software/Async-Channel)\n[![Coverage Status](https://coveralls.io/repos/github/Drakkar-Software/OctoBot-Channels/badge.svg?branch=master)](https://coveralls.io/github/Drakkar-Software/OctoBot-Channels?branch=master)\n[![Doc Status](https://readthedocs.org/projects/octobot-channels/badge/?version=stable)](https://octobot-channels.readthedocs.io/en/stable/?badge=stable)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nPython multi-task communication library. Used by [OctoBot](https://github.com/Drakkar-Software/OctoBot) project.\n\n## Installation\nWith python3 : `pip install async-channel`\n\n## Usage\nExample\n```python\nimport async_channel.consumer as consumer\nimport async_channel.producer as producer\nimport async_channel.channels as channels\nimport async_channel.util as util\n\nclass AwesomeProducer(producer.Producer):\n    pass\n\nclass AwesomeConsumer(consumer.Consumer):\n    pass\n\nclass AwesomeChannel(channels.Channel):\n    PRODUCER_CLASS = AwesomeProducer\n    CONSUMER_CLASS = AwesomeConsumer\n\nasync def callback(data):\n    print(\"Consumer called !\")\n    print(\"Received : \" + data)\n\n# Creates the channel\nawait util.create_channel_instance(AwesomeChannel, channels.Channels)\n\n# Add a new consumer to the channel\nawait channels.Channels.get_chan(\"Awesome\").new_consumer(callback)\n\n# Creates a producer that send data to the consumer through the channel\nproducer = AwesomeProducer(channels.Channels.get_chan(\"Awesome\"))\nawait producer.run()\nawait producer.send(\"test\")\n\n# Stops the channel with all its producers and consumers\n# await channels.Channels.get_chan(\"Awesome\").stop()\n```\n\n# Developer documentation\nOn [readthedocs.io](https://octobot-channels.readthedocs.io/en/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrakkar-software%2Fasync-channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrakkar-software%2Fasync-channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrakkar-software%2Fasync-channel/lists"}