Skip to main content

asynchelper - Allows execution of unlimited number of asynchronous tasks while limiting the amount of active concurrent ones.

Project description

Latest PyPI version

Allows execution of unlimited number of asynchronous tasks while limiting the amount of active concurrent ones.

Usage

There are only two functions (for now):
  • asynchelper.TaskExecutor.map(task_generator: Iterable[callable], workers: Union(int, None) = 128)
    • task_generator can be any iterable which holds (or generates) coroutines.

    • workers is the maximum limit of active tasks concurrently. None for no limit.

    • This will keep pushing tasks in the iterable until it’s fully consumed.

  • asynchelper.TaskExecutor.forever(task: callable, args: Iterable = [], workers: Union(int, None) = 128)
    • task is an async funtion to create a couroutine from

    • args is an iterable of arguments to pass to task

    • workers is the maximum limit of active tasks concurrently. None for no limit

    • This will keep pushing the task(*args), running them forever with a limit of workers active tasks at any moment.


asynchelper was written by Mario Nascimento.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asynchelper-0.1.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

asynchelper-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file asynchelper-0.1.4.tar.gz.

File metadata

  • Download URL: asynchelper-0.1.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for asynchelper-0.1.4.tar.gz
Algorithm Hash digest
SHA256 45b3e4999c66c5e8aaa2b0b0a6238d01d107b44989e431f4f4066ef1524b1392
MD5 6c7c6e4839275a3cd3eb90b5e579c825
BLAKE2b-256 04917b4dc91d965b88f9ce85671180c128865987a49b54ed5bbb648174b1f0a1

See more details on using hashes here.

File details

Details for the file asynchelper-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for asynchelper-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e41e996afacaf6b0443fdfe193b543e939e2052788ec3abace0113ca7c6d7860
MD5 0678c489a156566ca582456bb3a068a6
BLAKE2b-256 30b5cceea34c3958b8283de0db8917d21563cbc4a28c3e7f30c8d73acead68df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page