ArtisanPrint is a Python library for printing text with customizable styles, colors, and backgrounds in the terminal using ANSI escape codes. Perfect for making CLI output more readable and visually appealing.
To install ArtisanPrint, simply use pip:
pip install ArtisanPrintImport the cprint function from the ArtisanPrint library and use it to print text with desired styles and colors.
from artisanprint import cprint
cprint("Error: Something went wrong", color="red")
cprint("Warning: Proceed with caution", bg_color="yellow")
cprint("Important Message", style="bold")from artisanprint import cprint
# Red + bold
cprint("Hello, world!", color="red", style="bold")
# Green background + italic
cprint("Welcome to ArtisanPrint", bg_color="green", style="italic")
# Custom RGB + underlined
cprint("Custom Color", color=(255, 128, 0), style="underlined")
# Multiple styles + background
cprint("Formatted Text", style="bold italic", bg_color="blue")- Names:
red,green,yellow,blue,magenta,cyan,white,black - RGB Tuples:
(r, g, b)values (0–255)
- Same as
color, viabg_colorparameter
bold,italic,underlined,strikethrough
- Uses ANSI escape codes — behavior may vary by terminal.
- Color and style names are case-insensitive.
- Works cross-platform in most modern terminals.