-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolor_printer.py
More file actions
34 lines (26 loc) · 1 KB
/
color_printer.py
File metadata and controls
34 lines (26 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from colorama import Fore, Style
class ColorPrinter:
@staticmethod
def info(message: str):
print(f"{Fore.CYAN}{Style.BRIGHT}ℹ {message}{Style.RESET_ALL}")
@staticmethod
def success(message: str):
print(f"{Fore.GREEN}{Style.BRIGHT}✓ {message}{Style.RESET_ALL}")
@staticmethod
def warning(message: str):
print(f"{Fore.YELLOW}{Style.BRIGHT}⚠ {message}{Style.RESET_ALL}")
@staticmethod
def error(message: str):
print(f"{Fore.RED}{Style.BRIGHT}✘ {message}{Style.RESET_ALL}")
@staticmethod
def highlight(message: str):
print(f"{Fore.MAGENTA}{Style.BRIGHT}{message}{Style.RESET_ALL}")
@staticmethod
def file_path(path: str):
return f"{Fore.BLUE}{Style.BRIGHT}{path}{Style.RESET_ALL}"
@staticmethod
def cost(amount: float):
return f"{Fore.YELLOW}{Style.BRIGHT}${amount:.2f}{Style.RESET_ALL}"
@staticmethod
def tokens(count: int):
return f"{Fore.GREEN}{Style.BRIGHT}{count:,}{Style.RESET_ALL}"