Lightweight utilities for applying ANSI colors and styles to Python text output.
pip install colored_textfrom colored_text import Style, available_styles, colorize, print_colored
print(colorize("Hello world", Style.BOLD, Style.BLUE))
print_colored("Warning", "red", "underline")
# See all available styles
print(Style.RED.value, available_styles())Styles can be provided as Style enum members or case-insensitive strings. All outputs automatically reset styling at the end of the text.
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest-
Build the package:
python -m build
-
Validate the distributions:
twine check dist/* -
Upload to PyPI:
twine upload dist/*
Create a draft release in GitHub after validating builds, then publish the artifacts generated in dist/.
This project is licensed under the MIT License. See the LICENSE file for details.