CheeseSignal
一款简单的信号系统。
示例
基础用法
from CheeseSignal import Signal
signal = Signal()
def handle_1():
print('Handler 1 executed')
signal.connect(handle_1)
@signal.connect()
def handle_2():
print('Handler 2 executed')
if __name__ == '__main__':
signal.send()
异步用法
import asyncio
from CheeseSignal import Signal
signal = Signal()
async def handle_1():
print('Handler 1 executed')
signal.connect(handle_1)
@signal.connect()
async def handle_2():
print('Handler 2 executed')
if __name__ == '__main__':
asyncio.run(signal.async_send())
期望接收数与自动删除
from CheeseSignal import Signal
signal = Signal()
@signal.connect(receive_num_expected = 3)
def handle_1():
print('Handler 1 executed')
@signal.connect(receive_num_expected = 3, auto_remove = True)
def handle_2():
print('Handler 2 executed')
if __name__ == '__main__':
for i in range(5):
signal.send()
print(list(signal.receivers.keys()))
更多...
1. Signal
2. Receiver
Metadata
Release files for CheeseSignal 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cheesesignal-2.1.1.tar.gz | 4.3 kB | Without provenance | Details for cheesesignal-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cheesesignal-2.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for cheesesignal-2.1.1-py2.py3-none-any.whl |
Total release size: 9.6 kB
Release files / cheesesignal-2.1.1.tar.gz
| Download URL | cheesesignal-2.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00a9e651ddb9feaa91ec61e22508d6d54fb2d3c14789df0d1acba7e787b718e4
|
|
BLAKE2b-256 checksum How to use checksums |
a9722d94536782fc62c0b50fa8be592256e261712317b59834a2df5bca7a71c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / cheesesignal-2.1.1-py2.py3-none-any.whl
| Download URL | cheesesignal-2.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5c6993586ba8087c7c4fdc9e8bc5e4eba66d0fdef9f6f7f709972deaa05f3d5c
|
|
BLAKE2b-256 checksum How to use checksums |
a66538627a9258a48a779731a1483720d68c58415c74af67b13bd9813c24736d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for CheeseSignal 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.