ansimarkup


Nameansimarkup JSON
Version 2.1.0 PyPI version JSON
download
home_page
SummaryProduce colored terminal text with an xml-like markup
upload_time2023-08-27 15:07:50
maintainer
docs_urlNone
author
requires_python>=3.6
licenseBSD 3-Clause License Copyright (c) 2017, Georgi Valkov. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ansimarkup

<p>
    <a href="https://pypi.python.org/pypi/ansimarkup"><img alt="pypi version" src="https://img.shields.io/pypi/v/ansimarkup.svg"></a>
    <a href="https://github.com/gvalkov/python-ansimarkup/actions/workflows/tests.yml?query=branch:main"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/gvalkov/python-ansimarkup/tests.yml?branch=main"></a>
    <a href="https://github.com/gvalkov/python-ansimarkup/blob/main/LICENSE.txt"><img alt="License" src="https://img.shields.io/pypi/l/ansimarkup"></a>
</p>

Ansimarkup is an XML-like markup for producing colored terminal text.

``` python
from ansimarkup import ansiprint as print

print("<b>bold text</b>"))
print("<red>red text</red>", "<red,green>red text on a green background</red,green>")
print("<fg #ffaf00>orange text</fg #ffaf00>")
```

## Installation

The latest stable version of ansimarkup can be installed from PyPi:

``` bash
python3 -m pip install ansimarkup
```

## Usage

### Basic

``` python
from ansimarkup import parse, ansiprint

# parse() converts the tags to the corresponding ansi escape sequence.
parse("<b>bold</b> <d>dim</d>")

# ansiprint() works exactly like print(), but first runs parse() on all arguments.
ansiprint("<b>bold</b>", "<d>dim</d>")
ansiprint("<b>bold</b>", "<d>dim</d>", sep=":", file=sys.stderr)
```

### Colors and styles

``` python
# Colors may be specified in one of several ways.
parse("<red>red foreground</red>")
parse("<RED>red background</RED>")
parse("<fg red>red foreground</fg red>")
parse("<bg red>red background</bg red>")

# Xterm, hex and rgb colors are accepted by the <fg> and <bg> tags.
parse("<fg 86>aquamarine foreground</fg 86>")
parse("<bg #00005f>dark blue background</bg #00005f>")
parse("<fg 0,95,0>dark green foreground</fg 0,95,0>")

# Tags may be nested.
parse("<r><Y>red text on a yellow foreground</Y></r>")

# The above may be more concisely written as:
parse("<r,y>red text on a yellow background</r,y>")

# This shorthand also supports style tags.
parse("<b,r,y>bold red text on a yellow background</b,r,y>")
parse("<b,r,>bold red text</b,r,>")
parse("<b,,y>bold regular text on a yellow background</b,,y>")

# Unrecognized tags are left as-is.
parse("<b><element1></element1></b>")
```

For a list of markup tags, please refer to [tags.py].

### User-defined tags

Custom tags or overrides for existing tags may be defined by creating a
new `AnsiMarkup` instance:

``` python
from ansimarkup import AnsiMarkup, parse

user_tags = {
    # Add a new tag (e.g. we want <info> to expand to "<bold><green>").
    "info": parse("<b><g>")

    # The ansi escape sequence can be used directly.
    "info": "e\x1b[32m\x1b[1m",

    # Tag names may also be callables.
    "err":  lambda: parse("<r>")

    # Colors may also be given convenient tag names.
    "orange": parse("<fg #d78700>"),

    # User-defined tags always take precedence over existing tags.
    "bold": parse("<dim>")
}

am = AnsiMarkup(tags=user_tags)

am.parse("<info>bold green</info>")
am.ansiprint("<err>red</err>")

# Calling the instance is equivalent to calling its parse method.
am("<b>bold</b>") == am.parse("<b>bold</b>")
```

### Alignment and length

Aligning formatted strings can be challenging because the length of the
rendered string is different that the number of printable characters.
Consider this example:

