{ "info": { "author": "@Robpol86", "author_email": "robpol86@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "etaprogress\n===========\n\nDraw progress bars with room for colors and display rates and ETAs in your console applications. ETA library is its own\nclass so it may be used in other non-console applications. ETAs calculated with simple linear regression.\n\nThis library supports both defined and undefined progress bars. Undefined progress bars are those that do not have a\n\"total size\". Similar to when wget downloads a file with an unknown file size. Due to this, undefined progress bars\nhave no percent and no ETA. Defined progress bars are the usual progress bars with percentages and ETAs.\n\n* Python 2.6, 2.7, 3.3, and 3.4 supported on Linux and OS X.\n* Python 2.7, 3.3, and 3.4 supported on Windows (both 32 and 64 bit versions of Python).\n\nTested on Windows XP and Windows 10 technical preview.\n\n.. image:: https://img.shields.io/appveyor/ci/Robpol86/etaprogress.svg?style=flat-square\n :target: https://ci.appveyor.com/project/Robpol86/etaprogress\n :alt: Build Status Windows\n\n.. image:: https://img.shields.io/travis/Robpol86/etaprogress/master.svg?style=flat-square\n :target: https://travis-ci.org/Robpol86/etaprogress\n :alt: Build Status\n\n.. image:: https://img.shields.io/codecov/c/github/Robpol86/etaprogress/master.svg?style=flat-square\n :target: https://codecov.io/github/Robpol86/etaprogress\n :alt: Coverage Status\n\n.. image:: https://img.shields.io/pypi/v/etaprogress.svg?style=flat-square\n :target: https://pypi.python.org/pypi/etaprogress/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/dm/etaprogress.svg?style=flat-square\n :target: https://pypi.python.org/pypi/etaprogress/\n :alt: Downloads\n\nQuickstart\n----------\n\nInstall:\n\n.. code:: bash\n\n pip install etaprogress\n\n\nExample Implementations\n-----------------------\n\n.. image:: https://github.com/Robpol86/etaprogress/raw/master/example.gif?raw=true\n :alt: Example Scripts Screenshot\n\nSource code for examples: `example.py `_,\n`example_colors.py `_,\nand `example_wget.py `_\n\nUsage\n-----\n\nIf all you need is a progress bar with an ETA, you only have to import a class in the ``etaprogress.progress`` module.\nTo get the progress bar itself just cast to string or print the instance.\n\nSimple Usage\n````````````\n\n.. code:: python\n\n import time\n from etaprogress.progress import ProgressBar\n total = 5\n bar = ProgressBar(total, max_width=40)\n for i in range(total + 1):\n bar.numerator = i\n print bar\n time.sleep(1)\n\n.. code::\n\n 0% (0/5) [ ] eta --:-- -\n 20% (1/5) [### ] eta 00:05 \\\n 40% (2/5) [###### ] eta 00:04 |\n 60% (3/5) [######### ] eta 00:03 /\n 80% (4/5) [############ ] eta 00:02 -\n 100% (5/5) [###############] eta 00:00 \\\n\nOf course that's not a very good progress bar animation. Here's a better one with ``print_function``:\n\n.. code:: python\n\n from __future__ import print_function\n import sys\n import time\n from etaprogress.progress import ProgressBar\n total = 5\n bar = ProgressBar(total, max_width=40)\n for i in range(total + 1):\n bar.numerator = i\n print(bar, end='\\r')\n sys.stdout.flush()\n time.sleep(1)\n print()\n\n.. code::\n\n 100% (5/5) [###############] eta 00:00 \\\n\nTerminal Colors Support\n```````````````````````\n\nColors are supported using `colorclass `_. Take a look at\n`example_colors.py `_ on how to implement\ncolorful progress bars. You may have to subclass one of the ProgressBar classes (or even BaseProgressBar) to add colors\nto every nook and cranny of a progress bar.\n\nClass Attributes\n````````````````\n\nThere are five different progress bar classes with visual differences:\n\n* ``ProgressBar`` -- a simple progress bar.\n* ``ProgressBarBits`` -- similar to ``ProgressBar`` but converts numbers to bits, kilobits, etc.\n* ``ProgressBarBytes`` -- similar to ``ProgressBar`` but converts numbers to bytes, kibibytes (kilobytes), etc.\n* ``ProgressBarWget`` -- a progress bar that looks like the one in the GNU ``wget`` application.\n* ``ProgressBarYum`` -- a progress bar that looks like the one in CentOS/RHEL 7 ``yum`` utility.\n\n============== =============================================================================================================================\nName Description/Notes\n============== =============================================================================================================================\n``max_width`` Limit number of characters shown (by default the full progress bar takes up the entire terminal width).\n``eta_every`` Calculate and cache the ETA string after this many numerator setting iteration. Default is every iter.\n``force_done`` For undefined progress bars this indicates that the progress has completed.\n``filename`` 'ProgressBarYum' only. The string to display before the progress bar. Limited to whatever space is available in the terminal.\n============== =============================================================================================================================\n\nClass Properties\n````````````````\n\n=============== =======================================================================================================================================================\nName Description/Notes\n=============== =======================================================================================================================================================\n``denominator`` Returns the denominator of the progress bars. The same value provided when instantiating.\n``done`` Returns True if the progress has completed.\n``numerator`` Read/write. Returns the numerator as an integer or sets a new numerator. When setting a numerator it must be equal to or greater than the previous one.\n``percent`` Returns the percent as a float.\n``rate`` Returns the rate of the progress as a float.\n``undefined`` Return True if the progress bar is undefined.\n=============== =======================================================================================================================================================\n\nChangelog\n---------\n\n1.1.1\n`````\n\n* Fixed broken setup.py file.\n\n1.1.0\n`````\n\n* Added Windows support.\n\n1.0.0\n`````\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Robpol86/etaprogress", "keywords": "eta progress bar", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "etaprogress", "package_url": "https://pypi.org/project/etaprogress/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/etaprogress/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Robpol86/etaprogress" }, "release_url": "https://pypi.org/project/etaprogress/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Easy to use ETA calculation and progress bar library.", "version": "1.1.1" }, "last_serial": 1467979, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "65f952556dfc59f8ee46f79bfdb692fe", "sha256": "2e08229d731a1803d1de08bd1ec258c33308efca69221d17eb31bce82bf91d70" }, "downloads": -1, "filename": "etaprogress-1.0.0.tar.gz", "has_sig": false, "md5_digest": "65f952556dfc59f8ee46f79bfdb692fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4525, "upload_time": "2014-10-20T17:45:54", "url": "https://files.pythonhosted.org/packages/95/4a/d04a5ed372b58b9137e5181fe318970a36e2d7bd284bb829e05b68fa8219/etaprogress-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2f6bd75e85a5e9266c3e3e79dccc3968", "sha256": "f809238f0e19f04fb1adbc3af2c7fd669fc00f049e8a7e118abff8964a0349ef" }, "downloads": -1, "filename": "etaprogress-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2f6bd75e85a5e9266c3e3e79dccc3968", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4832, "upload_time": "2014-11-25T21:13:12", "url": "https://files.pythonhosted.org/packages/dc/ef/a26d4e401a78333a306da80909cc64a5eb8d8c3ceb996fc188cdd06f24e8/etaprogress-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e849839f845ad1093f16d712c680f3aa", "sha256": "9fe72db81b04792155081d4710acf65140e7c59df48d51b8d309ba7a24ab3a91" }, "downloads": -1, "filename": "etaprogress-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e849839f845ad1093f16d712c680f3aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13809, "upload_time": "2015-03-19T04:24:32", "url": "https://files.pythonhosted.org/packages/9c/53/b9696f50f491ff0ab27984714c8b37c2ee58eac45ecdf8d060f17f9aafe4/etaprogress-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e849839f845ad1093f16d712c680f3aa", "sha256": "9fe72db81b04792155081d4710acf65140e7c59df48d51b8d309ba7a24ab3a91" }, "downloads": -1, "filename": "etaprogress-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e849839f845ad1093f16d712c680f3aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13809, "upload_time": "2015-03-19T04:24:32", "url": "https://files.pythonhosted.org/packages/9c/53/b9696f50f491ff0ab27984714c8b37c2ee58eac45ecdf8d060f17f9aafe4/etaprogress-1.1.1.tar.gz" } ] }