async-event-bus


Nameasync-event-bus JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryA simple python event bus for python3
upload_time2025-07-29 11:32:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseGPL-3.0-or-later
keywords python event-bus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-event-bus

A simple event bus for python3

[![GitHub release](https://img.shields.io/github/v/release/half-nothing/async-event-bus)](https://www.github.com/half-nothing/async-event-bus/releases/latest)
![GitHub commits since latest release](https://img.shields.io/github/commits-since/half-nothing/async-event-bus/latest/main)
![GitHub top language](https://img.shields.io/github/languages/top/half-nothing/async-event-bus)
![GPLv3](https://img.shields.io/badge/License-GPLv3-blue)

## Quick Start

1. install package with pip or any tools you like

```shell
pip install async-event-bus
```

2. use example code under

```python
import asyncio
import sys

from loguru import logger

from async_event_bus import EventBus

bus = EventBus()
logger.remove()
logger.add(sys.stdout, level="TRACE")


@bus.on("message")
async def message_handler(message: str, *args, **kwargs) -> None:
    logger.info(f"message received: {message}")


async def main():
    await asyncio.gather(
        bus.emit("message", "Hello"),
        bus.emit("message", "This is a test message"),
        bus.emit("message", "Send from python"),
        bus.emit("message", "This is also a test message")
    )


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())

```

3. Check out the examples under the 'examples' folder for more help  

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "async-event-bus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "python, event-bus",
    "author": null,
    "author_email": "Half_nothing <Half_nothing@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/8f/e2/cbab69562fcb07ba088046d444216249b8f4deaa4d8f405cae8f6a97e6de/async_event_bus-0.2.0.tar.gz",
    "platform": null,
    "description": "# py-event-bus\n\nA simple event bus for python3\n\n[![GitHub release](https://img.shields.io/github/v/release/half-nothing/async-event-bus)](https://www.github.com/half-nothing/async-event-bus/releases/latest)\n![GitHub commits since latest release](https://img.shields.io/github/commits-since/half-nothing/async-event-bus/latest/main)\n![GitHub top language](https://img.shields.io/github/languages/top/half-nothing/async-event-bus)\n![GPLv3](https://img.shields.io/badge/License-GPLv3-blue)\n\n## Quick Start\n\n1. install package with pip or any tools you like\n\n```shell\npip install async-event-bus\n```\n\n2. use example code under\n\n```python\nimport asyncio\nimport sys\n\nfrom loguru import logger\n\nfrom async_event_bus import EventBus\n\nbus = EventBus()\nlogger.remove()\nlogger.add(sys.stdout, level=\"TRACE\")\n\n\n@bus.on(\"message\")\nasync def message_handler(message: str, *args, **kwargs) -> None:\n    logger.info(f\"message received: {message}\")\n\n\nasync def main():\n    await asyncio.gather(\n        bus.emit(\"message\", \"Hello\"),\n        bus.emit(\"message\", \"This is a test message\"),\n        bus.emit(\"message\", \"Send from python\"),\n        bus.emit(\"message\", \"This is also a test message\")\n    )\n\n\nif __name__ == \"__main__\":\n    loop = asyncio.new_event_loop()\n    loop.run_until_complete(main())\n\n```\n\n3. Check out the examples under the 'examples' folder for more help  \n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A simple python event bus for python3",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [
        "python",
        " event-bus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8158526060f320a4ea9fec57bf4969a041ba3f4b45788efd7107351e9db27394",
                "md5": "89d5f14057ff2f207a8f57319d3199b2",
                "sha256": "9e81aed4cd60adde7f404e7f30d7df80e791332fc74b8c15d9f9bc60b2c8d8ba"
            },
            "downloads": -1,
            "filename": "async_event_bus-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89d5f14057ff2f207a8f57319d3199b2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 24723,
            "upload_time": "2025-07-29T11:32:48",
            "upload_time_iso_8601": "2025-07-29T11:32:48.776948Z",
            "url": "https://files.pythonhosted.org/packages/81/58/526060f320a4ea9fec57bf4969a041ba3f4b45788efd7107351e9db27394/async_event_bus-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fe2cbab69562fcb07ba088046d444216249b8f4deaa4d8f405cae8f6a97e6de",
                "md5": "84d21b0ba6a1b9a95a54872ee9223629",
                "sha256": "d96ee261715f2ea812dbef1ef3eaba8c16ccab6fe37ed057c7331069e52cae28"
            },
            "downloads": -1,
            "filename": "async_event_bus-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "84d21b0ba6a1b9a95a54872ee9223629",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 21086,
            "upload_time": "2025-07-29T11:32:50",
            "upload_time_iso_8601": "2025-07-29T11:32:50.835615Z",
            "url": "https://files.pythonhosted.org/packages/8f/e2/cbab69562fcb07ba088046d444216249b8f4deaa4d8f405cae8f6a97e6de/async_event_bus-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 11:32:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "async-event-bus"
}
        
Elapsed time: 1.26722s