quickpool
Use ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.
Installation
Install with:
pip install quickpool
Usage
>>> 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()
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 3s
[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]
Metadata
Release files for quickpool 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickpool-2.2.0.tar.gz | 5.4 kB | Without provenance | Details for quickpool-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickpool-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for quickpool-2.2.0-py3-none-any.whl |
Total release size: 11.5 kB
Release files / quickpool-2.2.0.tar.gz
| Download URL | quickpool-2.2.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9960b84c5d9b2308dd0e9ec4f556669d0e7ea0a4f5a4fc92ef612f4e2ed5802
|
|
BLAKE2b-256 checksum How to use checksums |
0cccc75e3070578f6c895c9183333ed05cdfefb6f98e6e523f56e5288f58fb19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Release files / quickpool-2.2.0-py3-none-any.whl
| Download URL | quickpool-2.2.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d08c0580dc0bb149b8b31162aa519a2c3d71b08bd613bb77574cce86055fa95d
|
|
BLAKE2b-256 checksum How to use checksums |
09eb67bad1b6c49e4b67dbe14d89ef19a871c71fde75270792c077a8e7c61b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Security for quickpool 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.