asyncio pydipatch (Signal Manager)
Project description
aio_pydispatch
Asyncio pydispatch (Signal Manager)
This is based on pyDispatcher reference scrapy SignalManager implementation on Asyncio
Usage
Like the situation often encountered on the web
Init some signals and a signal manager
import asyncio
from aio_pydispatch import Signal
server_start = Signal('server_start')
server_stop = Signal('server_stop')
def ppp(value: str) -> None:
print(value)
async def main():
server_start.connect(ppp)
server_stop.connect(ppp)
await server_start.send('server start')
await asyncio.sleep(1)
await server_stop.send('server stop')
if __name__ == '__main__':
asyncio.run(main())
Similar design
sync
async
Others
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
aio_pydispatch-0.1.2.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file aio_pydispatch-0.1.2.tar.gz
.
File metadata
- Download URL: aio_pydispatch-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad655aa87fd2a9e767173c0097ec2b8af179b82503538f5a7ec6c25cd3c57d5b |
|
MD5 | 89bc0aac1b586cef7539851c63c1ded2 |
|
BLAKE2b-256 | 207804cb489662ab65037a144cd47a2731ea66adaeb063e7fee7098a383afcbd |
File details
Details for the file aio_pydispatch-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: aio_pydispatch-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f868128412b827dc1d7dfc7e599391cd0c90e5ae027144e57783d72c5c9127e6 |
|
MD5 | a2d2f727fdce7816f6f0ba7c39089c60 |
|
BLAKE2b-256 | 40ecb19cacf42f925338acbf7206f152aaa02db896d6eca6aada06a9ca679d38 |