skillfed

mpire

A Python package for easy multiprocessing, but faster than multiprocessing

mpire v2.10.2 4.3M downloads/30d#2,339 on PyPI2,066
Permissive license MIT DORMANT released

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 on this page — 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

mpire on PyPI

pip

pip install mpire

uv

uv add mpire

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — pygments, tqdm, pywin32, importlib-resources
Maintenance dormant — 829 days since the last release
Last repo commit
First released
Downloads 4,303,676/month — #2,339 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mpire-2.10.2-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

multiprocessing pool alternativeparallel task execution pythonworker pool with progress barshared objects multiprocessingworker state initializationfast multiprocessing librarytask chunking parallelization
parallel-executionworker-poolprogress-tracking

More Software Development packages