A high-performance, simple-structured event system, relies on asyncio
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(
str="I'm here!"
)
loop = asyncio.get_event_loop()
es = EventSystem(loop=loop)
@es.register(ExampleEvent)
async def test(this_str: str):
print(this_str)
async def main():
es.event_spread(ExampleEvent())
await asyncio.sleep(0.1)
loop.run_until_complete(main())
开源协议
本实现以 MIT 为开源协议。
Project details
Release history Release notifications | RSS feed
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.2.4.tar.gz
(10.0 kB
view details)
File details
Details for the file arclet-letoderea-0.2.4.tar.gz
.
File metadata
- Download URL: arclet-letoderea-0.2.4.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72049e42673176f93c05c8f26194ebb1a019c714145d8125d5b046630bebc941 |
|
MD5 | 562a922b0c8b8f3f736faca8cd543689 |
|
BLAKE2b-256 | dbb54207b80417bd0e6ec568e6f20adc9862e3dd08557bd10ae20cfa8ba02cf2 |