simple tools
Project description
version: 0.0.1
status: dev
author: huangsizhe
email: hsz1273327@gmail.com
Desc
Tools for creating asynchronous scripts easily.
keywords: tools,asyncio
Feature
Task pool
Actor and Actor Manager
Example
async with AioFixedTaskPoolSimple() as task_pool:
print(f"test pool size {task_pool.size}")
print("test 4 task with pool size 3")
await asyncio.gather(
task_pool.submit(test, func_args=["c"]),
task_pool.submit(test, func_args=["b"]),
task_pool.submit(test, func_args=["a"]),
task_pool.submit(test, func_args=["d"])
)
class Pinger(AioActor):
async def receive(self, message):
print(message)
try:
await ActorManager.get_actor("Ponger").Send('ping')
except Exception as e:
print(f"receive run error {e}")
finally:
await asyncio.sleep(0.5)
Install
python -m pip install aio_parallel_tools
Document
Change Log
version 0.0.1
created this project
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_parallel_tools-0.0.1.tar.gz
(17.2 kB
view hashes)
Built Distribution
Close
Hashes for aio_parallel_tools-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98f63f56ad423efa84f49e2bd7da8ce974227f87683f3ede8c333437ce1082b1 |
|
MD5 | e696f91e417594e69989eb2e2d53f814 |
|
BLAKE2b-256 | 793293d4c5461e4cb9c8f147c2936c32c392a29e920ef59eb4991c23db4f7fba |