--- id: mpire version: "2.10.2" license: MIT license_treatment: permissive maintenance: dormant --- # mpire — A Python package for easy multiprocessing, but faster than multiprocessing License: permissive · Maintenance: dormant · Downloads: 4.3M/mo ## What it is and what it does MPIRE is a multiprocessing library that wraps Python's standard multiprocessing.Pool with a more convenient API and additional features. It offers map-like functions (map, imap, apply, apply_async) similar to the standard library but combines them with copy-on-write shared objects, worker state management, progress bar integration via tqdm, and automatic task chunking. The package is designed to reduce boilerplate for parallel tasks without requiring users to learn a completely new multiprocessing syntax. The library supports worker initialization and exit functions, timeouts, graceful exception handling, worker insights for profiling efficiency, and nested worker pools. It integrates with tqdm for progress tracking and can optionally use dill for serialization to handle more complex objects like lambdas in Jupyter notebooks. Runtime dependencies include tqdm for progress bars, pygments for syntax highlighting, pywin32 for Windows support, and importlib-resources for resource access. Use it for: - Parallelize CPU-bound tasks like batch processing across multiple workers with a progress bar. - Load a large model or dataset once per worker during initialization, then reuse it across many tasks without serialization overhead. - Profile multiprocessing efficiency by enabling worker insights to diagnose bottlenecks in startup, waiting, and working time. - Run embarrassingly parallel tasks with automatic task chunking to speed up processing of small task queues. - Parallelize lambdas and complex objects in Jupyter notebooks by enabling dill serialization through the multiprocess backend. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. MPIRE provides a faster, more feature-rich alternative to Python's standard multiprocessing.Pool, with an API designed for easy parallelization of embarrassingly parallel tasks. Yes, if you need multiprocessing with a gentler learning curve and built-in progress tracking. The low install friction, permissive MIT license, and feature set (worker state, progress bars, insights) make it a solid drop-in replacement for multiprocessing.Pool. Caveat: maintenance is dormant (last release 2024-05-07), so consider your tolerance for slow bug fixes or compatibility updates. ## Install pip install mpire uv add mpire poetry add mpire ## Installing mpire Before you install: Low friction install with 4 runtime dependencies (pygments, tqdm, pywin32, importlib-resources). Maintenance is dormant—last release was 2024-05-07—but the repository remains active with 2066 stars and no archived status. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute MPIRE freely as long as you include the license notice. Quickstart: pip install mpire from mpire import WorkerPool def task(x): return x * 2 with WorkerPool(n_jobs=4) as pool: results = pool.map(task, range(10)) Verify before relying: - Whether dormant maintenance status affects bug-fix responsiveness or compatibility with newer Python versions. - Performance gains claimed in the description relative to multiprocessing.Pool under typical workloads. - Whether Windows and macOS caveats documented in the Troubleshooting section materially affect usability on those platforms. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 4.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags multiprocessing pool alternative, parallel task execution python, worker pool with progress bar, shared objects multiprocessing, worker state initialization, fast multiprocessing library, task chunking parallelization, parallel-execution, worker-pool, progress-tracking [View on SkillFed](https://skillfed.io/packages/mpire) · [View on PyPI](https://pypi.org/project/mpire/)