{ "info": { "author": "Daniel Hones", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "|pipeline status| |coverage report|\n\nEchocolor\n=========\n\nSimple Python interface for printing colored text to a terminal.\n\nFor the time being, both Python 3 and Python 2.7 are supported. However,\nonly Python 3 support is guaranteed for the future. But since this\nlibrary probably won't have many reasons to change, it's likely that\nPython 2.7 will be supported for awhile.\n\nInstallation\n------------\n\nInstall from PyPi:\n\n::\n\n pip install echocolor\n\n\nTo install for development, clone this repo, then cd into the directory and do ``pip install -e .[dev]``\n\n\nRunning tests\n-------------\n\nWithout the dev dependencies:\n\n::\n\n python -m unittest discover tests/\n\nOr in a dev environment to include test coverage:\n\n::\n\n pip install nose coverage\n nosetests --nocapture --with-coverage --cover-erase --cover-package echocolor --cover-inclusive tests/\n\n\nExamples\n--------\n\nBasic usage would would involve ``echo`` and ``err``, which write to stdout and \nstderr respectively. The methods available on them are dynamically defined from \na list of colors (see full list at the end of readme). ``echo`` and ``err`` \nprovide methods for normal foreground and background coloring. The structure of \nthe method names is ``echo.`` for foreground colors, and ``echo._on_`` \nfor foreground on background colors.\n\n.. code:: python\n\n from echocolor import echo, err\n\n echo.cyan(\"This text will be cyan\")\n echo.magenta_on_yellow(\"This text will be magenta with a yellow background and will look terrible\")\n err.light_red(\"This text will be red and written to stderr instead of stdout\")\n\nIn addition to colors, bold and underlined text are also possible:\n\n.. code:: python\n\n echo.bold(\"This text will be bold\")\n echo.underline(\"And this will be underlined\")\n\nIf you want to color strings without printing them, import ``colors``:\n\n.. code:: python\n\n from echocolor import echo\n from echocolor.colors import light_green\n\n green_text = light_green(\"This part will be green\")\n print(\"This part will be regular. \" + green_text)\n\nHowever, since the strings end with the escape code to reset all\nstyling, doing something like the following will result in the second\npart of the line being unstyled:\n\n.. code:: python\n\n from echocolor import echo\n from echocolor.colors import magenta\n\n echo.underline(magenta(\"This text will be magenta and underlined.\") + \" But this text will be unstyled.\")\n\nBy default, if stdout is being redirected then all the echo output will\nbe unformatted. That can be changed by setting\n``echo.force_color = True``.\n\nColors\n------\n\nThe following colors are supported along with any combination of ``_on_``. The full list can also be seen from the code by checking the value of ``echocolor.terminal_codes.COLORS``. \n\n::\n\n black\n red\n green\n yellow\n blue\n magenta\n cyan\n light_gray\n dark_gray\n light_red\n light_green\n light_yellow\n light_blue\n light_magenta\n light_cyan\n white\n\n\n\n.. |pipeline status| image:: https://gitlab.com/danielhones/echocolor/badges/master/pipeline.svg\n :target: https://gitlab.com/danielhones/echocolor/commits/master\n.. |coverage report| image:: https://gitlab.com/danielhones/echocolor/badges/master/coverage.svg\n :target: https://gitlab.com/danielhones/echocolor/commits/master\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/danielhones/echocolor", "keywords": "terminal,ansi,print,color", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "echocolor", "package_url": "https://pypi.org/project/echocolor/", "platform": "", "project_url": "https://pypi.org/project/echocolor/", "project_urls": { "Homepage": "https://gitlab.com/danielhones/echocolor" }, "release_url": "https://pypi.org/project/echocolor/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "Simple interface for printing colored text to a terminal", "version": "2.0.0" }, "last_serial": 3382168, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "bfbb6169cffcc682d58bfd9c6eb277e4", "sha256": "1ff4cda8547b32135d3eaeb1efeedb3346ae94f583faff88279f58e983fabd24" }, "downloads": -1, "filename": "echocolor-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bfbb6169cffcc682d58bfd9c6eb277e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7163, "upload_time": "2017-12-02T06:17:32", "url": "https://files.pythonhosted.org/packages/ec/a4/1281ab2b134abcf6242789183554af80d88e451fe02690865fa5d68a0bd0/echocolor-2.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bfbb6169cffcc682d58bfd9c6eb277e4", "sha256": "1ff4cda8547b32135d3eaeb1efeedb3346ae94f583faff88279f58e983fabd24" }, "downloads": -1, "filename": "echocolor-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bfbb6169cffcc682d58bfd9c6eb277e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7163, "upload_time": "2017-12-02T06:17:32", "url": "https://files.pythonhosted.org/packages/ec/a4/1281ab2b134abcf6242789183554af80d88e451fe02690865fa5d68a0bd0/echocolor-2.0.0-py2.py3-none-any.whl" } ] }