{"id":6413,"library":"pqdm","title":"PQDM - Parallel TQDM","description":"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.","status":"active","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/niedakh/pqdm","tags":["parallel-processing","tqdm","progress-bar","concurrent-futures","multiprocessing","multithreading"],"install":[{"cmd":"pip install pqdm","lang":"bash","label":"Install stable release"}],"dependencies":[{"reason":"Core dependency for progress bar functionality.","package":"tqdm"},{"reason":"Provides bounded executor variants for process and thread pools.","package":"bounded-pool-executor"},{"reason":"Used for compatibility with newer typing features in older Python versions.","package":"typing-extensions"}],"imports":[{"note":"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.","wrong":"from pqdm import pqdm","symbol":"pqdm","correct":"from pqdm.processes import pqdm"}],"quickstart":{"code":"from pqdm.processes import pqdm\nimport time\n\ndef long_running_task(number):\n    time.sleep(0.1) # Simulate work\n    return number * number\n\nitems = list(range(1, 101))\n\n# Parallelize the task with 4 processes and a progress bar\nresults = pqdm(items, long_running_task, n_jobs=4, desc=\"Processing numbers\")\n\nprint(f\"First 5 results: {results[:5]}\")","lang":"python","description":"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."},"warnings":[{"fix":"Always explicitly import `pqdm` from either `pqdm.processes` or `pqdm.threads` based on the nature of your workload.","message":"Choosing 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.","severity":"gotcha","affected_versions":"0.1.0 - 0.2.0"},{"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.","message":"When 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}]`).","severity":"gotcha","affected_versions":"0.1.0 - 0.2.0"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.2.0':50 '2022':58 'automat':39 'bar':25,72 'base':31,35 'cadenc':65 'concurr':9,74 'concurrent-futur':73 'current':47 'design':12 'develop':64 'enjoy':15 'environ':45 'execut':37 'februari':57 'futur':10,75 'integr':40 'iter':18,21 'jupyt':44 'last':53 'matur':61 'multiprocess':76 'multithread':77 'parallel':2,16,36,67 'parallel-process':66 'pqdm':1,4 'process':30,68 'process-bas':29 'progress':24,71 'progress-bar':70 'provid':14 'pypi':54 'releas':55 'slower':63 'suggest':59 'support':27 'thread':34 'thread-bas':33 'tqdm':3,7,69 'tqdm.notebook':42 'version':48 'wrapper':11","created_at":"2026-04-15T05:36:14.009224+00:00","updated_at":"2026-04-16T18:07:52.407223+00:00","problems":[{"fix":"Run `pip install pqdm` in your terminal to install the library.","cause":"The 'pqdm' library is not installed in the current Python environment, or the environment is not correctly activated.","error":"ModuleNotFoundError: No module named 'pqdm'"},{"fix":"Install tqdm explicitly using `pip install tqdm`, or reinstall pqdm to ensure all dependencies are met: `pip install pqdm --force-reinstall`.","cause":"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.","error":"ModuleNotFoundError: No module named 'tqdm'"},{"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.","cause":"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).","error":"TypeError: cannot pickle '_thread.RLock' 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.","cause":"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.","error":"pqdm.processes 'AttributeError' object is not iterable while it works with pdqm.threads"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.2.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/niedakh/pqdm","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pqdm/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","observability","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}