New Markup Syntax
Rich 10.0, released in April 2021, introduces an enriched markup syntax for the terminal. Style tags let you combine colors, bold, italic, and links in a concise and readable syntax.
Markup Examples
python
from rich.console import Console
from rich.table import Table
console = Console()
# Basic markup
console.print('[bold red]Error![/bold red] File not found.')
console.print('[green]Success[/green]: operation completed.')
console.print('[link=https://python.org]Python Website[/link]')
# Table with styles
table = Table(title='Results')
table.add_column('Module', style='cyan')
table.add_column('Version', style='green')
table.add_row('Rich', '10.0')
table.add_row('Python', '3.10')
console.print(table)
