parvelo
A tiny utility for parallel map with a rich progress bar.
parvelo.parallel_map runs a function over an iterable using either a process
pool (CPU-bound work) or a thread pool (I/O-bound work), preserves input order,
and optionally renders a progress bar.
Install
Requires Python 3.13.
pip install parvelo
From source:
git clone https://github.com/h-ahl/parvelo.git
cd parvelo
uv sync --extra lint --group dev
Usage
import time
from parvelo import Backend, parallel_map
def square(x: int) -> int:
return x * x
def fetch(url: str) -> str:
time.sleep(0.05) # stand-in for network I/O
return url
# CPU-bound work across processes (default)
results = parallel_map(square, range(10))
# I/O-bound work across threads
urls = [f"https://example.com/{i}" for i in range(16)]
results = parallel_map(fetch, urls, backend=Backend.THREAD, n_workers=16)
# Run serially (handy for debugging), skipping executor overhead
results = parallel_map(square, range(10), n_workers=1)
Reusing or injecting your own executor
Pass an executor to reuse a caller-owned pool across calls instead of creating one
each time. Any object with a concurrent.futures-style map(func, *iterables, chunksize=1)
qualifies (matched by the ExecutorLike protocol), so a stdlib executor or a custom
wrapper around a ray/jax pool both work. When executor is provided, backend,
n_workers, and multiprocessing_context are ignored, and parvelo does not shut the
executor down (you own its lifecycle).
from concurrent.futures import ProcessPoolExecutor
from parvelo import parallel_map
def square(x: int) -> int:
return x * x
with ProcessPoolExecutor() as pool:
a = parallel_map(square, range(10), executor=pool)
b = parallel_map(square, range(10, 20), executor=pool) # pool reused, not recreated
Development
just setup # create the environment
just test # run the test suite
just lint # ruff check
just format # ruff format
just typecheck # ty check
just pre-commit # run all pre-commit hooks
Metadata
Release files for parvelo 0.3.1
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 |
|---|---|---|---|---|
| parvelo-0.3.1.tar.gz | 73.7 kB | With provenance | Details for parvelo-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| parvelo-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for parvelo-0.3.1-py3-none-any.whl |
Total release size: 78.0 kB
Release files / parvelo-0.3.1.tar.gz
| Download URL | parvelo-0.3.1.tar.gz |
|---|---|
| Size | 73.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33d60921073b7e75e922392f4e58000996d2df1b2d7aaf9389eedd3912d47666
|
|
BLAKE2b-256 checksum How to use checksums |
e5f2201cb2130ad85f778a5af4d20d63fa01b2196613d5193b432b01270a1edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logRelease files / parvelo-0.3.1-py3-none-any.whl
| Download URL | parvelo-0.3.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e002b222f8eecf4123cc5ce47af2c005762320557db3678d01ce1b1681d89beb
|
|
BLAKE2b-256 checksum How to use checksums |
e6b114546b6d24e7f79b727bd7d749aa23b33c3e789e0094af8c28b44dbc1cef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logSecurity for parvelo 0.3.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for parvelo-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logA 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.