{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: User Interfaces", "Topic :: Software Development :: Widget Sets", "Topic :: Utilities" ], "description": "Progress Reporter\n=================\n\nThis library provides a simple interface to register different workloads and\nvisualize their progress with either a plain text progress bar or a jupyter\nwidget, depending on the current environment.\n\nIt optionally depends on Jupyter widgets to draw nice progress bars in the interactive\nJupyter notebook environment.\n\nInstallation\n------------\n\nwith pip::\n\n pip install progress_reporter\n\nIf you use IPython/Jupyter, you are strongly encourage to also install the jupyter widgets::\n\n pip install ipywidgets\n\n\nExamples\n--------\n\nImage you have a class doing some heavy calculations, which are split into several\njobs/tasks/threads etc.\n\nIn order to visualize the progress, one just needs to derive the worker class from\nprogress_reporter.ProgressReporter and invoke the **_progress_register** method\nto tell the reporter how many pieces of work have to be done. Then the reporter\nis instructed by **_progress_update(n)** how many of pieces of work have been\ndispatched.\n\nNote that these are \"private\" to use this class as a mixin class and not polute the\npublic interface.\n\n.. code:: python\n\n from progress_reporter import ProgressReporter\n import time\n\n class ExampleWorker(ProgressReporter):\n def __init__(self, n_jobs=100):\n self.n_jobs = n_jobs\n \"\"\" register the amount of work with the given description \"\"\"\n self._progress_register(n_jobs, description='Dispatching jobs')\n\n def work(self):\n \"\"\" do some fake work (sleep) and update the progress via the reporter\n \"\"\"\n for job in (lambda: time.sleep(0.1) for _ in range(self.n_jobs)):\n job()\n # indicate we've finished one job, to update the progress bar\n self._progress_update(1)\n\n\nIt also supports multi-stage sequential work loads by setting the parameter **stage**.\nThis is just the dictionary key to the underlying process:\n\n.. code:: python\n\n class MultiStageWorker(ProgressReporter):\n def __init__(self, n_jobs_init, n_jobs):\n self.n_jobs_init = n_jobs_init\n self.n_jobs = n_jobs\n \"\"\" register an expensive initialization routine \"\"\"\n self._progress_register(self.n_jobs_init, description='initializing', stage=0)\n \"\"\" register the main computation \"\"\"\n self._progress_register(self.n_jobs, description='main computation', stage=1)\n\n def work(self):\n \"\"\" do the initialization \"\"\"\n for job in (lambda: time.sleep(0.1) for _ in range(self.n_jobs_init)):\n job()\n self._progress_update(1, stage=0)\n\n \"\"\" perform the next stage of the algorithm \"\"\"\n for job in (lambda: time.sleep(0.2) for _ in range(self.n_jobs)):\n job()\n self._progress_update(1, stage=1)\n\nSince version 2.0 there is also a version of the this class suitable for compositions.\n\n.. code:: python\n\n from progress_reporter import ProgressReporter_\n\n class Estimator(object):\n def fit(self, X, y=None):\n pg = ProgressReporter_()\n pg.register(100, description='work')\n with pg.context(): # ensure progress bars are closed if an exception occurs.\n pg.update(50)\n # ...", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marscher/progress_reporter", "keywords": "progress,reporting,eta,gui", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "progress-reporter", "package_url": "https://pypi.org/project/progress-reporter/", "platform": "", "project_url": "https://pypi.org/project/progress-reporter/", "project_urls": { "Homepage": "https://github.com/marscher/progress_reporter" }, "release_url": "https://pypi.org/project/progress-reporter/2.0/", "requires_dist": null, "requires_python": "", "summary": "", "version": "2.0" }, "last_serial": 4555460, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "9f5d04d3bd96c523b3df5fc8e66cc715", "sha256": "84c7a921127837665b1b2fdd0fa292549758e3f1e507a05b031eee96c7921ea5" }, "downloads": -1, "filename": "progress-reporter-1.1.zip", "has_sig": false, "md5_digest": "9f5d04d3bd96c523b3df5fc8e66cc715", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34022, "upload_time": "2016-08-12T10:39:13", "url": "https://files.pythonhosted.org/packages/c9/8c/5433d7ba09220a5c746593fbe87e67b97aa536eaf41fad424dda203a46fd/progress-reporter-1.1.zip" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "d1eb869f1838b440ccbf0292bbdaa517", "sha256": "85c2643cc1f8b6c5179f7ca2a51c3b8540d59175db8f8b29676e212ef06e223a" }, "downloads": -1, "filename": "progress-reporter-1.2.tar.gz", "has_sig": false, "md5_digest": "d1eb869f1838b440ccbf0292bbdaa517", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28892, "upload_time": "2016-08-12T12:28:54", "url": "https://files.pythonhosted.org/packages/47/59/0ffdcdd10e897765af584a785442bf1304442e1cd4a5d6cf247e0d32af6d/progress-reporter-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "c4ab72c67779dae14062d59cdbb83dd9", "sha256": "8884e81c47bae120a8543f7ce42296182115e495ab7666c69ad1f389ff78f9b8" }, "downloads": -1, "filename": "progress-reporter-1.3.tar.gz", "has_sig": false, "md5_digest": "c4ab72c67779dae14062d59cdbb83dd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31031, "upload_time": "2016-12-12T17:47:48", "url": "https://files.pythonhosted.org/packages/d1/c4/4d310a25fe60d75e7273844c13d9389531b81d348d5084769d9262e791be/progress-reporter-1.3.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "72694a431edc01473bec912049077f41", "sha256": "bafc84941264f7abccc233cf10a9f33483175b1a00ae13e843ca0ae21f5d46a9" }, "downloads": -1, "filename": "progress-reporter-1.3.1.tar.gz", "has_sig": false, "md5_digest": "72694a431edc01473bec912049077f41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31000, "upload_time": "2016-12-13T15:22:56", "url": "https://files.pythonhosted.org/packages/f8/77/19d28caec1c6f6b0d2f0b19320e590ce7ce565457c96036a93c2ba9aad85/progress-reporter-1.3.1.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "d48f732220e8e88cf6850c2d64f89a15", "sha256": "59430a9f4c8f9f3d80259b439ae0e9021bca8d05ecb940f02187915c04acdd48" }, "downloads": -1, "filename": "progress-reporter-1.4.tar.gz", "has_sig": false, "md5_digest": "d48f732220e8e88cf6850c2d64f89a15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26528, "upload_time": "2017-12-04T23:07:07", "url": "https://files.pythonhosted.org/packages/0a/31/584a2f4ca7be5511825fb8c7689e2b47a4dfa9dadbaeb2578e8c62eec414/progress-reporter-1.4.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "ba835f65cd0bb8292ed63c2b0603546c", "sha256": "9c0d87218bc4b963a576850b95ecb1201a445cd4a097ba7d58f78c581136b415" }, "downloads": -1, "filename": "progress-reporter-1.4.1.tar.gz", "has_sig": false, "md5_digest": "ba835f65cd0bb8292ed63c2b0603546c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25758, "upload_time": "2018-04-20T14:03:39", "url": "https://files.pythonhosted.org/packages/f8/c9/ddd9346ee08e51e502257e1bf11975915e04feca5ec71d384c91094a6f43/progress-reporter-1.4.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "12a9206f61d36ec473956590d3a375ee", "sha256": "3268b3281f06894643073dae5205e41e2a3b3811b7a3c34e39ece8b4107e9a7b" }, "downloads": -1, "filename": "progress-reporter-2.0.tar.gz", "has_sig": false, "md5_digest": "12a9206f61d36ec473956590d3a375ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48981, "upload_time": "2018-12-03T12:02:04", "url": "https://files.pythonhosted.org/packages/aa/1f/e2b16e98bc70a5a15d7df9ea2559d74ca037bf1c572387308111eaaad20b/progress-reporter-2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12a9206f61d36ec473956590d3a375ee", "sha256": "3268b3281f06894643073dae5205e41e2a3b3811b7a3c34e39ece8b4107e9a7b" }, "downloads": -1, "filename": "progress-reporter-2.0.tar.gz", "has_sig": false, "md5_digest": "12a9206f61d36ec473956590d3a375ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48981, "upload_time": "2018-12-03T12:02:04", "url": "https://files.pythonhosted.org/packages/aa/1f/e2b16e98bc70a5a15d7df9ea2559d74ca037bf1c572387308111eaaad20b/progress-reporter-2.0.tar.gz" } ] }