Skip to main content

A high-performance, simple-structured event system, relies on asyncio

Reason this release was yanked:

bug

Project description

一个高性能,结构简洁,依赖于 Python内置库asyncio 的事件系统, 设计灵感来自`Graia BroadcastControl <https://github.com/GraiaProject/BroadcastControl>`__。

项目仍处于开发阶段,部分内容可能会有较大改变 ## 安装 ### 从 PyPI 安装

pip install arclet-letoderea

样例

import asyncio
from arclet.letoderea import EventSystem
from arclet.letoderea.entities.event import TemplateEvent

class ExampleEvent(TemplateEvent):
def get_params(self):
    return self.param_export(
        msg="I'm here!"
    )

loop = asyncio.get_event_loop()
es = EventSystem(loop=loop)
@es.register(ExampleEvent)
async def test(msg: str):
    print(msg)

async def main():
    es.event_publish(ExampleEvent())
    await asyncio.sleep(0.1)
loop.run_until_complete(main())

开源协议

本实现以 MIT 为开源协议。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arclet-letoderea-0.3.0.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file arclet-letoderea-0.3.0.tar.gz.

File metadata

  • Download URL: arclet-letoderea-0.3.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.8

File hashes

Hashes for arclet-letoderea-0.3.0.tar.gz
Algorithm Hash digest
SHA256 afa8c1efef86f1ea99fac9a7ad15638544631ea3837f6462643a3363e424c814
MD5 887951267a175cf7cd71cc1efad42524
BLAKE2b-256 1d3bbb5c7db1919f67f4f01bde3ff5dd78db7572e7aa2f29df023b35e0a381f9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page