asyncev


Nameasyncev JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryAsynchronous named events with no dependencies
upload_time2025-07-14 14:38:00
maintainerNone
docs_urlNone
authorEmil Tylén
requires_python>=3.9
licenseNone
keywords async asyncio event library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            AsyncEv: asynchronous event objects
===================================

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asyncev)

AsyncEv leverages `asyncio` to create events that can be subscribed to and waited for.

## Installation

    pip install asyncev

## Usage

```python
import asyncio
import asyncev
from dataclasses import dataclass

# Create an event
@dataclass
class MyEvent(asyncev.Event):
    value: str

# Create a handler
async def on_myevent(ev: MyEvent):
    print(f"Got a MyEvent with the value {ev.value}!")

asyncev.bind(MyEvent, on_myevent)

# Emit event (requires a running asyncio event loop)
async def main():
    asyncev.emit(MyEvent(value="hello world"))
    
asyncio.run(main())
```

## Development

Recommended tooling is [`uv`](https://astral.sh/uv).

### Building

    $ uv build

### Testing

    $ uv run tox

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "asyncev",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "async, asyncio, event, library",
    "author": "Emil Tyl\u00e9n",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a7/44/3f30a318b89ca27292bb94a0938ef0d2076960645fd73e65eeb76413fa57/asyncev-1.0.1.tar.gz",
    "platform": null,
    "description": "AsyncEv: asynchronous event objects\n===================================\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asyncev)\n\nAsyncEv leverages `asyncio` to create events that can be subscribed to and waited for.\n\n## Installation\n\n    pip install asyncev\n\n## Usage\n\n```python\nimport asyncio\nimport asyncev\nfrom dataclasses import dataclass\n\n# Create an event\n@dataclass\nclass MyEvent(asyncev.Event):\n    value: str\n\n# Create a handler\nasync def on_myevent(ev: MyEvent):\n    print(f\"Got a MyEvent with the value {ev.value}!\")\n\nasyncev.bind(MyEvent, on_myevent)\n\n# Emit event (requires a running asyncio event loop)\nasync def main():\n    asyncev.emit(MyEvent(value=\"hello world\"))\n    \nasyncio.run(main())\n```\n\n## Development\n\nRecommended tooling is [`uv`](https://astral.sh/uv).\n\n### Building\n\n    $ uv build\n\n### Testing\n\n    $ uv run tox\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Asynchronous named events with no dependencies",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/acetylen/asyncev",
        "Issues": "https://github.com/acetylen/asyncev/issues"
    },
    "split_keywords": [
        "async",
        " asyncio",
        " event",
        " library"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dac7e4e06681dada87e9e734b463da7c310ec63e77320fcf2cbe582f965980ea",
                "md5": "5389c137db7177e0af8be1c4880b65e6",
                "sha256": "ed616e32ab0cdfc07b570675821e4fa91e0144a6e47a06efdbb9a93a9f47c772"
            },
            "downloads": -1,
            "filename": "asyncev-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5389c137db7177e0af8be1c4880b65e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4699,
            "upload_time": "2025-07-14T14:37:59",
            "upload_time_iso_8601": "2025-07-14T14:37:59.218913Z",
            "url": "https://files.pythonhosted.org/packages/da/c7/e4e06681dada87e9e734b463da7c310ec63e77320fcf2cbe582f965980ea/asyncev-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a7443f30a318b89ca27292bb94a0938ef0d2076960645fd73e65eeb76413fa57",
                "md5": "261880af16c713edd69fc13f565d784a",
                "sha256": "a770d1cad5cc1fed64ff3d090c7b99e7dfb153c55710520cce3911fb033703fe"
            },
            "downloads": -1,
            "filename": "asyncev-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "261880af16c713edd69fc13f565d784a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 15544,
            "upload_time": "2025-07-14T14:38:00",
            "upload_time_iso_8601": "2025-07-14T14:38:00.466788Z",
            "url": "https://files.pythonhosted.org/packages/a7/44/3f30a318b89ca27292bb94a0938ef0d2076960645fd73e65eeb76413fa57/asyncev-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-14 14:38:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "acetylen",
    "github_project": "asyncev",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "asyncev"
}
        
Elapsed time: 0.76631s