ahvn.utils.basic.color_utils module¶

ahvn.utils.basic.color_utils.color_black(obj, console=True)[source]¶

Return the string in black (grey/dark) color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_red(obj, console=True)[source]¶

Return the string in red color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_green(obj, console=True)[source]¶

Return the string in green color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_yellow(obj, console=True)[source]¶

Return the string in yellow color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_blue(obj, console=True)[source]¶

Return the string in blue color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_magenta(obj, console=True)[source]¶

Return the string in magenta color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_cyan(obj, console=True)[source]¶

Return the string in cyan color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_white(obj, console=True)[source]¶

Return the string in white color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_grey(obj, console=True)[source]¶

Return the string in grey color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.no_color(obj, console=True)[source]¶

Return the string without any color.

Parameters:
  • obj (Any) – The object to convert to string.

  • console (bool) – Ignored.

Returns:

The plain string.

Return type:

str

ahvn.utils.basic.color_utils.color_debug(obj, console=True)¶

Return the string in grey color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_info(obj, console=True)¶

Return the string in blue color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_info1(obj, console=True)¶

Return the string in blue color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_info2(obj, console=True)¶

Return the string in magenta color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_info3(obj, console=True)¶

Return the string in cyan color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_warning(obj, console=True)¶

Return the string in yellow color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_error(obj, console=True)¶

Return the string in red color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.color_success(obj, console=True)¶

Return the string in green color.

Parameters:
  • obj (Any) – The object to colorize.

  • console (bool) – Whether to apply color.

Returns:

The colorized string.

Return type:

str

ahvn.utils.basic.color_utils.print_debug(*args, **kwargs)[source]¶

Print debug messages in grey color to stderr (unless otherwise specified in file).

Parameters:
  • *args – Arguments to print.

  • **kwargs – Keyword arguments for print.

ahvn.utils.basic.color_utils.print_info(*args, **kwargs)[source]¶

Print info messages in blue color to stderr (unless otherwise specified in file).

Parameters:
  • *args – Arguments to print.

  • **kwargs – Keyword arguments for print.

ahvn.utils.basic.color_utils.print_warning(*args, **kwargs)[source]¶

Print warning messages in yellow color to stderr (unless otherwise specified in file).

Parameters:
  • *args – Arguments to print.

  • **kwargs – Keyword arguments for print.

ahvn.utils.basic.color_utils.print_error(*args, **kwargs)[source]¶

Print error messages in red color to stderr (unless otherwise specified in file).

Parameters:
  • *args – Arguments to print.

  • **kwargs – Keyword arguments for print.

ahvn.utils.basic.color_utils.print_success(*args, **kwargs)[source]¶

Print success messages in green color to stderr (unless otherwise specified in file).

Parameters:
  • *args – Arguments to print.

  • **kwargs – Keyword arguments for print.