{ "info": { "author": "Markus Binsteiner", "author_email": "markus@frkl.io", "bugtrack_url": null, "classifiers": [], "description": "

\n \n
\n halo\n

\n\n[![Build Status](https://travis-ci.org/manrajgrover/halo.svg?branch=master)](https://travis-ci.org/manrajgrover/halo) [![Build status](https://ci.appveyor.com/api/projects/status/wa6t414gltr403ff?svg=true)](https://ci.appveyor.com/project/manrajgrover/halo) [![Coverage Status](https://coveralls.io/repos/github/manrajgrover/halo/badge.svg?branch=master)](https://coveralls.io/github/manrajgrover/halo?branch=master)\n [![PyPI](https://img.shields.io/pypi/v/halo.svg)](https://github.com/manrajgrover/halo) ![awesome](https://img.shields.io/badge/awesome-yes-green.svg)\n> Beautiful spinners for terminal, IPython and Jupyter\n\n![halo](https://raw.github.com/manrajgrover/halo/master/art/doge_spin.svg?sanitize=true)\n\n## Install\n\n```shell\n$ pip install halo\n```\n\n## Usage\n\n```py\nfrom halo import Halo\n\nspinner = Halo(text='Loading', spinner='dots')\nspinner.start()\n\n# Run time consuming work here\n# You can also change properties for spinner as and when you want\n\nspinner.stop()\n```\n\nAlternatively, you can use halo with Python's `with` statement:\n\n```py\nfrom halo import Halo\n\nwith Halo(text='Loading', spinner='dots'):\n # Run time consuming work here\n```\n\nFinally, you can use halo as a decorator:\n\n```py\nfrom halo import Halo\n\n@Halo(text='Loading', spinner='dots')\ndef long_running_function():\n # Run time consuming work here\n pass\n\nlong_running_function()\n```\n\n## API\n\n### `Halo([text|text_color|spinner|animation|placement|color|interval|stream|enabled])`\n\n##### `text`\n*Type*: `str`\n\nText shown along with spinner.\n\n##### `text_color`\n*Type*: `str`\n*Values*: `grey`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`\n\nColor of the spinner text. Defaults to `None`.\n\n##### `spinner`\n*Type*: `str|dict`\n\nIf string, it should be one of the spinners listed in the given [json](https://github.com/sindresorhus/cli-spinners/blob/dac4fc6571059bb9e9bc204711e9dfe8f72e5c6f/spinners.json) file. If a dict is passed, it should define `interval` and `frames`. Something like:\n\n```py\n{\n 'interval': 100,\n 'frames': ['-', '+', '*', '+', '-']\n}\n```\n\nDefaults to `dots` spinner. For Windows users, it defaults to `line` spinner.\n\n##### `animation`\n*Type*: `str`\n*Values*: `bounce`, `marquee`\n\nAnimation to apply to the text if it's too large and doesn't fit in the terminal. If no animation is defined, the text will be ellipsed.\n\n##### `placement`\n*Type*: `str`\n*Values*: `left`, `right`\n\nWhich side of the text the spinner should be displayed. Defaults to `left`\n\n##### `color`\n*Type*: `str`\n*Values*: `grey`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`\n\nColor of the spinner. Defaults to `cyan`.\n\n##### `interval`\n*Type*: `float`\n\nInterval between each frame. Defaults to spinner interval (recommended).\n\n##### `stream`\n*Type*: `file`\n\nStream to write the output. Defaults to `sys.stdout`.\n\n##### `enabled`\n*Type*: `bool`\n\nEnable or disable the spinner. Defaults to `True`.\n\n### Methods\n\nFollowing are the methods available:\n\n#### `spinner.start([text])`\n\nStarts the spinner. If `text` is passed, it is set as spinner text. Returns the instance.\n\n#### `spinner.stop()`\n\nStops and clears the spinner. Returns the instance.\n\n#### `spinner.clear()`\n\nClears the spinner. Returns the instance.\n\n#### `spinner.render()`\n\nManually renders a new frame. Returns the instance.\n\n#### `spinner.frame()`\n\nReturns next frame to be rendered.\n\n#### `spinner.succeed([text])`\n##### `text`: *Type*: `str`\n\nStops the spinner and changes symbol to `\u2714`. If text is provided, it is persisted else current text is persisted. Returns the instance.\n\n#### `spinner.fail([text])`\n##### `text`: *Type*: `str`\n\nStops the spinner and changes symbol to `\u2716`. If text is provided, it is persisted else current text is persisted. Returns the instance.\n\n#### `spinner.warn([text])`\n##### `text`: *Type*: `str`\n\nStops the spinner and changes symbol to `\u26a0`. If text is provided, it is persisted else current text is persisted. Returns the instance.\n\n#### `spinner.info([text])`\n##### `text`: *Type*: `str`\n\nStops the spinner and changes symbol to `\u2139`. If text is provided, it is persisted else current text is persisted. Returns the instance.\n\n#### `spinner.stop_and_persist([symbol|text])`\nStops the spinner and changes symbol and text. Returns the instance.\n\n##### `symbol`\n*Type*: `str`\n\nSymbol to replace the spinner with. Defaults to `' '`.\n\n##### `text`\n*Type*: `str`\n\nText to be persisted. Defaults to instance text.\n\n![Persist spin](https://raw.github.com/manrajgrover/halo/master/art/persist_spin.svg?sanitize=true)\n\n#### `spinner.text`\nChange the text of spinner.\n\n#### `spinner.color`\nChange the color of spinner\n\n#### `spinner.spinner`\nChange the spinner itself.\n\n## How to contribute?\n\nPlease see [Contributing guidelines](https://github.com/manrajgrover/halo/blob/master/.github/CONTRIBUTING.md) for more information.\n\n## Like it?\n\n\ud83c\udf1f this repo to show support. Let me know you liked it on [Twitter](https://twitter.com/manrajsgrover).\nAlso, share the [project](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fmanrajgrover%2Fhalo&via=manrajsgrover&text=Checkout%20%23halo%20-%20a%20beautiful%20%23terminal%20%23spinners%20library%20for%20%23python&hashtags=github%2C%20pypi).\n\n## Related\n\n* [py-spinners](https://github.com/manrajgrover/py-spinners) - Spinners in Python\n* [py-log-symbols](https://github.com/manrajgrover/py-log-symbols) - Log Symbols in Python\n* [ora](https://github.com/sindresorhus/ora) - Elegant terminal spinners in JavaScript (inspiration behind this project) \n\n## License\n[MIT](https://github.com/manrajgrover/halo/blob/master/LICENSE) \u00a9 Manraj Singh\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/manrajgrover/halo", "keywords": "console,loading,indicator,progress,cli,spinner,spinners,terminal,term,busy,wait,idle", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "frkl.halo", "package_url": "https://pypi.org/project/frkl.halo/", "platform": "", "project_url": "https://pypi.org/project/frkl.halo/", "project_urls": { "Homepage": "https://github.com/manrajgrover/halo" }, "release_url": "https://pypi.org/project/frkl.halo/0.0.24/", "requires_dist": [ "frkl.log-symbols (==0.0.14)", "spinners (==0.0.23)", "cursor (==1.2.0)", "termcolor (==1.1.0)", "colorama (==0.3.9)", "six (==1.12.0)", "backports.shutil-get-terminal-size (==1.0.0) ; python_version < \"3.3\"", "IPython (==5.7.0) ; extra == 'ipython'", "ipywidgets (==7.1.0) ; extra == 'ipython'" ], "requires_python": "", "summary": "Temporary fork of \"halo\": Beautiful terminal spinners in Python", "version": "0.0.24" }, "last_serial": 5288755, "releases": { "0.0.24": [ { "comment_text": "", "digests": { "md5": "71960f92451a9ab034f633d3952d148b", "sha256": "9e241b9fa80aea6e3a6a9e40edc5fb051286668b80bde4b2a6a092504061d12e" }, "downloads": -1, "filename": "frkl.halo-0.0.24-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "71960f92451a9ab034f633d3952d148b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10275, "upload_time": "2019-05-19T16:48:39", "url": "https://files.pythonhosted.org/packages/9c/68/9af05478d59c2b9bf15076ccc28b09453d272a8daab84473d484e32060aa/frkl.halo-0.0.24-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "14d1571a857fe2f215e7590bf1e6644f", "sha256": "e9af5177f69ec83e139749967ed49504e08201ea4add72bdbc7fb84cac7d3ef1" }, "downloads": -1, "filename": "frkl.halo-0.0.24.tar.gz", "has_sig": false, "md5_digest": "14d1571a857fe2f215e7590bf1e6644f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36781, "upload_time": "2019-05-19T16:48:36", "url": "https://files.pythonhosted.org/packages/85/bc/8809bdd3da3327ae95f71acd55378b895643a094f5befda7fd14f4ecc9f0/frkl.halo-0.0.24.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71960f92451a9ab034f633d3952d148b", "sha256": "9e241b9fa80aea6e3a6a9e40edc5fb051286668b80bde4b2a6a092504061d12e" }, "downloads": -1, "filename": "frkl.halo-0.0.24-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "71960f92451a9ab034f633d3952d148b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10275, "upload_time": "2019-05-19T16:48:39", "url": "https://files.pythonhosted.org/packages/9c/68/9af05478d59c2b9bf15076ccc28b09453d272a8daab84473d484e32060aa/frkl.halo-0.0.24-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "14d1571a857fe2f215e7590bf1e6644f", "sha256": "e9af5177f69ec83e139749967ed49504e08201ea4add72bdbc7fb84cac7d3ef1" }, "downloads": -1, "filename": "frkl.halo-0.0.24.tar.gz", "has_sig": false, "md5_digest": "14d1571a857fe2f215e7590bf1e6644f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36781, "upload_time": "2019-05-19T16:48:36", "url": "https://files.pythonhosted.org/packages/85/bc/8809bdd3da3327ae95f71acd55378b895643a094f5befda7fd14f4ecc9f0/frkl.halo-0.0.24.tar.gz" } ] }