``` pycon
>>> a = '| {:30} |'.format('abc')
>>> b = '| {:30} |'.format(parse('<b>abc</b>'))
>>> print(a, b, sep='\n')
| abc                    |
| abc                            |
```

This can be addressed by using the `ansistring` function or the
`AnsiMarkup.string(markup)` method, which has the following useful
properties:

``` pycon
>>> s = ansistring('<b>abc</b>')
>>> print(repr(s), '->', s)
<b>abc</b> -> abc  # abc is printed in bold
>>> len(s), len(am.parse('<b>abc</b>'), s.delta
3, 11, 8
```

With the help of the `delta` property, it is easy to align the strings
in the above example:

``` pycon
>>> s = ansistring('<b>abc</b>')
>>> a = '| {:{width}} |'.format('abc', width=30)
>>> b = '| {:{width}} |'.format(s, width=(30 + s.delta))
>>> print(a, b, sep='\n')
| abc                            |
| abc                            |
```

### Escaping raw strings

Both `ansiprint()` and `parse()` pass arguments of type `raw` untouched.

``` pycon
>>> from ansimarkup import ansiprint, parse, raw
>>> ansiprint("<b><r>", raw("<l type='V'>2.0</l>"), "</r></b>")
 <l type='V'>2.0</l>  # printed in bold red (note the leading space caused)

>>> s = parse("<b><r>", raw("<l type='V'>2.0</l>"), "</r></b>")
>>> print(s)
<l type='V'>2.0</l>  # printed in bold red
```

Building a template string may also be sufficient:

``` pycon
>>> from ansimarkup import parse
>>> s = parse("<b><r>%s</r></b>")
>>> print(s % "<l type='V'>2.0</l>")
<l type='V'>2.0</l>  # printed in bold red
```


### Other features

The default tag separators can be changed by passing the `tag_sep`
argument to `AnsiMarkup`:

``` python
from ansimarkup import AnsiMarkup

am = AnsiMarkup(tag_sep="{}")
am.parse("{b}{r}bold red{/b}{/r}")
```

Markup tags can be removed using the `strip()` method:

``` python
from ansimarkup import AnsiMarkup

am = AnsiMarkup()
am.strip("<b><r>bold red</b></r>")
```

The `strict` option instructs the parser to raise `MismatchedTag` if
opening tags don\'t have corresponding closing tags:

``` python
from ansimarkup import AnsiMarkup

am = AnsiMarkup(strict=True)
am.parse("<r><b>bold red")
# ansimarkup.MismatchedTag: opening tag "<r>" has no corresponding closing tag
```

### Command-line

Ansimarkup may also be used on the command-line. This works as if all
arguments were passed to `ansiprint()`:

    $ python -m ansimarkup
    Usage: python -m ansimarkup [<arg> [<arg> ...]]

    Example usage:
      python -m ansimarkup '<b>Bold</b>' '<r>Red</r>'
      python -m ansimarkup '<b><r>Bold Red</r></b>'
      python -m ansimarkup < input-with-markup.txt
      echo '<b>Bold</b>' | python -m ansimarkup

### Logging formatter

Ansimarkup also comes with a formatter for the standard library `logging` module. It can be used as:

``` python
import logging
from ansimarkup.logformatter import AnsiMarkupFormatter

log = logging.getLogger()
hdl = logging.StreamHandler()
fmt = AnsiMarkupFormatter()
hdl.setFormatter(fmt)
log.addHandler(hdl)

log.info("<b>bold text</b>")
```

### Windows

Ansimarkup uses the [colorama] library internally, which means that
Windows support for ansi escape sequences is available by first running:

``` python
import colorama
colorama.init()
```

For more information on Windows support, consult the \"Usage\" section
of the [colorama] documentation.

## Performance

