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.1.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file aio_pydispatch-0.1.1.tar.gz
.
File metadata
- Download URL: aio_pydispatch-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 443441a415921ddf3c7656f4ec174623a9fd6270b2d7d46b64d5f5ad9424f402 |
|
MD5 | 131ebb2d69a57d6995e03cff8d7e875d |
|
BLAKE2b-256 | 78e8b6259835640de05599407a1aae97267d2fe71ea14fdfda39e40421d53a88 |
File details
Details for the file aio_pydispatch-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aio_pydispatch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48430779b079123f3c4ba7eacd9372f0d66c0ca268f97f0dc11fb17c59d100cc |
|
MD5 | beda075024cc403c07688dc1119ca3bd |
|
BLAKE2b-256 | 17f110ce5116d94ed571d095f04a5a8b455bdb531928b3a6a3927c470cb370ce |