{ "info": { "author": "Fardin Allahverdinazhand", "author_email": "0x0ptim0us@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "ezcolor\n========\n\n.. image:: https://api.codacy.com/project/badge/Grade/5384da344156447daa23f588fc8fbae6\n :target: https://app.codacy.com/app/0x0ptim0us/ezcolor?utm_source=github.com&utm_medium=referral&utm_content=0x0ptim0us/ezcolor&utm_campaign=Badge_Grade_Dashboard\n\nPython colorizing strings library\n\nA lightweight library for applying color and HTML text styles to the strings\nthat uses the builder pattern for configuration. The ezcolor lets you have nice\ncolorized output with extra HTML text styles like bold/italic/underline.\ncompatible with bash/sh/zsh.\n\nFeatures\n--------\n- A simple to use API\n- lightweight and written in pure python\n- Tested on python 3.6+ (not compatible with python2.x)\n- Not compatible with windows OS (command prompt, powershell)\n\nUsage\n--------\n\n.. code-block:: bash\n\n $ pip install ezcolor\n\n.. code-block:: python\n\n from ezcolor import Style\n style = Style()\n cp = style.add.foreground('green').apply()\n cp('hello world')\n\n.. image:: https://github.com/0x0ptim0us/images/raw/master/ezcolor_simple_output.png\n\nAdding more attributes\n----------------------\n\n.. code-block:: python\n\n cp = style.add.foreground('green').background('dark_gray').bold.italic.underline.apply()\n cp('hello world')\n\n.. image:: https://github.com/0x0ptim0us/images/raw/master/ezcolor_more_attribute.png\n\nAdding prefix for beautiful logging\n-----------------------------------\n\n.. code-block:: python\n\n cp = style.add.foreground('green').prefix('done').bold.italic.apply()\n cp('Job is done!')\n cp_error = style.add.foreground('red').prefix('error').bold.italic.apply()\n cp_error('Error occurred!')\n\n.. image:: https://github.com/0x0ptim0us/images/raw/master/ezcolor_prefix_done.png\n.. image:: https://github.com/0x0ptim0us/images/raw/master/ezcolor_prefix_error.png\n\nUse as decorator\n----------------\n\n.. code-block:: python\n\n @cp.decorate\n def my_name(name, lastname):\n return f\"my name is {name} {lastname}\"\n\n print(my_name('Fardin', 'Allahverdinazhand'))\n\n.. csv-table:: Supported colors and prefix (log level)\n :header: \"Color\", \"prefix\"\n :widths: 20, 20\n\n \"black\", \"done\"\n \"red\", \"info\"\n \"green\", \"warning\"\n \"yellow\", \"error\"\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\nMeta\n----\nFardin Allahverdinazhand - `@0x0ptim0us `_ - 0x0ptim0us@gmail.com\nDistributed under the MIT license. see `LICENSE.txt `_ for more information.\n\nhttps://github.com/0x0ptim0us/ezcolor", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/0x0ptim0us/ezcolor/tarball/0.7", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/0x0ptim0us/ezcolor", "keywords": "python3", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ezcolor", "package_url": "https://pypi.org/project/ezcolor/", "platform": "", "project_url": "https://pypi.org/project/ezcolor/", "project_urls": { "Download": "https://github.com/0x0ptim0us/ezcolor/tarball/0.7", "Homepage": "https://github.com/0x0ptim0us/ezcolor" }, "release_url": "https://pypi.org/project/ezcolor/0.7/", "requires_dist": null, "requires_python": "", "summary": "A lightweight pure python library for applying color and HTML text styles to the strings", "version": "0.7" }, "last_serial": 4950780, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "00c462fc266dae8860459c7d865f8b86", "sha256": "556b613c13d0a567a3010750f6cbe0011ab34bd75bc13d5bffc9254aabe0ee21" }, "downloads": -1, "filename": "ezcolor-0.1.tar.gz", "has_sig": false, "md5_digest": "00c462fc266dae8860459c7d865f8b86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1332, "upload_time": "2017-07-31T19:39:44", "url": "https://files.pythonhosted.org/packages/b4/eb/be2e68fa4a7900e1def721c7d38c79f99bf7f33afc1b5f29ecc362a2ce2b/ezcolor-0.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "8f8022f0b10d813141d214bf7295b285", "sha256": "f6d328e6a6d046265888a5c37a1ae8c1e720e6005c3c73db43863d927e89c017" }, "downloads": -1, "filename": "ezcolor-0.4.tar.gz", "has_sig": false, "md5_digest": "8f8022f0b10d813141d214bf7295b285", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1893, "upload_time": "2019-03-14T21:48:13", "url": "https://files.pythonhosted.org/packages/91/b1/aecd32e36dfe82e5cbdfefcc5d52868050a5e7b4925d134906d003619c64/ezcolor-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "9514a8e75781638ca5369a9959d016c5", "sha256": "5c8ad361b9b9ade6d4646f9c63dc49f0093bc0919c98c137d301e42b219d650d" }, "downloads": -1, "filename": "ezcolor-0.5.tar.gz", "has_sig": false, "md5_digest": "9514a8e75781638ca5369a9959d016c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1717, "upload_time": "2019-03-14T21:55:51", "url": "https://files.pythonhosted.org/packages/75/37/7de0327fc41488a9c59c316fcf9a7e11b096ed61b04c234a95ce03ada912/ezcolor-0.5.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "16248f574efc970a14e2a868915004d3", "sha256": "f7a5d26ff8d75b765bf4622385f0d287541edf1c490eefbd1631f0b9e801253f" }, "downloads": -1, "filename": "ezcolor-0.7.tar.gz", "has_sig": false, "md5_digest": "16248f574efc970a14e2a868915004d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3373, "upload_time": "2019-03-17T17:01:34", "url": "https://files.pythonhosted.org/packages/46/11/2f1cae292c09df309c5cb18bbb9751758507f20b384121bd562863b0f614/ezcolor-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16248f574efc970a14e2a868915004d3", "sha256": "f7a5d26ff8d75b765bf4622385f0d287541edf1c490eefbd1631f0b9e801253f" }, "downloads": -1, "filename": "ezcolor-0.7.tar.gz", "has_sig": false, "md5_digest": "16248f574efc970a14e2a868915004d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3373, "upload_time": "2019-03-17T17:01:34", "url": "https://files.pythonhosted.org/packages/46/11/2f1cae292c09df309c5cb18bbb9751758507f20b384121bd562863b0f614/ezcolor-0.7.tar.gz" } ] }