agenticSeek/sources/utility.py
2025-02-19 19:07:24 +01:00

20 lines
512 B
Python

from colorama import Fore
def pretty_print(text, color = "info"):
"""
print text with color
"""
color_map = {
"success": Fore.GREEN,
"failure": Fore.RED,
"status": Fore.LIGHTGREEN_EX,
"code": Fore.LIGHTBLUE_EX,
"warning": Fore.YELLOW,
"output": Fore.LIGHTCYAN_EX,
}
if color not in color_map:
print(text)
pretty_print("Invalid color in pretty_print", "warning")
return
print(color_map[color], text, Fore.RESET)