Registry / data / pqdm
library0.2.0pypypi✓ verified 89d ago

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 pqdm
INSTALL
IMPORT
SIG · PQDM
P
pqdm
datapythonv0.2.0
Install
1.7s avg
Import
365ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.393s · 18.7MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 1.7s · import 0.337s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pqdm
✓ from pqdm.processes import pqdm
✗ from pqdm import pqdm
Users must explicitly import from `pqdm.processes` for multiprocessing or `pqdm.threads` for multithreading, depending on their use case. The top-level `pqdm` module does not directly expose the callable.

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.

from pqdm.processes import pqdm import time def long_running_task(number): time.sleep(0.1) # Simulate work return number * number items = list(range(1, 101)) # Parallelize the task with 4 processes and a progress bar results = pqdm(items, long_running_task, n_jobs=4, desc="Processing numbers") print(f"First 5 results: {results[:5]}")
Debug
Known issues
gotchaChoosing the correct backend (processes vs. threads) is crucial for optimal performance. Use `from pqdm.processes import pqdm` for CPU-bound tasks and `from pqdm.threads import pqdm` for I/O-bound tasks. Incorrect selection can lead to suboptimal performance, e.g., using threads for CPU-bound tasks in Python due to the GIL.
fix
Always explicitly import `pqdm` from either `pqdm.processes` or `pqdm.threads` based on the nature of your workload.
affects: 0.1.0 - 0.2.0
gotchaWhen passing arguments to the target function, `pqdm` defaults to passing iterable elements directly. For functions expecting multiple positional arguments or keyword arguments, you must specify the `argument_type` parameter (e.g., `'args'` for `func(a, b)` with iterable `[[a1, b1], [a2, b2]]` or `'kwargs'` for `func(a=x, b=y)` with iterable `[{'a': x1, 'b': y1}, {'a': x2, 'b': y2}]`).
fix
Review the 'Different ways to pass arguments to function' section in the documentation and set `argument_type='args'` or `argument_type='kwargs'` as needed.
affects: 0.1.0 - 0.2.0
gotchaThe latest PyPI release (v0.2.0) for `pqdm` was in February 2022. While the library is functional, this suggests a slower or potentially maintenance-focused development cycle. Users seeking actively developed or frequently updated features might want to check the GitHub repository directly for the latest commits or consider alternative libraries if frequent updates are a requirement.
fix
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.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pqdm'
The 'pqdm' library is not installed in the current Python environment, or the environment is not correctly activated.
fix
Run `pip install pqdm` in your terminal to install the library.
ModuleNotFoundError: No module named 'tqdm'
The 'tqdm' library, a core dependency of pqdm, is missing from your Python environment. Although pqdm usually installs tqdm automatically, environmental issues or partial installations can lead to this.
fix
Install tqdm explicitly using `pip install tqdm`, or reinstall pqdm to ensure all dependencies are met: `pip install pqdm --force-reinstall`.
TypeError: cannot pickle '_thread.RLock' object
This error commonly occurs when using `pqdm.processes` (which relies on Python's `multiprocessing` module) because the function being parallelized, or objects it depends on, contain unpicklable elements like `_thread.RLock` objects (often found within class instances, closures, or complex library objects).
fix
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.
pqdm.processes 'AttributeError' object is not iterable while it works with pdqm.threads
This indicates a mismatch in how `pqdm.processes` expects to handle the input iterable or the callable function's arguments compared to `pqdm.threads`. It often happens when the input `args` are not correctly formatted or the `argument_type` parameter is misconfigured for process-based execution, leading `pqdm.processes` to incorrectly try to iterate over a non-iterable object.
fix
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.
Upgrade
Version history
0.2.0latest on PyPI · released Feb 14, 2022
Audit
Dependencies
tqdmrequiredCore dependency for progress bar functionality.
bounded-pool-executorrequiredProvides bounded executor variants for process and thread pools.
typing-extensionsrequiredUsed for compatibility with newer typing features in older Python versions.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
2
Amazon
1
Resources
pqdm — pip install pqdm · libregistry