ansi


Nameansi JSON
Version 0.3.7 PyPI version JSON
download
home_pagehttps://github.com/tehmaze/ansi/
SummaryANSI cursor movement and graphics
upload_time2024-01-22 00:52:48
maintainer
docs_urlNone
authorWijnand Modderman-Lenstra
requires_python>=3.6
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ANSI
====

Various ANSI escape codes, used in moving the cursor in a text console or
rendering coloured text.


Example
-------

Print something in bold yellow on a red background:

    >>> from ansi.colour import fg, bg
    >>> from ansi.colour.fx import reset
    >>> msg = (bg.red, fg.yellow, 'Hello world!', reset)
    >>> print(''.join(map(str, msg)))
    ...

If you like syntactic sugar, you may also do:

    >>> from ansi.colour import fg, bg
    >>> print(bg.red(fg.yellow('Hello world!')))
    ...

Also, 256 RGB colours are supported:

    >>> from ansi.colour.rgb import rgb256
    >>> from ansi.colour.fx import reset
    >>> msg = (rgb256(0xff, 0x80, 0x00), 'hello world', reset)
    >>> print(''.join(map(str, msg)))
    ...

If you prefer to use American English instead:

    >>> from ansi.color import ...
    

References
----------

https://www.ecma-international.org/publications-and-standards/standards/ecma-48/


Requirements
------------
Ansi requires python 3.6 and supports typing.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tehmaze/ansi/",
    "name": "ansi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Wijnand Modderman-Lenstra",
    "author_email": "maze@pyth0n.org",
    "download_url": "https://files.pythonhosted.org/packages/ed/58/9444d8e465858ae9cb2096aa48236ab5760ea9dbaac58e609f3b461776de/ansi-0.3.7.tar.gz",
    "platform": null,
    "description": "ANSI\n====\n\nVarious ANSI escape codes, used in moving the cursor in a text console or\nrendering coloured text.\n\n\nExample\n-------\n\nPrint something in bold yellow on a red background:\n\n    >>> from ansi.colour import fg, bg\n    >>> from ansi.colour.fx import reset\n    >>> msg = (bg.red, fg.yellow, 'Hello world!', reset)\n    >>> print(''.join(map(str, msg)))\n    ...\n\nIf you like syntactic sugar, you may also do:\n\n    >>> from ansi.colour import fg, bg\n    >>> print(bg.red(fg.yellow('Hello world!')))\n    ...\n\nAlso, 256 RGB colours are supported:\n\n    >>> from ansi.colour.rgb import rgb256\n    >>> from ansi.colour.fx import reset\n    >>> msg = (rgb256(0xff, 0x80, 0x00), 'hello world', reset)\n    >>> print(''.join(map(str, msg)))\n    ...\n\nIf you prefer to use American English instead:\n\n    >>> from ansi.color import ...\n    \n\nReferences\n----------\n\nhttps://www.ecma-international.org/publications-and-standards/standards/ecma-48/\n\n\nRequirements\n------------\nAnsi requires python 3.6 and supports typing.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "ANSI cursor movement and graphics",
    "version": "0.3.7",
    "project_urls": {
        "Homepage": "https://github.com/tehmaze/ansi/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e448244b092c39aa39cb61afcb5d64f4a2a22bf9ab291d5f689a9406d158d04",
                "md5": "aa4830b46aae034f2a1db25b1239beef",
                "sha256": "bdd9e3c2dc3e4c8df8c2b745ca6f07f715aa4edee5ed4a5bcb29065da06a3f71"
            },
            "downloads": -1,
            "filename": "ansi-0.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa4830b46aae034f2a1db25b1239beef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9000,
            "upload_time": "2024-01-22T00:52:46",
            "upload_time_iso_8601": "2024-01-22T00:52:46.443452Z",
            "url": "https://files.pythonhosted.org/packages/0e/44/8244b092c39aa39cb61afcb5d64f4a2a22bf9ab291d5f689a9406d158d04/ansi-0.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed589444d8e465858ae9cb2096aa48236ab5760ea9dbaac58e609f3b461776de",
                "md5": "3a481a60390c5edf3b31f74057d37d57",
                "sha256": "7e59108922259e03c54e4d93fc611bba0e756513086849708b86b6c80f8d4cd4"
            },
            "downloads": -1,
            "filename": "ansi-0.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3a481a60390c5edf3b31f74057d37d57",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7926,
            "upload_time": "2024-01-22T00:52:48",
            "upload_time_iso_8601": "2024-01-22T00:52:48.076657Z",
            "url": "https://files.pythonhosted.org/packages/ed/58/9444d8e465858ae9cb2096aa48236ab5760ea9dbaac58e609f3b461776de/ansi-0.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-22 00:52:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tehmaze",
    "github_project": "ansi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "ansi"
}
        
Elapsed time: 0.23274s