A high-performance, simple-structured event system, relies on asyncio
Project description
Letoderea
一个高性能,结构简洁,依赖于 Python内置库asyncio
的事件系统, 设计灵感来自Graia BroadcastControl
。
项目仍处于开发阶段,部分内容可能会有较大改变
安装
从 PyPI 安装
pip install arclet-letoderea
样例
from arclet.letoderea import EventSystem, Contexts
es = EventSystem()
class TestEvent:
async def gather(self, context: Contexts):
context["name"] = "Letoderea"
@es.register(TestEvent)
async def test_subscriber(name: str):
print(name)
es.loop.run_until_complete(es.publish(TestEvent()))
开源协议
本实现以 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.4.4.tar.gz
(15.3 kB
view hashes)
Built Distribution
Close
Hashes for arclet_letoderea-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e95d010c39ac3861d36c806d2f71eaf8d96c14dfbd656acaca5d918fb60ce2c6 |
|
MD5 | 8e246c8a9d9445c7b9a56e6dd62e5aac |
|
BLAKE2b-256 | 538fc70c161509eb7c93f6c2c52aa02563de32135f350243a548ab8e26c8ad4a |