Skip to main content

philiprehberger-progress-map

Tests PyPI version Last updated

Parallel map with a built-in terminal progress bar.

Installation

pip install philiprehberger-progress-map

Usage

from philiprehberger_progress_map import pmap

def process(x):
    return x * 2

results = pmap(process, range(100))

Use multiprocessing instead of threading:

results = pmap(process, range(100), mp=True, workers=8)

Customize the progress display:

results = pmap(process, items, label="Processing", show_progress=True)

API

pmap(func, items, *, workers=4, mp=False, label="", show_progress=True)

Parameter Type Default Description
func Callable[[T], R] — Function to apply to each item
items Iterable[T] — Iterable of items to process
workers int 4 Number of worker threads or processes
mp bool False Use multiprocessing instead of threading
label str "" Optional label prefix for the progress bar
show_progress bool True Whether to display the progress bar

Returns: list[R] — Results in the same order as the input items.

Development

pip install -e .
python -m pytest tests/ -v

Support

If you find this project useful:

⭐ Star the repo

🐛 Report issues

💡 Suggest features

❤️ Sponsor development

🌐 All Open Source Projects

💻 GitHub Profile

🔗 LinkedIn Profile

License

MIT

Metadata

Release files for philiprehberger-progress-map 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for philiprehberger-progress-map 0.1.6
File Size Uploaded Provenance Actions
philiprehberger_progress_map-0.1.6.tar.gz 5.4 kB Without provenance Details for philiprehberger_progress_map-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for philiprehberger-progress-map 0.1.6
File Interpreter ABI Platform Actions
philiprehberger_progress_map-0.1.6-py3-none-any.whl Python 3 none any Details for philiprehberger_progress_map-0.1.6-py3-none-any.whl

Total release size: 9.8 kB

Release files / philiprehberger_progress_map-0.1.6.tar.gz

Download URL philiprehberger_progress_map-0.1.6.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2c9fdc7438cec58819c5822e55c0aaebb9825bec60ba6252385ed8e05c779f95
BLAKE2b-256 checksum
How to use checksums
ff584997ecfb7e065a34a4b8b3c40865d9c90845b10796cfe70aac273098eacb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / philiprehberger_progress_map-0.1.6-py3-none-any.whl

Download URL philiprehberger_progress_map-0.1.6-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fab22f6202f6ec7e37d1e3e3c387713b7cf5e94e35777d03ad476e269e270fe4
BLAKE2b-256 checksum
How to use checksums
8e1514115e5e97e03c81a9b508584fa98c2f7de75c04ef87733c03604223a86e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for philiprehberger-progress-map 0.1.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page