PQDM is a TQDM and concurrent futures wrapper designed to provide enjoyable parallelization of iterating through an Iterable with a progress bar. It supports both process-based and thread-based parallel execution and automatically integrates with `tqdm.notebook` in Jupyter environments. The current version is 0.2.0, with the last PyPI release in February 2022, suggesting a mature or slower development cadence.
pip install pqdmVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use `pqdm` to parallelize a simple CPU-bound task using 4 processes, displaying a TQDM progress bar. For I/O-bound tasks, `from pqdm.threads import pqdm` would be more appropriate.
Always explicitly import `pqdm` from either `pqdm.processes` or `pqdm.threads` based on the nature of your workload.
Review the 'Different ways to pass arguments to function' section in the documentation and set `argument_type='args'` or `argument_type='kwargs'` as needed.
Be aware of the project's update cadence. For critical bug fixes or new features, monitor the GitHub repository's commit history and issues page.
Run `pip install pqdm` in your terminal to install the library.
Install tqdm explicitly using `pip install tqdm`, or reinstall pqdm to ensure all dependencies are met: `pip install pqdm --force-reinstall`.
Ensure that the function and all data passed to `pqdm.processes` are picklable. Define functions at the top level of a module, avoid passing unpicklable object attributes, or consider using `pqdm.threads` if your task is I/O-bound or thread-safe shared memory is suitable.
Verify the structure of your `args` iterable and the `argument_type` parameter (e.g., `'args'` or `'kwargs'`) in your `pqdm` call. Ensure they are compatible with the function signature and the expected input format for `pqdm.processes`. If applicable, restructure your `args` to be a list of tuples or dictionaries as expected by your function.