{ "info": { "author": "Shinya Fujino", "author_email": "shf0811@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "# farbe\n\n![Hello Colors](https://github.com/morinokami/farbe/blob/master/docs/hello.png)\n\n## Installation\n```sh\n$ pip install farbe\n```\n\n## Test\nJust type in these commands and check if your terminal can print colors properly:\n```sh\n>>> import farbe\n>>> farbe.test()\n```\nIt prints the supported combinations of colors and effects:\n![Test](https://github.com/morinokami/farbe/blob/master/docs/test.png)\n\n## Basic Usage\nSpecify the color you want to use and feed a string to the `Farbe` object's `print` method.\n```sh\n>>> from farbe import Color, Farbe\n>>> bb = Farbe(Color.Fg.BrightBlue)\n>>> bb.print('Hello, Bright Blue')\nHello, Bright Blue\n>>> white_fg_red_bg = Farbe(Color.Fg.White, Color.Bg.Red)\n>>> white_fg_red_bg.print('White characters on red background')\nWhite characters on red background\n>>> italic = Farbe(Color.Fg.Normal, effects=[Color.Effect.Italic])\n>>> italic.print('Characters in italic')\nCharacters in italic\n```\n![Basic](https://github.com/morinokami/farbe/blob/master/docs/basic.png)\n\n## Using Colored objects\n`Colored` objects can be used in combination with normal strings.\n```sh\n>>> red = Farbe(Color.Fg.Red)\n>>> yellow = Farbe(Color.Fg.Yellow)\n>>> error = red.colored('Error')\n>>> warning = yellow.colored('Warning')\n>>> print('[' + error + '] Something went wrong!')\n[Error] Something went wrong!\n>>> print('\ud83d\udc0d ' + warning + '! \ud83d\udc0d')\n\ud83d\udc0d Warning! \ud83d\udc0d\n```\n![Colored](https://github.com/morinokami/farbe/blob/master/docs/colored.png)\n\n## Supported Colors and Effects\n\n### Foreground Colors\nColor Name | Code\n--- | ---\nNormal | `Color.Fg.Normal`\nBlack | `Color.Fg.Black`\nRed | `Color.Fg.Red`\nGreen | `Color.Fg.Green`\nYellow | `Color.Fg.Yellow`\nBlue | `Color.Fg.Blue`\nMagenta | `Color.Fg.Magenta`\nCyan | `Color.Fg.Cyan`\nWhite | `Color.Fg.White`\nBrightBlack | `Color.Fg.BrightBlack`\nBrightRed | `Color.Fg.BrightRed`\nBrightGreen | `Color.Fg.BrightGreen`\nBrightYellow | `Color.Fg.BrightYellow`\nBrightBlue | `Color.Fg.BrightBlue`\nBrightMagenta | `Color.Fg.BrightMagenta`\nBrightCyan | `Color.Fg.BrightCyan`\nBrightWhite | `Color.Fg.BrightWhite`\n\n### Background Colors\nColor Name | Code\n--- | ---\nNormal | `Color.Bg.Normal`\nBlack | `Color.Bg.Black`\nRed | `Color.Bg.Red`\nGreen | `Color.Bg.Green`\nYellow | `Color.Bg.Yellow`\nBlue | `Color.Bg.Blue`\nMagenta | `Color.Bg.Magenta`\nCyan | `Color.Bg.Cyan`\nWhite | `Color.Bg.White`\nBrightBlack | `Color.Bg.BrightBlack`\nBrightRed | `Color.Bg.BrightRed`\nBrightGreen | `Color.Bg.BrightGreen`\nBrightYellow | `Color.Bg.BrightYellow`\nBrightBlue | `Color.Bg.BrightBlue`\nBrightMagenta | `Color.Bg.BrightMagenta`\nBrightCyan | `Color.Bg.BrightCyan`\nBrightWhite | `Color.Bg.BrightWhite`\n\n### Effects\nEffect | Code\n--- | ---\nBold | `Color.Effect.Bold`\nFaint | `Color.Effect.Faint`\nItalic | `Color.Effect.Italic`\nUnderline | `Color.Effect.Underline`\nSlowBlink | `Color.Effect.SlowBlink`\nRapidBlink | `Color.Effect.RapidBlink`\nReverse | `Color.Effect.Reverse`\nConceal | `Color.Effect.Conceal`\nCrossOut | `Color.Effect.CrossOut`\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/morinokami/farbe", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "farbe", "package_url": "https://pypi.org/project/farbe/", "platform": "", "project_url": "https://pypi.org/project/farbe/", "project_urls": { "Homepage": "https://github.com/morinokami/farbe" }, "release_url": "https://pypi.org/project/farbe/0.1/", "requires_dist": null, "requires_python": "", "summary": "farbe lets you use colorized outputs in Python.", "version": "0.1" }, "last_serial": 4147818, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b9983592ea151d75ea108ccf0989c27e", "sha256": "268e35d9c6f2b485864b11a9de4543d83d41b48d4a8e575a40cd625c5be6ba88" }, "downloads": -1, "filename": "farbe-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b9983592ea151d75ea108ccf0989c27e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3359, "upload_time": "2018-08-08T07:43:38", "url": "https://files.pythonhosted.org/packages/35/da/66fb1ef5c7b5d71f6920823b3658ee2cfdef26882fdc9193348c842de1d6/farbe-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4f234f22389c6c09c378eb505ef7ab7", "sha256": "4e456dad7f70635c5d2ead077c60d1b8243d9817b90a607811f3d0e677bd25de" }, "downloads": -1, "filename": "farbe-0.1.tar.gz", "has_sig": false, "md5_digest": "b4f234f22389c6c09c378eb505ef7ab7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3365, "upload_time": "2018-08-08T07:43:40", "url": "https://files.pythonhosted.org/packages/14/d0/c56c2d2b0687c44e949e1017802220d2037bb0f21f570d02d6a622f2c32e/farbe-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9983592ea151d75ea108ccf0989c27e", "sha256": "268e35d9c6f2b485864b11a9de4543d83d41b48d4a8e575a40cd625c5be6ba88" }, "downloads": -1, "filename": "farbe-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b9983592ea151d75ea108ccf0989c27e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3359, "upload_time": "2018-08-08T07:43:38", "url": "https://files.pythonhosted.org/packages/35/da/66fb1ef5c7b5d71f6920823b3658ee2cfdef26882fdc9193348c842de1d6/farbe-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4f234f22389c6c09c378eb505ef7ab7", "sha256": "4e456dad7f70635c5d2ead077c60d1b8243d9817b90a607811f3d0e677bd25de" }, "downloads": -1, "filename": "farbe-0.1.tar.gz", "has_sig": false, "md5_digest": "b4f234f22389c6c09c378eb505ef7ab7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3365, "upload_time": "2018-08-08T07:43:40", "url": "https://files.pythonhosted.org/packages/14/d0/c56c2d2b0687c44e949e1017802220d2037bb0f21f570d02d6a622f2c32e/farbe-0.1.tar.gz" } ] }