{ "info": { "author": "Henrique Leal", "author_email": "hm.leal@hotmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3 :: Only" ], "description": "# Py-clui\n> This is a Python toolkit for quickly building nice looking command line interfaces.\n\n[![Build Status](https://travis-ci.org/hmleal/py-clui.svg?branch=master)](https://travis-ci.org/hmleal/py-clui)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nIt also includes the following easy to use components:\n\n* Spinners\n* Gauge\n* Progress\n\n### Spinner(message, style=None)\n\n![Picture of a spinner](https://raw.githubusercontent.com/hmleal/py-clui/master/docs/spinner.gif)\n\n__Parameters__\n\n* `message` - The default status text to display while the spinner is spinning.\n* `style` - Array of graphical characters used to draw the spinner. By default,\n on Windows: ['|', '/', '-', '\\'], on other platforms: ['\u25dc','\u25e0','\u25dd','\u25de','\u25e1','\u25df']\n\n__Methods__\n\n* `run()` - Show the spinner on the screen.\n* `update_msg(message)` - Update the status message that follows the spinner.\n\n__Example__\n\n```python\nfrom py_clui import Spinner\n\nspinner = Spinner('Processing documents...')\nspinner.run()\n\nfor x in range(100):\n spinner.update_msg('{0} Processed documents'.format(x))\n spinner.run()\n```\n\n### Gauge(value, max_value, width, danger_zone, suffix=None)\n\n![Picture of a gauge](https://raw.githubusercontent.com/hmleal/py-clui/master/docs/gauge.png)\n\nDraw a basic horizontal gauge to the screen.\n\nParameters\n\n* `value`\n* `max_value`\n* `width`\n* `danger_zone`\n* `suffix`\n\nExample\n\n```python\nfrom py_clui import gauge\n\ntotal = 100\nfree = 30\n\nused = total - free\n\nprint(gauge(used, total, 20, total * 0.8, 'Used memory'))\n```\n\n### Progress(width=20)\n\n![Picture of a progress](https://raw.githubusercontent.com/hmleal/py-clui/master/docs/progress.png)\n\n__Parameters__\n\n* `width` - The width in characters of progress_bar\n\n__Methods__\n\n* `update(percent)` - Return a progress bar width a this percente filled.\n\n__Example__\n\n```python\nfrom py_clui import Progress\n\nprogress = Progress(20)\n\nprint(progress.update(.5))\n```\n\n## Motivation\n 1. [clui](https://github.com/nathanpeck/clui) makes NodeJS even more sexy. Python needed something like it.", "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/hmleal/py-clui", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "py_clui", "package_url": "https://pypi.org/project/py_clui/", "platform": "", "project_url": "https://pypi.org/project/py_clui/", "project_urls": { "Homepage": "https://github.com/hmleal/py-clui" }, "release_url": "https://pypi.org/project/py_clui/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Toolkit for quickly building nice looking command line interfaces", "version": "0.0.3" }, "last_serial": 3752051, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "79c13ac46784823985f7159fc4866f44", "sha256": "7341e9ae7c48f843f7f49ee515c5efea8200366e6465429e4c22a9e315637209" }, "downloads": -1, "filename": "py_clui-0.0.1.tar.gz", "has_sig": false, "md5_digest": "79c13ac46784823985f7159fc4866f44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1700, "upload_time": "2017-07-10T13:56:23", "url": "https://files.pythonhosted.org/packages/87/88/cf20ff6f0ff7f4ce8dcee627aff13e5ea328ddd04c1fbdec3d7a20d72bd5/py_clui-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e93479af36debf69e48fb08c639dec59", "sha256": "d0f30e3ebfc968e4864b1be3ca7b4b86bdaa512c3b1eff1d282534fbf6bd57e9" }, "downloads": -1, "filename": "py_clui-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e93479af36debf69e48fb08c639dec59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2311, "upload_time": "2017-07-10T14:39:51", "url": "https://files.pythonhosted.org/packages/bc/9f/2bc6433f29a08ba21c784094c6eb2c4a092d0b75f24310b6c8e512184b04/py_clui-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "e7e5284c91acdcfd113b729b72eeb3f2", "sha256": "39ace0e73d1fea5a80b7d92d900e897f94442a16d28a2093603a9a68f87049ad" }, "downloads": -1, "filename": "py_clui-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e7e5284c91acdcfd113b729b72eeb3f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3044, "upload_time": "2018-04-10T13:03:09", "url": "https://files.pythonhosted.org/packages/46/6e/1cd1e6e7490f553e3ff0372bc1b6a925679e761b3b5ae46f252e24039d57/py_clui-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e7e5284c91acdcfd113b729b72eeb3f2", "sha256": "39ace0e73d1fea5a80b7d92d900e897f94442a16d28a2093603a9a68f87049ad" }, "downloads": -1, "filename": "py_clui-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e7e5284c91acdcfd113b729b72eeb3f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3044, "upload_time": "2018-04-10T13:03:09", "url": "https://files.pythonhosted.org/packages/46/6e/1cd1e6e7490f553e3ff0372bc1b6a925679e761b3b5ae46f252e24039d57/py_clui-0.0.3.tar.gz" } ] }