Skip to main content

Parallel map with an optional rich progress bar.

Project description

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

pip install parvelo

From source:

git clone https://github.com/h-ahl/parvelo.git
cd parvelo
uv sync --extra lint --group dev

Usage

from parvelo import Backend, parallel_map


def square(x: int) -> int:
    return x * x


# CPU-bound work across processes (default)
results = parallel_map(square, range(10))

# I/O-bound work across threads
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)

Development

just setup       # create the environment
just test        # run the test suite
just lint        # ruff check
just format      # ruff format
just pre-commit  # run all pre-commit hooks

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

parvelo-0.2.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parvelo-0.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file parvelo-0.2.0.tar.gz.

File metadata

  • Download URL: parvelo-0.2.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parvelo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3194f7d0246e2100d5b0a8ec049404e4c1d391a662b8413da84dc9bf6dcb84bb
MD5 929bd7e7beb6b7d2af0d748d6e79aec5
BLAKE2b-256 231d5cef23b1b2f8a9950a6cb4b74642f208bb8898783f8b8d239b9ae92e79ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for parvelo-0.2.0.tar.gz:

Publisher: release.yml on h-ahl/parvelo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parvelo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: parvelo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parvelo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 230675f2af8ecd599c9bd4f52ee7e9262d06b74d14beb97a859a709cf54d478c
MD5 93d94205d3e63b9be3dcf90b067cd384
BLAKE2b-256 84e76eb1ed535ab593ffde595f30a2836655d2b2cbf43c95066a82ff1c40361b

See more details on using hashes here.

Provenance

The following attestation bundles were made for parvelo-0.2.0-py3-none-any.whl:

Publisher: release.yml on h-ahl/parvelo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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