# p_tqdm [![Build Status](https://travis-ci.org/swansonk14/p_tqdm.svg?branch=master)](https://travis-ci.org/swansonk14/p_tqdm) `p_tqdm` makes parallel processing with progress bars easy. `p_tqdm` is a wrapper around [pathos.multiprocessing](https://github.com/uqfoundation/pathos/blob/master/pathos/multiprocessing.py) and [tqdm](https://github.com/tqdm/tqdm). Unlike Python's default multiprocessing library, pathos provides a more flexible parallel map which can apply almost any type of function --- including lambda functions, nested functions, and class methods --- and can easily handle functions with multiple arguments. tqdm is applied on top of pathos's parallel map and displays a progress bar including an estimated time to completion. ## Installation ```pip install p_tqdm``` `p_tqdm` works with Python versions 2.7, 3.4, 3.5, 3.6. ## Example Let's say you want to add two lists element by element. Without any parallelism, this can be done easily with a Python `map`. ```python l1 = ['1', '2', '3'] l2 = ['a', 'b', 'c'] def add(a, b): return a + b added = map(add, l1, l2) # added == ['1a', '2b', '3c'] ``` But if the lists are much larger or the computation is more intense, parallelism becomes a necessity. However, the syntax is often cumbersome. `p_tqdm` makes it easy and adds a progress bar too. ```python from p_tqdm import p_map added = p_map(add, l1, l2) # added == ['1a', '2b', '3c'] ``` ``` 0%| | 0/3 [00:00