{ "info": { "author": "Yohan Boniface", "author_email": "hi@yohanboniface.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![Build Status](https://travis-ci.org/pyrates/progressist.svg?branch=master)](https://travis-ci.org/pyrates/progressist) [![PyPI](https://img.shields.io/pypi/v/progressist.svg)]() [![Coverage Status](https://coveralls.io/repos/github/pyrates/progressist/badge.svg?branch=coveralls)](https://coveralls.io/github/pyrates/progressist?branch=coveralls) [![PyPI](https://img.shields.io/pypi/pyversions/progressist.svg)]()\n\n# Progressist\n\nMinimalist and pythonic progress bar.\n\n[![asciicast](https://asciinema.org/a/l4BHmcz13ZcTOBLGk0z9JTnhZ.svg)](https://asciinema.org/a/l4BHmcz13ZcTOBLGk0z9JTnhZ)\n\n## Install\n\n pip install progressist\n\n## Usage\n\n from progressist import ProgressBar\n bar = ProgressBar(total=mytotalstuff)\n for item in mystuff:\n # do_stuff\n bar.update()\n\nOr use `bar.iter` transparently\n\n for item in bar.iter(mystuff):\n do_stuff\n\nIt comes with a default rendering that is enough for starting, but it's made to be\ncustomised very easily: just writting a template string:\n\n bar = ProgressBar(total=mytotalstuff, template='{prefix} {progress} ETA: {eta}')\n\nIt's just plain [python formatting](https://docs.python.org/3.4/library/string.html#formatspec)\nso you can use any valid string formatting to take control over the appearance.\nFor example:\n\n bar = ProgressBar(total=mytotalstuff, template='{progress} {percent:.2%} ETA: {eta:%H:%M:%S}')\n\nYou can also just change the fill character:\n\n bar = ProgressBar(total=mytotalstuff, done_char='#')\n\nYou can change the progress logic itself, for example to use a spinner (included):\n\n bar = ProgressBar(total=mytotalstuff, progress='{spinner}')\n # 'progress' kwarg must return a valid template variable.\n # included ones are {bar} and {spinner}\n\nYou can step by more than one at a time:\n\n for item in mystuff:\n amount = do_stuff()\n bar.update(step=amount)\n\nYou can add more template vars by subclassing `ProgressBar`:\n\n class MyBar(ProgressBar):\n\n @property\n def swap(self):\n return psutil.swap_memory().total\n\n bar = MyBar(total=20, template='{prefix} {progress} Swap usage: {swap}')\n\nIf you are using the same configuration at different places, create a subclass and\nset its configuration as class properties:\n\n class MyBar(ProgressBar):\n template = ('Download |{animation}| {done:B}/{total:B}')\n done_char = '\u2b1b'\n\n bar = MyBar()\n\nYou want to compute yourself the done part?\n\n bar.update(done=myvar / othervar * another)\n\nOr the target total may change during process?\n\n bar.update(total=newcomputedtotal)\n\nTo use as [urlretrieve](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve)\ncallback:\n\n bar = ProgressBar(template=\"Download |{animation}| {done:B}/{total:B}\")\n urllib.request.urlretrieve(myurl, mydest, reporthook=bar.on_urlretrieve)\n\n\nSee [examples](https://github.com/pyrates/progressist/blob/master/examples.py) for inspiration.\n\nTo run examples, when git cloned the repository, simply run:\n\n python examples.py\n\nIf you want to run only one example, add its name to the command line:\n\n python examples.py example_download\n\n\n## Parameters\n\nYou can set all of those parameters either as class properties:\n\n class MyBar(ProgressBar):\n done_char = 'x'\n\n bar = Bar()\n\nOr at init:\n\n bar = ProgressBar(done_char='x')\n\nOr at update:\n\n bar = Bar()\n bar.update(prefix='Finishing')\n\n| name | default | description |\n| ----- | ------ | ------------- |\n| done_char | `=` | Char used for filling the progress bar |\n| remain_char | `' '` (a space) | Char used for filling the empty portion of the progress bar |\n| template | `{prefix} {progress} {percent} ({done}/{total})` | The template of the whole line |\n| prefix | `Progress:` | The leading label |\n| animation | '{progress}' | The actual widget used for progress, can be `{bar}`, `{spinner}` or `{stream}`\n| throttle | 0 | Minimum value between two `update` call to issue a render: can accept an `int` for an absolute throttling, a float for a percentage throttling (total must then be set) or a dimedelta for a throttling in seconds\n\n\n## Built in template vars\n\nname | description | type | default formatting\n| ------ | ------------- | ------ | ---------------- |\nprefix | Leading label in default template | string | str\nelapsed | The elapsed time from the first iteration (in seconds) | int | as timedelta\neta | The computed ETA | datetime | `%H:%M:%S` if less than 24 hours, else `%Y-%m-%d %H:%M:%S`\ntta | The estimated remaining time (time to arrival; in seconds) | int | as timedelta\navg | The average time per iteration, in seconds | float | `.2f`\nspeed | The average number of iterations per second | float | `.2f`\ndone | The number of done iterations | integer |\ntotal | The total number of iterations to be done | integer |\nremaing | The number of iterations remaining to be done | integer |\npercent | The percent of iterations already done | float | `.2%`\nanimation | The actual progress bar | template string (`{bar}`, `{spinner}` or `{stream}`) |\n\n\n## Custom formatting\n\nWe extend python default Formatter with some handy custom specs:\n\n- `B` type: render an int as human friendly bytes size. For example:\n\n > bar.total = 109830983\n > bar.template = '{total:B}'\n > bar.render()\n '104.7 MiB'\n\n You can still override the ndigits value:\n\n > bar.total = 109830983\n > bar.template = '{total:0.2B}'\n > bar.render()\n '104.74 MiB'\n\n- `D` type: try to cast to integer. For example:\n\n > bar.speed = 103.23\n > bar.template = '{speed:D}'\n > bar.render()\n '103'\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pyrates/progressist", "keywords": "progress bar", "license": "WTFPL", "maintainer": "", "maintainer_email": "", "name": "progressist", "package_url": "https://pypi.org/project/progressist/", "platform": "", "project_url": "https://pypi.org/project/progressist/", "project_urls": { "Homepage": "https://github.com/pyrates/progressist" }, "release_url": "https://pypi.org/project/progressist/0.1.0/", "requires_dist": [ "pytest ; extra == 'test'" ], "requires_python": "", "summary": "Minimalist and pythonic progress bar", "version": "0.1.0" }, "last_serial": 5181909, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c46d81050586b576c36d7b797e743121", "sha256": "a8dc7c83c47eaf58b18d35067f73a810f7fa254867e847e5f5dcf1cadaf20928" }, "downloads": -1, "filename": "progressist-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c46d81050586b576c36d7b797e743121", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8139, "upload_time": "2016-03-07T15:50:22", "url": "https://files.pythonhosted.org/packages/ed/82/928a452457b80c9220c1d4ffea91f9c96b33643e4d70579ca75a627a8876/progressist-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad79cc007ee05064612413c8ae529156", "sha256": "9e425f02e869437c4fb673dbf31ac38db84d8f949dd2b5297dd156a8352b337b" }, "downloads": -1, "filename": "progressist-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ad79cc007ee05064612413c8ae529156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5081, "upload_time": "2016-03-07T15:49:55", "url": "https://files.pythonhosted.org/packages/ca/fa/f5a809ee3521870c116d0c3265e02d3062ee54da5d7212a615f99f938b5e/progressist-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a474b9688fb18b9834a87dbc6f7eb3f0", "sha256": "fb4d1c6b0551a709b193339ad56094ac81b0777a46ba056b335ab3eb675b9711" }, "downloads": -1, "filename": "progressist-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a474b9688fb18b9834a87dbc6f7eb3f0", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8330, "upload_time": "2016-03-14T13:20:27", "url": "https://files.pythonhosted.org/packages/7b/f2/9a34b8b6b6dc956bb79a8085d63ba4519537d66574b3c6faedd72560a4de/progressist-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ebc27a67986abc90b522610068061c0", "sha256": "b549c9b2ea7e522689cc7734c60fa1a77ada2872171afb475b10cef615a67656" }, "downloads": -1, "filename": "progressist-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1ebc27a67986abc90b522610068061c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5243, "upload_time": "2016-03-14T13:19:49", "url": "https://files.pythonhosted.org/packages/e4/10/02997171a04b881b5cd210cf9655bd12fe8b8364342556e1b6644d35b89b/progressist-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1c5c02bd205bf1be05236613c5489939", "sha256": "900dea458ec4160112db78747a96ac29e243d0b0d85f7d72b122a870d6f7d9b3" }, "downloads": -1, "filename": "progressist-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1c5c02bd205bf1be05236613c5489939", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8330, "upload_time": "2016-03-14T13:46:50", "url": "https://files.pythonhosted.org/packages/1b/aa/eeba9dc7aee45dd2a67c17eb79b206b012e87d61864abe07e56b2e5e75f0/progressist-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e324a7ae14c23e789f17889210a1b517", "sha256": "8503f96522e805e25a30c8a3caf9c9d5f6fe0fee22cc61f7383401de69c79c10" }, "downloads": -1, "filename": "progressist-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e324a7ae14c23e789f17889210a1b517", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5760, "upload_time": "2016-03-14T13:46:36", "url": "https://files.pythonhosted.org/packages/fd/98/ea71f1763f37cc86b76e26ba78de7673b3848ce992ca5ad9f492f57cd870/progressist-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "35103e5ce6c90cf35d3e60c39ef2aa60", "sha256": "e315b34b692114c3cc0a731edba36af6bcea26943cc5bfedfea232632d52769c" }, "downloads": -1, "filename": "progressist-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "35103e5ce6c90cf35d3e60c39ef2aa60", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8337, "upload_time": "2016-03-14T14:35:50", "url": "https://files.pythonhosted.org/packages/86/93/28271988d954f6246e4474ebfaa90b26ccb3b734db99289e95c7911326ff/progressist-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e06ad5a26948e97cd5fc1a656aec3423", "sha256": "ebb7ba9dbac7fa7a5236db1b42032e8e41a363d264a4473f9ffd3fd08219b4f6" }, "downloads": -1, "filename": "progressist-0.0.4.tar.gz", "has_sig": false, "md5_digest": "e06ad5a26948e97cd5fc1a656aec3423", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5767, "upload_time": "2016-03-14T14:35:36", "url": "https://files.pythonhosted.org/packages/a3/5b/0df8f76252ba9b44e9b7bca5e5df48d26c36f780244b25a44927b622e69e/progressist-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c181297c2b9a941e0cb25629ccbd1af6", "sha256": "62bfee2af074959bfcf4c2ab3603bd7d25933810e13f276404747ad199052932" }, "downloads": -1, "filename": "progressist-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c181297c2b9a941e0cb25629ccbd1af6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5882, "upload_time": "2016-03-27T15:02:12", "url": "https://files.pythonhosted.org/packages/6b/4c/a005dad46ebd85c0b67843e0afa764eb4dea9db452f1ccbf57bba1287148/progressist-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "dd34e9cf04d2dcdf67c5823172872d70", "sha256": "181166a793500bda6c8ca67ec4023d3da87153170187d9c0053366f029e900c8" }, "downloads": -1, "filename": "progressist-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "dd34e9cf04d2dcdf67c5823172872d70", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8547, "upload_time": "2016-11-26T13:32:17", "url": "https://files.pythonhosted.org/packages/3d/c1/d0b1b2f0563c05d0abc9983c5f9753d661ec3c1a6e87918f7c19ff95a05e/progressist-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "623c960dcda20f948a8d608483d80518", "sha256": "3123464b7d04b127cf01bc4781024fcc735613c30808936f64ef9c326d999df7" }, "downloads": -1, "filename": "progressist-0.0.6.tar.gz", "has_sig": false, "md5_digest": "623c960dcda20f948a8d608483d80518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5989, "upload_time": "2016-11-26T13:32:14", "url": "https://files.pythonhosted.org/packages/3d/78/b89564a49044177be233219e9a2ae71193c1b63b9954335d11fac82268d7/progressist-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "088caaaf28f58baf9698d529aaced0ba", "sha256": "4ade9541d3d23f0b3845609490021e684b24a9dca81b6e84593bb1d2475d5ac4" }, "downloads": -1, "filename": "progressist-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "088caaaf28f58baf9698d529aaced0ba", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6233, "upload_time": "2019-04-24T11:59:35", "url": "https://files.pythonhosted.org/packages/3a/a6/4738cd1ece9c0ab68e01d8df02876ee3679709db6589e1a55b2e289a1c58/progressist-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "821a9b65dc0c1929ed6a27ecdd07e6e4", "sha256": "0432388142ead5eeec4230c025f67c27e09ea6a97c16962b6a8a4d5e45bb2d29" }, "downloads": -1, "filename": "progressist-0.1.0.tar.gz", "has_sig": false, "md5_digest": "821a9b65dc0c1929ed6a27ecdd07e6e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6414, "upload_time": "2019-04-24T11:59:37", "url": "https://files.pythonhosted.org/packages/40/5b/aff79945df42d4f19bfc072b07c1b1c37d3a7c01abd38fc10bc50d0daf5f/progressist-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "088caaaf28f58baf9698d529aaced0ba", "sha256": "4ade9541d3d23f0b3845609490021e684b24a9dca81b6e84593bb1d2475d5ac4" }, "downloads": -1, "filename": "progressist-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "088caaaf28f58baf9698d529aaced0ba", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6233, "upload_time": "2019-04-24T11:59:35", "url": "https://files.pythonhosted.org/packages/3a/a6/4738cd1ece9c0ab68e01d8df02876ee3679709db6589e1a55b2e289a1c58/progressist-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "821a9b65dc0c1929ed6a27ecdd07e6e4", "sha256": "0432388142ead5eeec4230c025f67c27e09ea6a97c16962b6a8a4d5e45bb2d29" }, "downloads": -1, "filename": "progressist-0.1.0.tar.gz", "has_sig": false, "md5_digest": "821a9b65dc0c1929ed6a27ecdd07e6e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6414, "upload_time": "2019-04-24T11:59:37", "url": "https://files.pythonhosted.org/packages/40/5b/aff79945df42d4f19bfc072b07c1b1c37d3a7c01abd38fc10bc50d0daf5f/progressist-0.1.0.tar.gz" } ] }