pastel


Namepastel JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/sdispater/pastel
SummaryBring colors to your terminal.
upload_time2020-09-16 19:21:12
maintainer
docs_urlNone
authorSébastien Eustace
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            Pastel: Bring colors to your terminal
#####################################

Pastel is a simple library to help you colorize strings in your terminal.

It comes bundled with predefined styles:

* ``info``: green
* ``comment``: yellow
* ``question``: black on cyan
* ``error``: white on red

.. image:: https://raw.githubusercontent.com/sdispater/pastel/master/assets/screenshot.png


Features
========

* Use predefined styles or add you own.
* Disable colors all together by calling ``with_colors(False)``.
* Automatically disables colors if the output is not a TTY.
* Used in `cleo <https://github.com/sdispater/cleo>`_.
* Supports Python **2.7+**, **3.5+** and **PyPy**.


Usage
=====

.. code-block:: python

    >>> import pastel
    >>> print(pastel.colorize('<info>Information</info>'))
    'Information'  # Green string by default
    >>> print(pastel.colorize('<fg=red;options=bold>This is bold red</>'))
    'This is bold red'


Installation
============

.. code-block::

    pip install pastel

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sdispater/pastel",
    "name": "pastel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
    "maintainer_email": "",
    "keywords": "",
    "author": "S\u00e9bastien Eustace",
    "author_email": "sebastien@eustace.io",
    "download_url": "https://files.pythonhosted.org/packages/76/f1/4594f5e0fcddb6953e5b8fe00da8c317b8b41b547e2b3ae2da7512943c62/pastel-0.2.1.tar.gz",
    "platform": "",
    "description": "Pastel: Bring colors to your terminal\n#####################################\n\nPastel is a simple library to help you colorize strings in your terminal.\n\nIt comes bundled with predefined styles:\n\n* ``info``: green\n* ``comment``: yellow\n* ``question``: black on cyan\n* ``error``: white on red\n\n.. image:: https://raw.githubusercontent.com/sdispater/pastel/master/assets/screenshot.png\n\n\nFeatures\n========\n\n* Use predefined styles or add you own.\n* Disable colors all together by calling ``with_colors(False)``.\n* Automatically disables colors if the output is not a TTY.\n* Used in `cleo <https://github.com/sdispater/cleo>`_.\n* Supports Python **2.7+**, **3.5+** and **PyPy**.\n\n\nUsage\n=====\n\n.. code-block:: python\n\n    >>> import pastel\n    >>> print(pastel.colorize('<info>Information</info>'))\n    'Information'  # Green string by default\n    >>> print(pastel.colorize('<fg=red;options=bold>This is bold red</>'))\n    'This is bold red'\n\n\nInstallation\n============\n\n.. code-block::\n\n    pip install pastel\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Bring colors to your terminal.",
    "version": "0.2.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "6e874cfcdbd4bcc288594f805d8c7940",
                "sha256": "4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"
            },
            "downloads": -1,
            "filename": "pastel-0.2.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e874cfcdbd4bcc288594f805d8c7940",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 5955,
            "upload_time": "2020-09-16T19:21:11",
            "upload_time_iso_8601": "2020-09-16T19:21:11.409600Z",
            "url": "https://files.pythonhosted.org/packages/aa/18/a8444036c6dd65ba3624c63b734d3ba95ba63ace513078e1580590075d21/pastel-0.2.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ff5ae4454b56dd7efd5fc99909212ec9",
                "sha256": "e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"
            },
            "downloads": -1,
            "filename": "pastel-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ff5ae4454b56dd7efd5fc99909212ec9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 7555,
            "upload_time": "2020-09-16T19:21:12",
            "upload_time_iso_8601": "2020-09-16T19:21:12.430848Z",
            "url": "https://files.pythonhosted.org/packages/76/f1/4594f5e0fcddb6953e5b8fe00da8c317b8b41b547e2b3ae2da7512943c62/pastel-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-09-16 19:21:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "sdispater",
    "github_project": "pastel",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "tox": true,
    "lcname": "pastel"
}
        
Elapsed time: 0.03215s