Parallelbar

Latest version: v2.4

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.3

- added `wrappers` module which contains decorators:
- `stopit_after_timeout` - stops the function execution after the specified time (in seconds)
- `add_progress` - adds a progress bar to the function execution, exception handling and timeout.
- added `return_failed_tasks` keyword parameter to the `progress_map/starmap/imap/imapu` function (default=`False`) - if `True` then the result will include the tasks that failed with an exception.

v1.2.0-stable
- Added `progress_starmap` function. An extension of the [`starmap`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.starmap) method of the `Pool` class.
- Improved documentation.

v.1.1.3
- The `bar_step` keyword argument is no longer used and will be removed in a future version.
- Added `need_serialize` boolean keyword argument to the **progress_map/imap/imapu** functions (default `False`). Requires [dill](https://pypi.org/project/dill/) to be installed. If `True` the target function is serialized using `dill` library. Thus, as a target function, you can now use lambda functions, class methods, and other callable objects that `pickle` cannot serialize.
- Added dynamic optimization of the progress bar refresh rate. This can significantly improve the performance of the **progress_map/imap/imapu** functions for very long iterables and a small execution time of one task by the objective function.
- The `"ignore"` value of the `error_behavior` keyword parameter is no longer supported.
- Default value of key parameter `error_behavior` changed to `"raise"`.
- The [pebble](https://github.com/noxdafox/pebble) module is no longer used.
- Added key parameter `executor` in the functions **progress_map/imap/imapu**. Must be one of the values:
`"threads"` - use thread pool
`"processes"` - use processes pool (default)
- The `core_progress` keyword argument was removed since version 1.0

0.3.0

Added `error_behavior` and `set_error_value` parameters to the **progress_map**, **progress_imap** and **progress_imapu** methods.


v0.2.15-stable


v0.2.14-stable


v0.2.13-stable
Added `initializer` and `initargs` keyword arguments to worker pools.

v0.2.10-stable
- The _process_timeout_ keyword argument has been added to the **progress_imap** and **progress_imapu** methods.
- The **stopit_after_timeout** decorator has been added to the **tools** module.
- Fixed a bug that caused the **progrees_imap** and **progress_imapu** methods to hang if _chunk_size_ > 1


v0.2.8-stable
Exception handling has been added to the progress_imap and progress_imapu methods.

0.2.6alpha

0.2.5alpha

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.