Socket
Socket
Sign inDemoInstall

pqdm

Package Overview
Dependencies
3
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pqdm

PQDM is a TQDM and concurrent futures wrapper to allow enjoyable paralellization of progress bars.


Maintainers
1

Readme

============= Parallel TQDM

.. image:: https://img.shields.io/pypi/v/pqdm.svg :target: https://pypi.python.org/pypi/pqdm

.. image:: https://readthedocs.org/projects/pqdm/badge/?version=latest :target: https://pqdm.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://pyup.io/repos/github/niedakh/pqdm/shield.svg :target: https://pyup.io/repos/github/niedakh/pqdm/ :alt: Updates

PQDM is a TQDM and concurrent futures wrapper to allow enjoyable paralellization of iterating through an Iterable with a progress bar.

Install & Use

To install ::

pip install pqdm

and use ::

from pqdm.processes import pqdm
# If you want threads instead:
# from pqdm.threads import pqdm

args = [1, 2, 3, 4, 5]
# args = range(1,6) would also work

def square(a):
    return a*a

result = pqdm(args, square, n_jobs=2)

For more examples variants check the Usage <https://pqdm.readthedocs.io/en/latest/usage.html>_ section of the docs.

Features

  • parellize your tqdm runs using processes or threads thanks to concurrent.futures,
  • just import pqdm from pqdm.threads or pqdm.processes to start,
  • automatic usage of tqdm.notebook when iPython/Jupyter notebook environment detected, custom tqdm class accepted
  • automatic parsing of pqdm kwargs and separating between concurrent.Executor args and tqdm args,
  • support for any iterable and passing items as kwargs, args or directly to function which is being applied
  • support bounded exectutors via https://github.com/mowshon/bounded_pool_executor

Credits

This package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage

======= History

0.2.0 (2022-02-14)

  • Adds exception handling
  • Allows using custom tqdm_class (like tqdm_discord)
  • Minor fixes

0.1.0 (2020-03-07)

  • Some updates in progress reporting and documentation.

0.0.1 (2020-03-05)

  • First release on PyPI.

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc