An eventbus that used for FinanGen
Project description
eventbus-py
EventBus的Python实现
Example
- 调用规范
由于设计时考虑到可能会存在多个实例的情况,故使用ContextVar来包装EventBus实例方便使用者调用。
from eventbus import bus, Subscribe class Example: pass class A: def __init__(self): bus.get().register(a) @Subscribe(priority=100, sticky=True) def on_example(self, event: Example): bus.get().cancel_delivery(event) bus.get().unregister(a) a = A() bus.get().post(a)
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
eventbus-py-0.0.3.tar.gz
(7.5 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
eventbus_py-0.0.3-py3.8.egg
(17.3 kB
view details)
File details
Details for the file eventbus-py-0.0.3.tar.gz.
File metadata
- Download URL: eventbus-py-0.0.3.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ccb114101aeef83424e3f8fd265b1870706f30f3ed2d4175e00d9e2f6c3c670
|
|
| MD5 |
5daec88bf46994b2aefe93116c1ce0f2
|
|
| BLAKE2b-256 |
7a63195b31e03eaaba359923ade99ed58cb2477df949c42052800272142d7bc7
|
File details
Details for the file eventbus_py-0.0.3-py3.8.egg.
File metadata
- Download URL: eventbus_py-0.0.3-py3.8.egg
- Upload date:
- Size: 17.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
136afd88cbd5b6e8e424bb02f2ff51589e70e3fd62db1e2bef331af514e407fd
|
|
| MD5 |
e0332c3843a56a654aa8c415b818dbca
|
|
| BLAKE2b-256 |
c8f19441107154d5ada9cc316d674fc9dcac44a42c4b491dd14e6734dc381807
|
File details
Details for the file eventbus_py-0.0.3-py3-none-any.whl.
File metadata
- Download URL: eventbus_py-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8d5126fdae49ca27e7e888567ce9d86f0b355c5783a3206c263dbcfbd37288
|
|
| MD5 |
79f33fba13c3bb435eab90286a8cd54d
|
|
| BLAKE2b-256 |
3f090e3294076e672621e5f509e70fc94239daf1228735099adb797101f94cb2
|