{ "info": { "author": "pyfancy", "author_email": "aquahydration@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "|Build Status| |FOSSA Status Shield Badge|\n\nDownload\n~~~~~~~~\n\nGo to the `releases\npage `__ and download\nthe latest (or previous) version.\n\nOr use pip ``pip install git+https://github.com/ilovecode1/Pyfancy-2/``\n\nOverview\n~~~~~~~~\n\npyfancy is a simple Python library that provides a mechanism for easily\nstyling text in some terminal environments. Text is styled by chaining\ntogether methods that add escape codes for color modifiers to the text.\n\nUsage\n~~~~~\n\nFormatting using pyfancy all follows the same basic pattern. First,\nthere is the initializer, which just sets up the pyfancy object. Next is\na chain of function calls that provide text formatting. Finally, there\nis a last method chained on which either returns the text string with\nformat escape codes, or which directly outputs the text using the print\nstatement / method. (The output method *should* be compatible with\nPython 2 and 3.)\n\nThis chain of code looks basically like this:\n\n.. code:: python\n\n pyfancy().[chained statements].output() # To print using print statement / method\n pyfancy().[chained statements].get() # To get formatted text string\n\nThere are two different ways to use the chained statements. The first is\nto provide the text that is to be chained as part of the statement call.\nFor example, the following prints \u201cHello, world!\u201d in red:\n\n.. code:: python\n\n pyfancy().red(\"Hello, world!\").output()\n\nHowever, chained statements are really just modifiers with an optional\ntext argument. The following example works identically to the previous\nexample:\n\n.. code:: python\n\n pyfancy().red().add(\"Hello, world!\").output()\n\nUsing chained statements, then, allows for modifiers to be stacked:\n\n.. code:: python\n\n pyfancy().red().bold().add(\"Hello, world!\").output()\n\n # or\n\n pyfancy().red().bold(\"Hello, world!\").output()\n\n # The red() and bold() calls can also be in the opposite order.\n\nOf course, there can only be, for example, one color active at a time.\nThis allows for the creation of multicolored statements:\n\n.. code:: python\n\n pyfancy().red(\"Hello\").magenta(\", \").blue(\"world!\").output()\n\nIt is also possible to reset all styles, either to get default styling,\nor to ensure that styles are reset, using the ``raw`` modifier:\n\n.. code:: python\n\n pyfancy().raw(\"You walk into a \").red().bold(\"DANGEROUS\").raw(\" room.\").output()\n\nParsing is a simple, shorter and faster way to use Pyfancy 2. Instead\nof:\n\n.. code:: python\n\n pyfancy().red(\"Hello\").blue(\" world!\").output()\n\nYou can do this:\n\n.. code:: python\n\n pyfancy(\"{red Hello {blue world!}}\").output()\n\nFor parsing you can also import from a text file:\n\n.. code:: python\n\n pyfancy().open(\"import.txt\").output()\n\nIn order to use pyfancy, import the module with\n``from pyfancy import *``.\n\nTypes of effects\n~~~~~~~~~~~~~~~~\n\n+-------------+-----------------+--------------+\n| Text Effect | Background | |\n+=============+=================+==============+\n| | | |\n+-------------+-----------------+--------------+\n| bold | n/a | |\n+-------------+-----------------+--------------+\n| dim | n/a | Light/Dark |\n+-------------+-----------------+--------------+\n| underlined | n/a | n/a |\n+-------------+-----------------+--------------+\n| blinking | n/a | n/a |\n+-------------+-----------------+--------------+\n| black | black_bg | n/a |\n+-------------+-----------------+--------------+\n| red | red_bg | dark_red |\n+-------------+-----------------+--------------+\n| green | green_bg | dark_green |\n+-------------+-----------------+--------------+\n| yellow | yellow_bg | dark_yellow |\n+-------------+-----------------+--------------+\n| blue | blue_bg | dark_blue |\n+-------------+-----------------+--------------+\n| magenta | n/a | dark_magenta |\n+-------------+-----------------+--------------+\n| cyan | n/a | dark_cyan |\n+-------------+-----------------+--------------+\n| n/a | gray_bg | light_gray |\n+-------------+-----------------+--------------+\n| white | n/a | n/a |\n+-------------+-----------------+--------------+\n| rainbow | n/a | n/a |\n+-------------+-----------------+--------------+\n| multi | n/a | n/a |\n+-------------+-----------------+--------------+\n| n/a | dark_gray_bg | dark_gray |\n+-------------+-----------------+--------------+\n| n/a | light_red_bg | light_red |\n+-------------+-----------------+--------------+\n| n/a | light_green_bg | light_green |\n+-------------+-----------------+--------------+\n| n/a | light_yellow_bg | light_yellow |\n+-------------+-----------------+--------------+\n| n/a | light_blue_bg | light_blue |\n+-------------+-----------------+--------------+\n| n/a | light_purple_bg | light_purple |\n+-------------+-----------------+--------------+\n| n/a | light_cyan_bg | light_cyan |\n+-------------+-----------------+--------------+\n| n/a | white_bg | white |\n+-------------+-----------------+--------------+\n\nLicense\n~~~~~~~\n\nPyfancy-2 is under the MIT license.\n\n|FOSSA Status Large Badge|\n\nContributors\n~~~~~~~~~~~~\n\n*Note:* Because v2 was made in a `fork`_ the contribution graph does not truely reflect the contributions made by the bellow contributers.\n\nProject by `CosmicWebServices`_\n\n`TheMonsterFromTheDeep`_\n\n`joker314`_\n\n`baranskistad`_\n\n`jonathan50`_\n\n`rogersouza`_\n\n`vutondesign`_\n\n`cruxicheiros`_\n\n`hiccup01`_\n\n`Kristinita`_\n\n.. _CosmicWebServices: https://github.com/CosmicWebServices\n.. _TheMonsterFromTheDeep: https://github.com/TheMonsterFromTheDeep\n.. _joker314: https://github.com/joker314\n.. _baranskistad: https://github.com/baranskistad\n.. _jonathan50: https://github.com/Jonathan50\n.. _rogersouza: https://github.com/rogersouza\n.. _vutondesign: https://github.com/vutondesign\n.. _cruxicheiros: https://github.com/cruxicheiros\n.. _hiccup01: https://github.com/hiccup01\n.. _Kristinita: https://github.com/Kristinita\n.. _fork: https://github.com/TheMonsterFromTheDeep/pyfancy\n\n.. |Build Status| image:: https://travis-ci.org/ilovecode1/Pyfancy-2.svg?branch=master\n :target: https://travis-ci.org/ilovecode1/Pyfancy-2\n.. |FOSSA Status Shield Badge| image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Filovecode1%2FPyfancy-2.svg?type=shield\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Filovecode1%2FPyfancy-2?ref=badge_shield\n.. |FOSSA Status Large Badge| image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Filovecode1%2FPyfancy-2.svg?type=large\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Filovecode1%2FPyfancy-2?ref=badge_large\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://github.com/ilovecode1/Pyfancy-2", "keywords": "pyfancy ansi color colour terminal", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyfancy", "package_url": "https://pypi.org/project/pyfancy/", "platform": "", "project_url": "https://pypi.org/project/pyfancy/", "project_urls": { "Homepage": "https://github.com/ilovecode1/Pyfancy-2" }, "release_url": "https://pypi.org/project/pyfancy/2.4.5/", "requires_dist": null, "requires_python": "", "summary": "\"Simple terminal formatting in Python\"", "version": "2.4.5" }, "last_serial": 3644901, "releases": { "2.4.4": [ { "comment_text": "", "digests": { "md5": "e165add647226151afd79814bbd11a15", "sha256": "21bf12686680ce7e49f95a9222275a139a6dd5f569ce8caa4c05ce403df773e1" }, "downloads": -1, "filename": "pyfancy-2.4.4.tar.gz", "has_sig": false, "md5_digest": "e165add647226151afd79814bbd11a15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3510, "upload_time": "2018-02-04T19:22:57", "url": "https://files.pythonhosted.org/packages/6b/9d/7d081290c825517b7b5ad3cb42db2353a05582c2e7ecadb2695601eb2eb7/pyfancy-2.4.4.tar.gz" } ], "2.4.5": [ { "comment_text": "", "digests": { "md5": "78cea7b529af3b8a3728b13c7e132cea", "sha256": "1bea397281522f4475181a423e5e7ffcca0417246ce5141927f0bdfef93ecded" }, "downloads": -1, "filename": "pyfancy-2.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "78cea7b529af3b8a3728b13c7e132cea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8979, "upload_time": "2018-03-06T16:52:59", "url": "https://files.pythonhosted.org/packages/f5/85/e4a6fbb9dac5b6f9566e2302319892413f997562adef64bbf5d606832d9d/pyfancy-2.4.5-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "78cea7b529af3b8a3728b13c7e132cea", "sha256": "1bea397281522f4475181a423e5e7ffcca0417246ce5141927f0bdfef93ecded" }, "downloads": -1, "filename": "pyfancy-2.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "78cea7b529af3b8a3728b13c7e132cea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8979, "upload_time": "2018-03-06T16:52:59", "url": "https://files.pythonhosted.org/packages/f5/85/e4a6fbb9dac5b6f9566e2302319892413f997562adef64bbf5d606832d9d/pyfancy-2.4.5-py2.py3-none-any.whl" } ] }