anstrip


Nameanstrip JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
Summaryanstrip is a minimal library to strip ANSI sequences from strings.
upload_time2024-04-15 22:39:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 Qexat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ansi escape sequence sgr ecma strip
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # anstrip

[![PyPI](https://img.shields.io/pypi/v/anstrip)](https://pypi.org/project/anstrip/)

anstrip is a minimal library to strip ANSI sequences from strings.

It provides:

- `PATTERN`, the regex pattern used by the functions of anstrip
- `strip`, a function to remove all the escape sequences from a string
- `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY
- `print`, a function that is similar to the built-in `print` but with sequence auto-stripping
- `printed_length`, a function that returns the length of the string as seen on the screen

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "anstrip",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ansi, escape sequence, SGR, ECMA, strip",
    "author": null,
    "author_email": "Qexat <contact@qexat.com>",
    "download_url": "https://files.pythonhosted.org/packages/0f/d2/e614bc5c54c346505a14c0009aac76f44ccfc8a06773ed8fbd32cf44c5d1/anstrip-0.2.1.tar.gz",
    "platform": null,
    "description": "# anstrip\n\n[![PyPI](https://img.shields.io/pypi/v/anstrip)](https://pypi.org/project/anstrip/)\n\nanstrip is a minimal library to strip ANSI sequences from strings.\n\nIt provides:\n\n- `PATTERN`, the regex pattern used by the functions of anstrip\n- `strip`, a function to remove all the escape sequences from a string\n- `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY\n- `print`, a function that is similar to the built-in `print` but with sequence auto-stripping\n- `printed_length`, a function that returns the length of the string as seen on the screen\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Qexat  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "anstrip is a minimal library to strip ANSI sequences from strings.",
    "version": "0.2.1",
    "project_urls": {
        "source": "https://github.com/qexat/anstrip"
    },
    "split_keywords": [
        "ansi",
        " escape sequence",
        " sgr",
        " ecma",
        " strip"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9363f980a559b5f288447a4e427cddf5797143b5f8648d73be77c895b87b9241",
                "md5": "fd43f1c31064e28514ca0d6b1e8e88d6",
                "sha256": "f20e0f52b88cf62630f711d456623ad1aef05073abe382dd0a06c52e7f8e0428"
            },
            "downloads": -1,
            "filename": "anstrip-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fd43f1c31064e28514ca0d6b1e8e88d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5535,
            "upload_time": "2024-04-15T22:39:55",
            "upload_time_iso_8601": "2024-04-15T22:39:55.873752Z",
            "url": "https://files.pythonhosted.org/packages/93/63/f980a559b5f288447a4e427cddf5797143b5f8648d73be77c895b87b9241/anstrip-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0fd2e614bc5c54c346505a14c0009aac76f44ccfc8a06773ed8fbd32cf44c5d1",
                "md5": "e3e7bd9e35223f2fb1a209beeb213db9",
                "sha256": "fd755a5895f42c6e1b813b66cecb8158a1cabb2893c2cf7fc34ce56aa4c976f4"
            },
            "downloads": -1,
            "filename": "anstrip-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e3e7bd9e35223f2fb1a209beeb213db9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4193,
            "upload_time": "2024-04-15T22:39:57",
            "upload_time_iso_8601": "2024-04-15T22:39:57.457665Z",
            "url": "https://files.pythonhosted.org/packages/0f/d2/e614bc5c54c346505a14c0009aac76f44ccfc8a06773ed8fbd32cf44c5d1/anstrip-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 22:39:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qexat",
    "github_project": "anstrip",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "anstrip"
}
        
Elapsed time: 0.23612s