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
- argparse Basics
- Subcommands and Options
- The Click Library
- Rich Terminal Output