crayons


Namecrayons JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/MasterOdin/crayons
SummaryTextUI colors for Python.
upload_time2020-08-26 21:34:16
maintainerMatthew Peveler
docs_urlNone
authorKenneth Reitz
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
Crayons: Text UI colors for Python.
===================================

.. image:: https://img.shields.io/pypi/v/crayons.svg
    :target: https://pypi.org/project/crayons/

.. image:: https://github.com/MasterOdin/crayons/workflows/Test/badge.svg
    :target: https://github.com/MasterOdin/crayons/actions?query=workflow%3ATest+branch%3Amaster

.. image:: https://img.shields.io/pypi/l/crayons.svg
    :target: https://pypi.python.org/pypi/crayons

.. image:: https://img.shields.io/pypi/wheel/crayons.svg
    :target: https://pypi.python.org/pypi/crayons

.. image:: https://img.shields.io/pypi/pyversions/crayons.svg
    :target: https://pypi.python.org/pypi/crayons


This module is really simple, it gives you colored strings for terminal
usage. Included colors are ``red``, ``green``, ``yellow``, ``blue``, ``black``, ``magenta``, ``cyan``, ``white``, and
``normal`` (as well as ``clean`` and ``disable``).

**Crayons** is nice because it automatically wraps a given string in both the foreground color, as well as returning to the
original state after the string is complete. Most terminal color libraries make you manage this yourself.


.. image:: https://d3vv6lp55qjaqc.cloudfront.net/items/3q0I293q1z293R3a3a3n/Screen%20Shot%202017-01-23%20at%206.00.02%20PM.png?X-CloudApp-Visitor-Id=2577


Arguments include ``always=True`` and ``bold=True``.

Features
--------

- If you call ``disable()``, all future calls to colors will be ignored.
- If you call ``normal()``, color is reset to default foreground color
- If the current process is not in a TTY (e.g. being piped), no colors will be displayed.
- Length of ColoredStrings can be properly calculated.
- Powered by colorama.

Usage is simple
---------------

::

    # red is red, white is white.
    >>> print('{} white'.format(crayons.red('red')))
    red white

That's it!

Installation
------------

::

    $ pip install crayons



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MasterOdin/crayons",
    "name": "crayons",
    "maintainer": "Matthew Peveler",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "matt.peveler@gmail.com",
    "keywords": "",
    "author": "Kenneth Reitz",
    "author_email": "me@kennethreitz.com",
    "download_url": "https://files.pythonhosted.org/packages/b8/6b/12a1dea724c82f1c19f410365d3e25356625b48e8009a7c3c9ec4c42488d/crayons-0.4.0.tar.gz",
    "platform": "",
    "description": "\nCrayons: Text UI colors for Python.\n===================================\n\n.. image:: https://img.shields.io/pypi/v/crayons.svg\n    :target: https://pypi.org/project/crayons/\n\n.. image:: https://github.com/MasterOdin/crayons/workflows/Test/badge.svg\n    :target: https://github.com/MasterOdin/crayons/actions?query=workflow%3ATest+branch%3Amaster\n\n.. image:: https://img.shields.io/pypi/l/crayons.svg\n    :target: https://pypi.python.org/pypi/crayons\n\n.. image:: https://img.shields.io/pypi/wheel/crayons.svg\n    :target: https://pypi.python.org/pypi/crayons\n\n.. image:: https://img.shields.io/pypi/pyversions/crayons.svg\n    :target: https://pypi.python.org/pypi/crayons\n\n\nThis module is really simple, it gives you colored strings for terminal\nusage. Included colors are ``red``, ``green``, ``yellow``, ``blue``, ``black``, ``magenta``, ``cyan``, ``white``, and\n``normal`` (as well as ``clean`` and ``disable``).\n\n**Crayons** is nice because it automatically wraps a given string in both the foreground color, as well as returning to the\noriginal state after the string is complete. Most terminal color libraries make you manage this yourself.\n\n\n.. image:: https://d3vv6lp55qjaqc.cloudfront.net/items/3q0I293q1z293R3a3a3n/Screen%20Shot%202017-01-23%20at%206.00.02%20PM.png?X-CloudApp-Visitor-Id=2577\n\n\nArguments include ``always=True`` and ``bold=True``.\n\nFeatures\n--------\n\n- If you call ``disable()``, all future calls to colors will be ignored.\n- If you call ``normal()``, color is reset to default foreground color\n- If the current process is not in a TTY (e.g. being piped), no colors will be displayed.\n- Length of ColoredStrings can be properly calculated.\n- Powered by colorama.\n\nUsage is simple\n---------------\n\n::\n\n    # red is red, white is white.\n    >>> print('{} white'.format(crayons.red('red')))\n    red white\n\nThat's it!\n\nInstallation\n------------\n\n::\n\n    $ pip install crayons\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "TextUI colors for Python.",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/MasterOdin/crayons"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b0de3fad4ca1de8e70e06444e7d777a5984261e1db98758b5be3e8296c03fe9",
                "md5": "77656d7fa974e0da626062f045b5ea07",
                "sha256": "e73ad105c78935d71fe454dd4b85c5c437ba199294e7ffd3341842bc683654b1"
            },
            "downloads": -1,
            "filename": "crayons-0.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77656d7fa974e0da626062f045b5ea07",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 4629,
            "upload_time": "2020-08-26T21:34:15",
            "upload_time_iso_8601": "2020-08-26T21:34:15.284659Z",
            "url": "https://files.pythonhosted.org/packages/5b/0d/e3fad4ca1de8e70e06444e7d777a5984261e1db98758b5be3e8296c03fe9/crayons-0.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b86b12a1dea724c82f1c19f410365d3e25356625b48e8009a7c3c9ec4c42488d",
                "md5": "88a79c854ce54bcbb8376d18a448d627",
                "sha256": "bd33b7547800f2cfbd26b38431f9e64b487a7de74a947b0fafc89b45a601813f"
            },
            "downloads": -1,
            "filename": "crayons-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "88a79c854ce54bcbb8376d18a448d627",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4582,
            "upload_time": "2020-08-26T21:34:16",
            "upload_time_iso_8601": "2020-08-26T21:34:16.592131Z",
            "url": "https://files.pythonhosted.org/packages/b8/6b/12a1dea724c82f1c19f410365d3e25356625b48e8009a7c3c9ec4c42488d/crayons-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-08-26 21:34:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MasterOdin",
    "github_project": "crayons",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "crayons"
}
        
Elapsed time: 0.29402s