{"id":22415,"library":"strip-ansi","title":"strip-ansi","description":"A minimal library to strip ANSI escape sequences from strings. Designed to remove terminal color codes and control sequences. Version 0.1.1, stable, no recent updates. Requires Python >=3.6.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/ewen-lbh/python-strip-ansi","tags":["ansi","strip","terminal","text-processing"],"install":[{"cmd":"pip install strip-ansi","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"strip_ansi","correct":"from strip_ansi import strip_ansi"}],"quickstart":{"code":"from strip_ansi import strip_ansi\ntext = \"\\x1b[31mHello\\x1b[0m World\"\nclean = strip_ansi(text)\nprint(clean)  # Output: Hello World","lang":"python","description":"Import and use the function to strip ANSI codes."},"warnings":[{"fix":"If you need comprehensive handling, consider using 're' or other libraries like 'colorama'.","message":"The library does not handle all edge cases of ANSI sequences (e.g., non-standard or malformed sequences).","severity":"gotcha","affected_versions":"<=0.1.1"},{"fix":"Always use 'from strip_ansi import strip_ansi' or alias the import.","message":"The function is named the same as the package, which can cause naming conflicts if you import the package directly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change to 'from strip_ansi import strip_ansi'.","cause":"Using 'import strip_ansi' instead of 'from strip_ansi import strip_ansi'.","error":"AttributeError: module 'strip_ansi' has no attribute 'strip_ansi'"},{"fix":"Uninstall and reinstall with 'pip install --force-reinstall strip-ansi'.","cause":"Pip installed the package incorrectly or a different package named 'strip_ansi' exists.","error":"ImportError: cannot import name 'strip_ansi' from 'strip_ansi'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}