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 details)
Built Distribution
File details
Details for the file arclet-letoderea-0.4.3.tar.gz
.
File metadata
- Download URL: arclet-letoderea-0.4.3.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.4.6 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b52807c4303ed40d460500e763c55faf904c4bf2e5dbb5f9dea2759e0932e1ae |
|
MD5 | 4424c09c83fc6c6e92d29ef31878bed5 |
|
BLAKE2b-256 | 1f47b84e866100c5fe58096fd2d4e1d8e035e00955158bd10e7fbc06937b2ea8 |
Provenance
File details
Details for the file arclet_letoderea-0.4.3-py3-none-any.whl
.
File metadata
- Download URL: arclet_letoderea-0.4.3-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.4.6 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aaed29d95bb0580d2ef751b966426e01482cd388472c91654514a23597bb036 |
|
MD5 | c6c05c5dd1e20d44f006a18705af8daf |
|
BLAKE2b-256 | a9925ae05b5f4249a7b0f0b57f4280d368cf2ef782b85a072503279deb6331d4 |