While the focus of ansimarkup is convenience, it does try to keep
processing to a minimum. The [benchmark.py] script attempts to benchmark
different ansi escape code libraries:

    Benchmark 1: <r><b>red bold</b></r>
      colorama     0.1959 μs
      colr         1.8022 μs
      ansimarkup   3.1681 μs
      termcolor    5.3734 μs
      rich         9.0673 μs
      pastel       10.7440 μs
      plumbum      14.0620 μs
    
    Benchmark 2: <r><b>red bold</b>red</r><b>bold</b>
      colorama     0.5360 μs
      colr         4.5575 μs
      ansimarkup   4.5727 μs
      termcolor    15.8462 μs
      rich         21.2631 μs
      pastel       22.9391 μs
      plumbum      33.1179 μs


## Limitations

Ansimarkup is a simple wrapper around [colorama]. It does very little in
the way of validating that markup strings are well-formed. This is a
conscious decision with the goal of keeping things simple and fast.

Unbalanced nesting, such as in the following example, will produce
incorrect output:

    <r><Y>1</r>2</Y>

## Todo

-   Many corner cases remain to be fixed.
-   More elaborate testing. The current test suite mostly covers the \"happy paths\".
-   Replace `tag_list.index` in `sub_end` with something more efficient (i.e. something like an ordered MultiDict).

## Similar libraries

-   [pastel][]: bring colors to your terminal
-   [plumbum.colors][]: small yet feature-rich library for shell script-like programs in Python
-   [colr][]: easy terminal colors, with chainable methods
-   [rich][]: rich text and beautiful formatting in the terminal (see `rich.print()` and `rich.markup.render()`)

## License

