Python library for color beautiful output and logging
Project description
PyColor-palette
Example
#!venv/bin/python3
"""pycolor_palette Example File.
Copyright Alexeev Bronislav (C) 2024
"""
from loguru import logger
from pycolor_palette.logger import PyDBG_Obj, benchmark, set_default_theme, debug_func, setup_logger
from pycolor_palette.paint import info_message, warn_message, error_message, other_message, FG, Style, debug_message, run_exception
from pycolor_palette.pygments_colorschemes import CatppuccinMocha
set_default_theme(CatppuccinMocha)
pydbg_obj = PyDBG_Obj()
setup_logger('DEBUG')
@benchmark
@debug_func
def debug_print() -> list:
num = 12
float_int = 12.12
string = 'Hello'
boolean = True
list_array = [1, 2, 3, 'Hi', True, 12.2]
dictionary = {1: "HELLO", 2: "WORLD"}
pydbg_obj(num, float_int, string, boolean, list_array, dictionary)
debug_print()
logger.debug("This is debug!")
logger.info("This is info!")
logger.warning("This is warning!")
logger.error("This is error!")
# Simple messages
info_message('INFORMATION')
warn_message('WARNING')
error_message('EXCEPTION')
debug_message('DEBUG')
other_message('SOME TEXT', 'OTHER')
# Highlight bg
info_message('Highlight INFORMATION', True)
warn_message('Highlight WARNING', True)
error_message('Highlight EXCEPTION', True)
debug_message('Highlight DEBUG', True)
other_message('Highlight SOME TEXT', 'OTHER', True)
print(f'{FG.red}{Style.bold}BOLD RED{Style.reset}{Style.dim} example{Style.reset}')
run_exception('EXCEPTION')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pycolor_palette_loguru-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b36a4adff3e0d47a013bb4f1471d365a19ed1c602e7bad4337ad946ddf4258c |
|
MD5 | 46116245bd11d3b5c3e247eafcf4280c |
|
BLAKE2b-256 | 35772bf59ba4368e08a5a1253340a68c265150cde8ce99851c8440fe061b256b |
Close
Hashes for pycolor_palette_loguru-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a3250c91c0d8ca7844f3e55904ca437ee864356bd93b2da68772b327acce71 |
|
MD5 | c28137b44fb1559e0b6a41b2bb8b907f |
|
BLAKE2b-256 | b10aed60e6010c52c299c3c654fc881bad99513fe172f8b6e5ec9b31784fe816 |