event-dispatching


Nameevent-dispatching JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/trabem/event-dispatcher
SummaryPure python implementation of event dispatcher
upload_time2023-07-09 15:55:43
maintainer
docs_urlNone
authorRuslan Saiko
requires_python>=3.8,<4.0
licenseMIT
keywords event-dispatcher event-dispatching events event handling python asynchronous event-driven event management
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Event Dispatcher

This repository contains a pure Python implementation of an event dispatcher. The event dispatcher allows you to create a simple event-driven architecture in your Python applications. It allows you to decouple your application components, making your code cleaner and easier to maintain.

## Features

- Pure Python: No external dependencies.
- Simple API: Easy to understand and use.
- Lightweight: Minimal impact on your application's performance.
- Flexible: Can be used in any Python application.
- Asyncio Support: Compatible with Python's built-in asyncio library.

## Installation

You can install the Event Dispatcher using [pip](https://pypi.org/project/event-dispatching/):

```bash
pip install event-dispatching
```
or using poetry
```bash
poetry add event-dispatching
```

## Usage

Here is a basic example of how to use the Event Dispatcher:

```python
import event_dispatcher

# Create an instance of the Event Dispatcher
dispatcher = event_dispatcher.SyncEventDispatcher()

# Define a callback function
def callback(data):
    print(f"Event received: {data}")

# Register the callback function for the "test" event
dispatcher.subscribe("test", callback)

# Dispatch the "test" event
dispatcher.dispatch("test", "Hello, World!")
```

When you run this code, it will print:

```
Event received: Hello, World!
```
More usage examples provided [here](https://github.com/trabem/event-dispatcher/tree/main/examples)
## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License. See the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/trabem/event-dispatcher",
    "name": "event-dispatching",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "event-dispatcher,event-dispatching,events,event handling,python,asynchronous,event-driven,event management",
    "author": "Ruslan Saiko",
    "author_email": "ruslan.saiko.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/07/c876c3267c59758fd4f5ad61b258bc55accda81dba5043a6d3af6108052f/event_dispatching-0.2.0.tar.gz",
    "platform": null,
    "description": "# Event Dispatcher\n\nThis repository contains a pure Python implementation of an event dispatcher. The event dispatcher allows you to create a simple event-driven architecture in your Python applications. It allows you to decouple your application components, making your code cleaner and easier to maintain.\n\n## Features\n\n- Pure Python: No external dependencies.\n- Simple API: Easy to understand and use.\n- Lightweight: Minimal impact on your application's performance.\n- Flexible: Can be used in any Python application.\n- Asyncio Support: Compatible with Python's built-in asyncio library.\n\n## Installation\n\nYou can install the Event Dispatcher using [pip](https://pypi.org/project/event-dispatching/):\n\n```bash\npip install event-dispatching\n```\nor using poetry\n```bash\npoetry add event-dispatching\n```\n\n## Usage\n\nHere is a basic example of how to use the Event Dispatcher:\n\n```python\nimport event_dispatcher\n\n# Create an instance of the Event Dispatcher\ndispatcher = event_dispatcher.SyncEventDispatcher()\n\n# Define a callback function\ndef callback(data):\n    print(f\"Event received: {data}\")\n\n# Register the callback function for the \"test\" event\ndispatcher.subscribe(\"test\", callback)\n\n# Dispatch the \"test\" event\ndispatcher.dispatch(\"test\", \"Hello, World!\")\n```\n\nWhen you run this code, it will print:\n\n```\nEvent received: Hello, World!\n```\nMore usage examples provided [here](https://github.com/trabem/event-dispatcher/tree/main/examples)\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pure python implementation of event dispatcher",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/trabem/event-dispatcher",
        "Repository": "https://github.com/trabem/event-dispatcher"
    },
    "split_keywords": [
        "event-dispatcher",
        "event-dispatching",
        "events",
        "event handling",
        "python",
        "asynchronous",
        "event-driven",
        "event management"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a84e6046fb4229c9e596ca487913e5dacaf866245cd9c931ba5daf93c1580b80",
                "md5": "e2c0bbf487d8643736b78ca6945e8cb8",
                "sha256": "cfd22e11abebd13df094172dba19ee173c555dce7ae9de82037f33eb5c634b65"
            },
            "downloads": -1,
            "filename": "event_dispatching-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2c0bbf487d8643736b78ca6945e8cb8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 5395,
            "upload_time": "2023-07-09T15:55:42",
            "upload_time_iso_8601": "2023-07-09T15:55:42.460171Z",
            "url": "https://files.pythonhosted.org/packages/a8/4e/6046fb4229c9e596ca487913e5dacaf866245cd9c931ba5daf93c1580b80/event_dispatching-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6307c876c3267c59758fd4f5ad61b258bc55accda81dba5043a6d3af6108052f",
                "md5": "73711d14a8ea304d984826c97eda26f7",
                "sha256": "be43b0178988f42c71aabe33fae647e5f11afdfa3b18c3674e2466a2ffc82c49"
            },
            "downloads": -1,
            "filename": "event_dispatching-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "73711d14a8ea304d984826c97eda26f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 3994,
            "upload_time": "2023-07-09T15:55:43",
            "upload_time_iso_8601": "2023-07-09T15:55:43.651700Z",
            "url": "https://files.pythonhosted.org/packages/63/07/c876c3267c59758fd4f5ad61b258bc55accda81dba5043a6d3af6108052f/event_dispatching-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-09 15:55:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "trabem",
    "github_project": "event-dispatcher",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "event-dispatching"
}
        
Elapsed time: 0.18992s