Metadata-Version: 2.1
Name: quickpool
Version: 0.1.1
Summary: Use ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.
Project-URL: Homepage, https://github.com/matt-manes/quickpool
Project-URL: Documentation, https://github.com/matt-manes/quickpool/tree/main/docs
Project-URL: Source code, https://github.com/matt-manes/quickpool/tree/main/src/quickpool
Author-email: Matt Manes <mattmanes@pm.me>
License-File: LICENSE.txt
Keywords: concurrent,futures,multiprocess,multithread
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: noiftimer
Requires-Dist: printbuddies
Requires-Dist: pytest
Description-Content-Type: text/markdown

# quickpool

Use ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.

## Installation

Install with:

<pre>
pip install quickpool
</pre>

## Usage

<pre>
>>> import random
>>> import time
>>> import quickpool
>>> def naptime(base_duration: float, multiplier: float, return_val: int)->int:
...   time.sleep(base_duration * multiplier)
...   return return_val
...
>>> def demo():
...   iterations = 25
...   pool = quickpool.ThreadPool(
...   functions = [naptime] * iterations,
...   args_list = [(random.random() * 5, random.random()) for _ in range(iterations)],
...   kwargs_list = [{"return_val": i} for i in range(iterations)])
...   results = pool.execute()
...   print(results)
...
>>> demo()
runtime:2s [___________________________________________________________________]-100.00%
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
</pre>
