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.3.tar.gz
(15.2 kB
view hashes)
Built Distribution
Close
Hashes for arclet_letoderea-0.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aaed29d95bb0580d2ef751b966426e01482cd388472c91654514a23597bb036 |
|
MD5 | c6c05c5dd1e20d44f006a18705af8daf |
|
BLAKE2b-256 | a9925ae05b5f4249a7b0f0b57f4280d368cf2ef782b85a072503279deb6331d4 |