0Pricing
Python Academy · Lesson

Rich Terminal Output

Style CLI output with rich.

What Is rich?

rich is a third-party library for beautiful terminal output: colors, styles, tables, progress bars, and more. Install it with pip install rich.

from rich import print

print('Hello, [bold magenta]world[/bold magenta]!')

The Console Object

The central class is Console. Its print method understands style markup and handles wrapping and color detection.

from rich.console import Console

console = Console()
console.print('Styled output here')

All lessons in this course

  1. argparse Basics
  2. Subcommands and Options
  3. The Click Library
  4. Rich Terminal Output
← Back to Python Academy