Skip to main content

Mini-lib to strip ANSI escape codes from strings

Project description

Ansistrip

Mini-lib to strip ANSI Escape codes from a string.

Installation

Install with uv:

uv add ansistrip

Usage

In [1]: import ansistrip

In [2]: text =  "\x1b[1m\x1b[38;5;10mtest\x1b0m"

In [3]: ansistrip.ansi_strip(text)

Out[3]: 'test'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansistrip-0.2.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansistrip-0.2.4-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file ansistrip-0.2.4.tar.gz.

File metadata

  • Download URL: ansistrip-0.2.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ansistrip-0.2.4.tar.gz
Algorithm Hash digest
SHA256 75efec57be3b8b64fe6aeb646af94125eefee1861cc1ccbf2801c6dfa0d92f0f
MD5 cd2f0a248445cd160ea5ccb411ff27a7
BLAKE2b-256 22838997619f184b7f990e0145f3e9103518f305e588a39094115d31b55c4dda

See more details on using hashes here.

File details

Details for the file ansistrip-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: ansistrip-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ansistrip-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4149eddd96dab38f8a2859f71ae61a8c21e78f72dfda9be075fc6c12da79e137
MD5 0b97e090c13adc5dcd481c39221c0ae7
BLAKE2b-256 d4a67782161808d91b55aea7362e67be21619c5eac8ae57921c7032925196e75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page