Overview

Rich 12.0, released on March 10, 2022, expands available widgets and improves rendering performance.

Main Features

Expanded widgets

New widgets are available: improved Panel, Columns for layouts, and Pretty for object inspection.

python
from rich.panel import Panel
from rich.columns import Columns
from rich.console import Console

console = Console()

panels = [Panel(f'Item {i}', expand=True) for i in range(4)]
console.print(Columns(panels))

Performance

Rendering is faster thanks to better style caching and reduced memory allocations.

python
from rich.progress import track

# Optimized progress bar
for i in track(range(100), description='Processing...'):
    pass  # processing

Sources