Python Package Index

local Python Package Index (PyPI)

corelibs-text-colors (1.0.0)

Published 2025-11-20 10:20:30 +09:00 by clemens

Installation

pip install --index-url  --extra-index-url https://pypi.org/simple corelibs-text-colors

About this package

CoreLibs Text Colors

CoreLibs Text Colors

This is part of the Python CoreLibs

Overview

Basic ANSI color interface

Install

uv add --index opj-pypi=https://git.egplusww.jp/api/packages/PyPI/pypi/simple/ corelibs-text-colors

Usage

This module contains this set

  • corelibs_text_colors.text_colors

Colors

There is a list of all possible basic ansi colors in normal, bold, birght with flags for bold, underline, end and/reset

from corelibs_text_color.text_colors import Colors

print(f"I am {Colors.red}RED{Colors.end}")

The following variables are accessable:

# control
Colors.bold
Colors.underline
Colors.end
Colors.reset
# normal
Colors.black
Colors.red
Colors.green
Colors.yellow
Colors.blue
Colors.magenta
Colors.cyan
Colors.white
# bold
Colors.black_bold
Colors.red_bold
Colors.green_bold
Colors.yellow_bold
Colors.blue_bold
Colors.magenta_bold
Colors.cyan_bold
Colors.white_bold
# bright
Colors.black_bright
Colors.red_bright
Colors.green_bright
Colors.yellow_bright
Colors.blue_bright
Colors.magenta_bright
Colors.cyan_bright
Colors.white_bright

All colors can be overwritten if needed, to reset them call Colors.reset_colors().

If needed all colors can be disabled with Colors.disable()

Development

UV setup

uv must be installed

Python venv setup

After clone, run the command below to install all dependenciss

uv sync

Build and Publish

uv build
uv publish --index opj-pypi --token <gitea token>

Python tests

All python tests are the tests/ folder. They are structured by the source folder layout

run them with

uv run pytest

Get a coverate report

uv run pytest --cov=corelibs_text_color
uv run pytest --cov=corelibs_text_color --cov-report=term-missing

Other tests

In the test-run folder usage and run tests are located, runt them below

uv run test-run/<script>

Requirements

Requires Python: >=3.13
Details
PyPI
2025-11-20 10:20:30 +09:00
0
Clemens Schwaighofer
6.7 KiB
Assets (2)
Versions (2) View all
1.0.0 2025-11-20
0.1.0 2025-11-20