Ansimarkup is released under the terms of the [Revised BSD License].

  [tags.py]: https://github.com/gvalkov/python-ansimarkup/blob/main/ansimarkup/tags.py
  [colorama]: https://pypi.python.org/pypi/colorama
  [benchmark.py]: https://github.com/gvalkov/python-ansimarkup/blob/main/tests/benchmark.py
  [pastel]: https://github.com/sdispater/pastel
  [plumbum.colors]: https://plumbum.readthedocs.io/en/latest/cli.html#colors
  [colr]: https://pypi.python.org/pypi/Colr/
  [rich]: https://github.com/Textualize/rich
  [Revised BSD License]: https://github.com/gvalkov/python-ansimarkup/blob/main/LICENSE.txt

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ansimarkup",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Georgi Valkov <georgi.t.valkov@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6f/70/11537dbe3f358905ef2e8819527d2fb2335b8650d376a662f826d899e56e/ansimarkup-2.1.0.tar.gz",
    "platform": null,
    "description": "# Ansimarkup\n\n<p>\n    <a href=\"https://pypi.python.org/pypi/ansimarkup\"><img alt=\"pypi version\" src=\"https://img.shields.io/pypi/v/ansimarkup.svg\"></a>\n    <a href=\"https://github.com/gvalkov/python-ansimarkup/actions/workflows/tests.yml?query=branch:main\"><img alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/gvalkov/python-ansimarkup/tests.yml?branch=main\"></a>\n    <a href=\"https://github.com/gvalkov/python-ansimarkup/blob/main/LICENSE.txt\"><img alt=\"License\" src=\"https://img.shields.io/pypi/l/ansimarkup\"></a>\n</p>\n\nAnsimarkup is an XML-like markup for producing colored terminal text.\n\n``` python\nfrom ansimarkup import ansiprint as print\n\nprint(\"<b>bold text</b>\"))\nprint(\"<red>red text</red>\", \"<red,green>red text on a green background</red,green>\")\nprint(\"<fg #ffaf00>orange text</fg #ffaf00>\")\n```\n\n## Installation\n\nThe latest stable version of ansimarkup can be installed from PyPi:\n\n``` bash\npython3 -m pip install ansimarkup\n```\n\n## Usage\n\n### Basic\n\n``` python\nfrom ansimarkup import parse, ansiprint\n\n# parse() converts the tags to the corresponding ansi escape sequence.\nparse(\"<b>bold</b> <d>dim</d>\")\n\n# ansiprint() works exactly like print(), but first runs parse() on all arguments.\nansiprint(\"<b>bold</b>\", \"<d>dim</d>\")\nansiprint(\"<b>bold</b>\", \"<d>dim</d>\", sep=\":\", file=sys.stderr)\n```\n\n### Colors and styles\n\n``` python\n# Colors may be specified in one of several ways.\nparse(\"<red>red foreground</red>\")\nparse(\"<RED>red background</RED>\")\nparse(\"<fg red>red foreground</fg red>\")\nparse(\"<bg red>red background</bg red>\")\n\n# Xterm, hex and rgb colors are accepted by the <fg> and <bg> tags.\nparse(\"<fg 86>aquamarine foreground</fg 86>\")\nparse(\"<bg #00005f>dark blue background</bg #00005f>\")\nparse(\"<fg 0,95,0>dark green foreground</fg 0,95,0>\")\n\n# Tags may be nested.\nparse(\"<r><Y>red text on a yellow foreground</Y></r>\")\n\n# The above may be more concisely written as:\nparse(\"<r,y>red text on a yellow background</r,y>\")\n\n# This shorthand also supports style tags.\nparse(\"<b,r,y>bold red text on a yellow background</b,r,y>\")\nparse(\"<b,r,>bold red text</b,r,>\")\nparse(\"<b,,y>bold regular text on a yellow background</b,,y>\")\n\n# Unrecognized tags are left as-is.\nparse(\"<b><element1></element1></b>\")\n```\n\nFor a list of markup tags, please refer to [tags.py].\n\n### User-defined tags\n\nCustom tags or overrides for existing tags may be defined by creating a\nnew `AnsiMarkup` instance:\n\n``` python\nfrom ansimarkup import AnsiMarkup, parse\n\nuser_tags = {\n    # Add a new tag (e.g. we want <info> to expand to \"<bold><green>\").\n    \"info\": parse(\"<b><g>\")\n\n    # The ansi escape sequence can be used directly.\n    \"info\": \"e\\x1b[32m\\x1b[1m\",\n\n    # Tag names may also be callables.\n    \"err\":  lambda: parse(\"<r>\")\n\n    # Colors may also be given convenient tag names.\n    \"orange\": parse(\"<fg #d78700>\"),\n\n    # User-defined tags always take precedence over existing tags.\n    \"bold\": parse(\"<dim>\")\n}\n\nam = AnsiMarkup(tags=user_tags)\n\nam.parse(\"<info>bold green</info>\")\nam.ansiprint(\"<err>red</err>\")\n\n# Calling the instance is equivalent to calling its parse method.\nam(\"<b>bold</b>\") == am.parse(\"<b>bold</b>\")\n```\n\n### Alignment and length\n\nAligning formatted strings can be challenging because the length of the\nrendered string is different that the number of printable characters.\nConsider this example:\n\n``` pycon\n>>> a = '| {:30} |'.format('abc')\n>>> b = '| {:30} |'.format(parse('<b>abc</b>'))\n>>> print(a, b, sep='\\n')\n| abc                    |\n| abc                            |\n```\n\nThis can be addressed by using the `ansistring` function or the\n`AnsiMarkup.string(markup)` method, which has the following useful\nproperties:\n\n``` pycon\n>>> s = ansistring('<b>abc</b>')\n>>> print(repr(s), '->', s)\n<b>abc</b> -> abc  # abc is printed in bold\n>>> len(s), len(am.parse('<b>abc</b>'), s.delta\n3, 11, 8\n```\n\nWith the help of the `delta` property, it is easy to align the strings\nin the above example:\n\n``` pycon\n>>> s = ansistring('<b>abc</b>')\n>>> a = '| {:{width}} |'.format('abc', width=30)\n>>> b = '| {:{width}} |'.format(s, width=(30 + s.delta))\n>>> print(a, b, sep='\\n')\n| abc                            |\n| abc                            |\n```\n\n### Escaping raw strings\n\nBoth `ansiprint()` and `parse()` pass arguments of type `raw` untouched.\n\n``` pycon\n>>> from ansimarkup import ansiprint, parse, raw\n>>> ansiprint(\"<b><r>\", raw(\"<l type='V'>2.0</l>\"), \"</r></b>\")\n <l type='V'>2.0</l>  # printed in bold red (note the leading space caused)\n\n>>> s = parse(\"<b><r>\", raw(\"<l type='V'>2.0</l>\"), \"</r></b>\")\n>>> print(s)\n<l type='V'>2.0</l>  # printed in bold red\n```\n\nBuilding a template string may also be sufficient:\n\n``` pycon\n>>> from ansimarkup import parse\n>>> s = parse(\"<b><r>%s</r></b>\")\n>>> print(s % \"<l type='V'>2.0</l>\")\n<l type='V'>2.0</l>  # printed in bold red\n```\n\n\n### Other features\n\nThe default tag separators can be changed by passing the `tag_sep`\nargument to `AnsiMarkup`:\n\n``` python\nfrom ansimarkup import AnsiMarkup\n\nam = AnsiMarkup(tag_sep=\"{}\")\nam.parse(\"{b}{r}bold red{/b}{/r}\")\n```\n\nMarkup tags can be removed using the `strip()` method:\n\n``` python\nfrom ansimarkup import AnsiMarkup\n\nam = AnsiMarkup()\nam.strip(\"<b><r>bold red</b></r>\")\n```\n\nThe `strict` option instructs the parser to raise `MismatchedTag` if\nopening tags don\\'t have corresponding closing tags:\n\n``` python\nfrom ansimarkup import AnsiMarkup\n\nam = AnsiMarkup(strict=True)\nam.parse(\"<r><b>bold red\")\n# ansimarkup.MismatchedTag: opening tag \"<r>\" has no corresponding closing tag\n```\n\n### Command-line\n\nAnsimarkup may also be used on the command-line. This works as if all\narguments were passed to `ansiprint()`:\n\n    $ python -m ansimarkup\n    Usage: python -m ansimarkup [<arg> [<arg> ...]]\n\n    Example usage:\n      python -m ansimarkup '<b>Bold</b>' '<r>Red</r>'\n      python -m ansimarkup '<b><r>Bold Red</r></b>'\n      python -m ansimarkup < input-with-markup.txt\n      echo '<b>Bold</b>' | python -m ansimarkup\n\n### Logging formatter\n\nAnsimarkup also comes with a formatter for the standard library `logging` module. It can be used as:\n\n``` python\nimport logging\nfrom ansimarkup.logformatter import AnsiMarkupFormatter\n\nlog = logging.getLogger()\nhdl = logging.StreamHandler()\nfmt = AnsiMarkupFormatter()\nhdl.setFormatter(fmt)\nlog.addHandler(hdl)\n\nlog.info(\"<b>bold text</b>\")\n```\n\n### Windows\n\nAnsimarkup uses the [colorama] library internally, which means that\nWindows support for ansi escape sequences is available by first running:\n\n``` python\nimport colorama\ncolorama.init()\n```\n\nFor more information on Windows support, consult the \\\"Usage\\\" section\nof the [colorama] documentation.\n\n## Performance\n\nWhile the focus of ansimarkup is convenience, it does try to keep\nprocessing to a minimum. The [benchmark.py] script attempts to benchmark\ndifferent ansi escape code libraries:\n\n    Benchmark 1: <r><b>red bold</b></r>\n      colorama     0.1959 \u03bcs\n      colr         1.8022 \u03bcs\n      ansimarkup   3.1681 \u03bcs\n      termcolor    5.3734 \u03bcs\n      rich         9.0673 \u03bcs\n      pastel       10.7440 \u03bcs\n      plumbum      14.0620 \u03bcs\n    \n    Benchmark 2: <r><b>red bold</b>red</r><b>bold</b>\n      colorama     0.5360 \u03bcs\n      colr         4.5575 \u03bcs\n      ansimarkup   4.5727 \u03bcs\n      termcolor    15.8462 \u03bcs\n      rich         21.2631 \u03bcs\n      pastel       22.9391 \u03bcs\n      plumbum      33.1179 \u03bcs\n\n\n## Limitations\n\nAnsimarkup is a simple wrapper around [colorama]. It does very little in\nthe way of validating that markup strings are well-formed. This is a\nconscious decision with the goal of keeping things simple and fast.\n\nUnbalanced nesting, such as in the following example, will produce\nincorrect output:\n\n    <r><Y>1</r>2</Y>\n\n## Todo\n\n-   Many corner cases remain to be fixed.\n-   More elaborate testing. The current test suite mostly covers the \\\"happy paths\\\".\n-   Replace `tag_list.index` in `sub_end` with something more efficient (i.e. something like an ordered MultiDict).\n\n## Similar libraries\n\n-   [pastel][]: bring colors to your terminal\n-   [plumbum.colors][]: small yet feature-rich library for shell script-like programs in Python\n-   [colr][]: easy terminal colors, with chainable methods\n-   [rich][]: rich text and beautiful formatting in the terminal (see `rich.print()` and `rich.markup.render()`)\n\n## License\n\nAnsimarkup is released under the terms of the [Revised BSD License].\n\n  [tags.py]: https://github.com/gvalkov/python-ansimarkup/blob/main/ansimarkup/tags.py\n  [colorama]: https://pypi.python.org/pypi/colorama\n  [benchmark.py]: https://github.com/gvalkov/python-ansimarkup/blob/main/tests/benchmark.py\n  [pastel]: https://github.com/sdispater/pastel\n  [plumbum.colors]: https://plumbum.readthedocs.io/en/latest/cli.html#colors\n  [colr]: https://pypi.python.org/pypi/Colr/\n  [rich]: https://github.com/Textualize/rich\n  [Revised BSD License]: https://github.com/gvalkov/python-ansimarkup/blob/main/LICENSE.txt\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2017, Georgi Valkov. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Produce colored terminal text with an xml-like markup",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/gvalkov/python-ansimarkup"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6099878823a360a0bd9ae034d39fe37f8fdd976de8da642c2ec608f093efc273",
                "md5": "f0c53e66f7a1b73527861b44959c4f6b",
                "sha256": "51ab9f3157125c53e93d8fd2e92df37dfa1757c9f2371ed48554e111c7d4401a"
            },
            "downloads": -1,
            "filename": "ansimarkup-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0c53e66f7a1b73527861b44959c4f6b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11830,
            "upload_time": "2023-08-27T15:07:48",
            "upload_time_iso_8601": "2023-08-27T15:07:48.632636Z",
            "url": "https://files.pythonhosted.org/packages/60/99/878823a360a0bd9ae034d39fe37f8fdd976de8da642c2ec608f093efc273/ansimarkup-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f7011537dbe3f358905ef2e8819527d2fb2335b8650d376a662f826d899e56e",
                "md5": "8eeac10476ab426f573cdccea2dff1c7",
                "sha256": "7b3e3d93fecc5b64d23a6e8eb96dbc8b0b576a211829d948afb397d241a8c51b"
            },
            "downloads": -1,
            "filename": "ansimarkup-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8eeac10476ab426f573cdccea2dff1c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 16725,
            "upload_time": "2023-08-27T15:07:50",
            "upload_time_iso_8601": "2023-08-27T15:07:50.780243Z",
            "url": "https://files.pythonhosted.org/packages/6f/70/11537dbe3f358905ef2e8819527d2fb2335b8650d376a662f826d899e56e/ansimarkup-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-27 15:07:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gvalkov",
    "github_project": "python-ansimarkup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ansimarkup"
}
        
Elapsed time: 0.10541s