data_baseutilscolorize_str

colorize_str

data_base.utils.colorize_str(key, bcolor)

Colorize a string with a terminal color.

Simply concatenates the string with escape sequences that colroize the text in a terminal.

Parameters:
  • key (str) – the string

  • bcolor (str) – the color

Returns:

the colorized string

Return type:

str

See also

data_base.utils.bcolors For color escape sequences.