Skip to content

module rich_console

Variables and methods for working with Rich text output.

Global Variables

  • DEFAULT_CONSOLE_WIDTH
  • ALERT_STYLE
  • BYTES
  • BYTES_NO_DIM
  • BYTES_BRIGHTEST
  • BYTES_BRIGHTER
  • BYTES_HIGHLIGHT
  • DANGER_HEADER
  • DARK_GREY
  • GREY
  • GREY_ADDRESS
  • PEACH
  • YARALYZER_THEME_DICT
  • CONSOLE_WIDTH
  • CONSOLE_PRINT_BYTE_WIDTH

function console_width_possibilities

console_width_possibilities()

Returns a list of possible console widths, the first being the current terminal width.


function console_print_with_fallback

console_print_with_fallback(_string: Text | str, style=None) → None

rich.console.print() with fallback to regular print() if there's a Rich Markup issue.


function console_width

console_width() → int

Current width set in console object.


function print_fatal_error_and_exit

print_fatal_error_and_exit(error_message: str) → None

Print a fatal error message in a Panel and exit.

Args:

  • error_message (str): The error message to display.

function print_header_panel

print_header_panel(
    headline: str,
    style: str,
    expand: bool = True,
    padding: tuple = (0, 2)
) → None

Print a headline inside a styled Rich Panel to the console.

Args:

  • headline (str): The text to display as the panel's headline.
  • style (str): The style to apply to the panel (e.g., color, bold, reverse).
  • expand (bool, optional): Whether the panel should expand to the full console width. Defaults to True.
  • padding (tuple, optional): Padding around the panel content (top/bottom, left/right). Defaults to (0, 2).

function theme_colors_with_prefix

theme_colors_with_prefix(prefix: str) → List[Text]

Return a list of (name, style) Text objects for all styles in the theme that start with prefix.


This file was automatically generated via lazydocs.