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
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.0.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file aio_pydispatch-0.1.0.tar.gz
.
File metadata
- Download URL: aio_pydispatch-0.1.0.tar.gz
- Upload date:
- Size: 3.1 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 | a03618bae6d8f8d3ab456d65c1f4d5ea0af51ddb572662616edc0a50410b239c |
|
MD5 | 6c3ed663c37c104826fa54e5ea3f2e81 |
|
BLAKE2b-256 | e92d882f82591c97b3d5c4af42cc96dd2a0196a04df0f3754d58f4cfb604d037 |
File details
Details for the file aio_pydispatch-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: aio_pydispatch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 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 | 7a5213ae38cd30cf5fcf025d1023e21ea2c537d12fa99cb0f81e6e58ff1c8e0c |
|
MD5 | b29225bf20d6f6fab2348577c4267500 |
|
BLAKE2b-256 | 03f8f9f4056f92d4cbcf09033e7adc7a3ec918aa40a5e58162d71b2366844d53 |