Skip to main content

aioevents

https://travis-ci.com/mpyatishev/aioevents.svg?branch=master https://codecov.io/gh/mpyatishev/aioevents/branch/master/graph/badge.svg https://img.shields.io/pypi/v/aioevents-ng.svg

A simple library for managing events through an asynchronous queue

Installation

pip install aioevents-ng

Usage example

import asyncio

from dataclasses import dataclass

import aioevents


@dataclass
class MyEvent(aioevents.Event):
   payload: str


@aioevents.manager.register(MyEvent)
async def event_hadler(event: aioevents.Event):
   print(f"recieved: {event}")


async def produce():
   async with aioevents.events as events:
      await events.publish(MyEvent("Hello!"))


async def main():
   aioevents.start(asyncio.get_event_loop())

   await produce()

   print('stopping worker')
   aioevents.stop()

   # wait for all coroutines
   await asyncio.sleep(1)


if __name__ == "__main__":
   asyncio.run(main())

License

aioevents library is offered under Apache 2 license.

Metadata

Release files for aioevents-ng 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioevents-ng 0.0.9
File Size Uploaded
aioevents-ng-0.0.9.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioevents-ng 0.0.9
File Interpreter ABI Platform
aioevents_ng-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / aioevents-ng-0.0.9.tar.gz

Download URL aioevents-ng-0.0.9.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cb9f70c2f7aea6edcfcfbcdad664bb75e8e471cbd58b3557064fb78a78c8453c
BLAKE2b-256 checksum
How to use checksums
33a1aab0b98af5e3f450156a3259d95256592709ab6e6ab3e6dcddf58768abc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.1

Release files / aioevents_ng-0.0.9-py3-none-any.whl

Download URL aioevents_ng-0.0.9-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
624bd76ca199700d22b4bc1ea94186b0405a1dd6c9ea4e2744072cbec05047f1
BLAKE2b-256 checksum
How to use checksums
df6eb6d305781e80138e481b8a68a30f8396648d24d5b952a614fb9cb37d8e78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page