{ "info": { "author": "itkr", "author_email": "itkrst@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "Light Progress\n==============\n\nThis is progress reporting tool for Python\n\n.. code:: python\n\n n = 42\n with ProgressBar(n) as progress_bar:\n for item in range(n):\n sleep(0.01)\n progress_bar.forward()\n\n.. code:: python\n\n # [\u2589..............................] 1% (1/42)\n # [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2589...............] 50% (21/42)\n # [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588] 100% (42/42)\n\nInstallation\n------------\n\n.. code:: sh\n\n pip install light-progress\n\nExamples\n--------\n\nImport\n~~~~~~\n\n.. code:: python\n\n from time import sleep\n from light_progress.commandline import ProgressBar\n\nPattern 1\n~~~~~~~~~\n\nCall ``start`` ``forward`` and ``finish`` yourself.\n\n.. code:: python\n\n n = 42\n progress_bar = ProgressBar(n)\n progress_bar.start()\n\n for item in range(n):\n sleep(0.01)\n progress_bar.forward()\n\n progress_bar.finish()\n\nPattern 2\n~~~~~~~~~\n\nDo iterations in ``with``. ``start`` and ``finish`` do not have to be\ncalled explicitly.\n\n.. code:: python\n\n n = 42\n with ProgressBar(n) as progress_bar:\n for item in range(n):\n sleep(0.01)\n progress_bar.forward()\n\nPattern 3\n~~~~~~~~~\n\nTransfer iteration. You don\u2019t have to call any ``ProgressBar`` methods\nyourself.\n\n.. code:: python\n\n ProgressBar.iteration(range(42), lambda item: sleep(0.01))\n\nPattern 4\n~~~~~~~~~\n\nTransfer generation. You don\u2019t have to call any ``ProgressBar`` methods\nyourself.\n\n.. code:: python\n\n for item in ProgressBar.generation(range(42)):\n sleep(0.01)\n\nColors\n------\n\n+-------------+-------+\n| status | color |\n+=============+=======+\n| In progress | Blue |\n+-------------+-------+\n| Success | Green |\n+-------------+-------+\n| Failure | Red |\n+-------------+-------+\n\nWidgets\n-------\n\n``ProgressBar`` can change the display format using ``widget``.\n\n.. code:: python\n\n from light_progress import widget\n\n.. code:: python\n\n widgets = [widget.Bar(bar='=', tip='-'),\n widget.Percentage(),\n widget.Num()]\n\n ProgressBar.iteration(\n range(42), lambda item: sleep(0.01), widgets=widgets)\n\n # [===============-...............] 50% (21/42)\n\n.. code:: python\n\n widgets = [widget.Percentage(),\n widget.Num(),\n 'loading...',\n widget.Bar(bar='#', tip='>')]\n\n ProgressBar.iteration(\n range(42), lambda item: sleep(0.01), widgets=widgets)\n\n # 50% (21/42) loading... [###############>...............]\n\nFormats\n-------\n\n.. code:: python\n\n format_str = '{} {} ({})'\n\n widgets = [widget.Bar(), widget.Percentage(), widget.Num()]\n ProgressBar.iteration(\n range(100),\n lambda item: sleep(0.01),\n widgets=widgets,\n format_str=format_str)\n\n # [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588] 100% (100/100)\n\n.. code:: python\n\n format_str = '{} *** {} *** ({})'\n\n widgets = [widget.Bar(), widget.Percentage(), widget.Num()]\n ProgressBar.iteration(\n range(100),\n lambda item: sleep(0.01),\n widgets=widgets,\n format_str=format_str)\n\n # [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588] *** 100% *** (100/100)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/itkr/light-progress", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "light-progress", "package_url": "https://pypi.org/project/light-progress/", "platform": "", "project_url": "https://pypi.org/project/light-progress/", "project_urls": { "Homepage": "https://github.com/itkr/light-progress" }, "release_url": "https://pypi.org/project/light-progress/0.2.1.1/", "requires_dist": null, "requires_python": "", "summary": "Light progress reporting tool for Python", "version": "0.2.1.1" }, "last_serial": 4556537, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "08997b5dc93e95d22e8978613f959aad", "sha256": "d374e6f78ec4dbf79d3df361dc1944b3fb54827505fca85d1890a31645ba76a4" }, "downloads": -1, "filename": "light_progress-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "08997b5dc93e95d22e8978613f959aad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2782, "upload_time": "2018-07-09T15:52:29", "url": "https://files.pythonhosted.org/packages/4a/44/6f3d9930cea4687dd32e6fb0813a9af8a233272e5ed66f03104d62e67b89/light_progress-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3166ce01b0f2f8091fb567a9d999cb3c", "sha256": "1e35fbdf03154f41f57ea2c2a6f6fa9de16a63838c4613e200d9b81e19098205" }, "downloads": -1, "filename": "light-progress-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3166ce01b0f2f8091fb567a9d999cb3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2788, "upload_time": "2018-07-09T15:52:31", "url": "https://files.pythonhosted.org/packages/50/d0/245baec90000709a771331d9e6c722008cf251dd823b127eb96bf2d23b7a/light-progress-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a8646ea418f37a2d52ca75a8632d0b3b", "sha256": "0cf14e685fd626993dbb0261666c6f8f53a89eca9a055a84a04f59761b4e7a6e" }, "downloads": -1, "filename": "light_progress-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a8646ea418f37a2d52ca75a8632d0b3b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2834, "upload_time": "2018-07-10T13:24:49", "url": "https://files.pythonhosted.org/packages/b2/ef/06a29b446b9a1894742fd411918c35f91c1ea4fe47828b41243054552f30/light_progress-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "becc604d0d0a615723e88d68c2aaaf87", "sha256": "fdf4dde7cd4e70b2876b391d5bae464b964d7104e57fb39b8d2502af8423ff76" }, "downloads": -1, "filename": "light-progress-0.1.2.tar.gz", "has_sig": false, "md5_digest": "becc604d0d0a615723e88d68c2aaaf87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2604, "upload_time": "2018-07-10T13:24:51", "url": "https://files.pythonhosted.org/packages/b6/89/07d075f01ac9834f55fc26431027237659d251574ed89a49c90828db35d7/light-progress-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "3a1b857714aeff4fa9207fd010e18909", "sha256": "28f9e8ca2a9d0e59133bb3c41a635d27c97863077478fd4b6c66dd091fa52ad4" }, "downloads": -1, "filename": "light-progress-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3a1b857714aeff4fa9207fd010e18909", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3582, "upload_time": "2018-07-11T02:34:33", "url": "https://files.pythonhosted.org/packages/b3/0c/167790716af8fd5419222c9948ffa8ebc9f4ec0ff9c3c10ffc41c840b19d/light-progress-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "28e7ede585da269597feb58a26555f9b", "sha256": "50a9f8484fb41143566ae57e493ae30dd63615f627af12413843f612ec5a0643" }, "downloads": -1, "filename": "light-progress-0.1.4.tar.gz", "has_sig": false, "md5_digest": "28e7ede585da269597feb58a26555f9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3881, "upload_time": "2018-07-12T10:17:20", "url": "https://files.pythonhosted.org/packages/54/1b/d5429163181b9679d7737ac068524d88bf6c2617dbe7f64c6964239780a1/light-progress-0.1.4.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "59bbd19a0b36d5d3108701fa965f75f9", "sha256": "7f761b6cef08043aa8e63769aa485143d16464176510dbf1e8b4809c8e6ebcd1" }, "downloads": -1, "filename": "light-progress-0.2.1.tar.gz", "has_sig": false, "md5_digest": "59bbd19a0b36d5d3108701fa965f75f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4109, "upload_time": "2018-07-23T13:55:41", "url": "https://files.pythonhosted.org/packages/16/c3/23df3eaf51867c8d371ebade1557103bda080e75368488dbb59069504365/light-progress-0.2.1.tar.gz" } ], "0.2.1.1": [ { "comment_text": "", "digests": { "md5": "b190cde751c3da1c3baddd33382975fa", "sha256": "076d6a981acf3024912bfc250792002327727a480ad4712310b613b3d51825e0" }, "downloads": -1, "filename": "light-progress-0.2.1.1.tar.gz", "has_sig": false, "md5_digest": "b190cde751c3da1c3baddd33382975fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4105, "upload_time": "2018-12-03T17:20:28", "url": "https://files.pythonhosted.org/packages/94/4c/ac938446ba3643939a9461d40f5446f4e0c0aace2240b49f4d1bbf2d4135/light-progress-0.2.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b190cde751c3da1c3baddd33382975fa", "sha256": "076d6a981acf3024912bfc250792002327727a480ad4712310b613b3d51825e0" }, "downloads": -1, "filename": "light-progress-0.2.1.1.tar.gz", "has_sig": false, "md5_digest": "b190cde751c3da1c3baddd33382975fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4105, "upload_time": "2018-12-03T17:20:28", "url": "https://files.pythonhosted.org/packages/94/4c/ac938446ba3643939a9461d40f5446f4e0c0aace2240b49f4d1bbf2d4135/light-progress-0.2.1.1.tar.gz" } ] }