{ "info": { "author": "Robert Oliveira", "author_email": "oliveira.rlde@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: User Interfaces", "Topic :: Terminals", "Topic :: Text Processing :: General", "Topic :: Utilities" ], "description": "============\nprettystring\n============\n.. image:: https://travis-ci.org/robolivable/prettystring.svg?branch=master\n :target: https://travis-ci.org/robolivable/prettystring\n\nUse prettystring to build colorful strings for more engaging output.\n\nPrettystrings are conveniently encoded with the proper ANSI color codes based\non the colors you specify for them.\n\n============\nInstallation\n============\nInstall using ``pip``:\n\n::\n\n pip install prettystring\n\n=====\nUsage\n=====\n\nAs straight forward as you may think:\n\n::\n\n >>> from prettystring import prettystring as pstr\n >>> colorful = pstr('sweet!')\n >>> colorful.__str__()\n '\\x1b[;39;49msweet!\\x1b[0m'\n\nPrettystrings are initialized with default ANSI code values. ``sweet!`` should be\nin default colors. Paint it with ``paint()``:\n\n::\n\n >>> colorful.paint(pstr.blue)\n >>> colorful.__str__()\n '\\x1b[;34;49msweet!\\x1b[0m'\n >>> print colorful\n sweet!\n\nThe value of ``colorful`` will show up blue when ``print`` is called on it.\n\nYou can also initialize prettystrings with a style:\n\n::\n\n >>> stylish = pstr('the answer is 42', pstr.blink, pstr.green, pstr.bgblue)\n >>> stylish.__str__()\n '\\x1b[5;32;44mthe answer is 42\\x1b[0m'\n >>> print stylish\n the answer is 42\n\nYou can even format:\n\n::\n\n >>> pstr('Hello {}!').paint(pstr.red).format(pstr('world').paint(pstr.blue))\n '\\x1b[;31;49mHello \\x1b[;34;49mworld\\x1b[0m\\x1b[;31;49m!\\x1b[0m'\n\n*Note that format returns a regular string. This is a known limitation, and is\nbeing worked on.*\n\n==================\nPrettystring Enums\n==================\nUse these enum values with the ``paint()`` method to apply color and formatting\nto prettystrings.\n\nNote that you can only apply one style, one color, and one background color at\na time (no mixing colors [yet]).\n\n===================\nStyles (Formatting)\n===================\n::\n\n prettystring.styledefault\n prettystring.bold\n prettystring.dim\n prettystring.underline\n prettystring.blink\n prettystring.invert\n prettystring.hidden\n\n======\nColors\n======\n::\n\n prettystring.default\n prettystring.black\n prettystring.red\n prettystring.green\n prettystring.yellow\n prettystring.blue\n prettystring.magenta\n prettystring.cyan\n prettystring.light\n prettystring.dark\n\n============\nLight colors\n============\n::\n\n prettystring.lred\n prettystring.lgreen\n prettystring.lyellow\n prettystring.lblue\n prettystring.lmagenta\n prettystring.lcyan\n prettystring.white\n\n=================\nBackground colors\n=================\n::\n\n prettystring.bgdefault\n prettystring.bgblack\n prettystring.bgred\n prettystring.bggreen\n prettystring.bgyellow\n prettystring.bgblue\n prettystring.bgmagenta\n prettystring.bgcyan\n prettystring.bglight\n prettystring.bgdark\n\n=======================\nLight background colors\n=======================\n::\n\n prettystring.bglred\n prettystring.bglgreen\n prettystring.bglyellow\n prettystring.bglblue\n prettystring.bglmagenta\n prettystring.bglcyan\n prettystring.bgwhite\n\n=============\nCompatibility\n=============\nPrettystring is sure to work in most Unix based environments. Official\ncompatibility tests/upgrades are soon to come.\n\n============\nContribution\n============\nFeel free to make prettystring better by submitting a pull request. I will\nreview your submission as soon as possible.\n\n=======\nLicense\n=======\nThis software is distributed under the MIT License. See LICENSE.md for details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robolivable/prettystring", "keywords": "color colorful pretty string strings", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "prettystring", "package_url": "https://pypi.org/project/prettystring/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prettystring/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/robolivable/prettystring" }, "release_url": "https://pypi.org/project/prettystring/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Build ANSI color encoded strings with ease.", "version": "0.1.1" }, "last_serial": 2509727, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "56404890d47bf1240d64f9e0cd5d51b3", "sha256": "049d9828a658ef4e359e2497e7cb3ae991f2e22ce165f522230d3f56733cfd81" }, "downloads": -1, "filename": "prettystring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "56404890d47bf1240d64f9e0cd5d51b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5166, "upload_time": "2016-12-09T20:12:51", "url": "https://files.pythonhosted.org/packages/05/3e/0411dbc813da22c96923f1ea8fae175782484bd68c2c2b051fdbfc0cceb3/prettystring-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2785041e0ad4d77bc744e6c70d5308b8", "sha256": "27b7e1599326e24c9615ad8f4120814d315bee87293e3b3728ee1a6da58e8224" }, "downloads": -1, "filename": "prettystring-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2785041e0ad4d77bc744e6c70d5308b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5170, "upload_time": "2016-12-09T20:23:31", "url": "https://files.pythonhosted.org/packages/e5/35/5895e9f5f1f32cdab4618b560c83849eac738eab94ba97cf5eb8b199de55/prettystring-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2785041e0ad4d77bc744e6c70d5308b8", "sha256": "27b7e1599326e24c9615ad8f4120814d315bee87293e3b3728ee1a6da58e8224" }, "downloads": -1, "filename": "prettystring-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2785041e0ad4d77bc744e6c70d5308b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5170, "upload_time": "2016-12-09T20:23:31", "url": "https://files.pythonhosted.org/packages/e5/35/5895e9f5f1f32cdab4618b560c83849eac738eab94ba97cf5eb8b199de55/prettystring-0.1.1.tar.gz" } ] }