Registry / observability / rich
library15.0.0pypypi✓ verified 28d ago

Rich is a powerful Python library designed for creating rich text and beautiful formatting in the terminal. It provides an intuitive API to add color and style to terminal output, and can render advanced content such as pretty tables, dynamic progress bars, formatted Markdown, syntax-highlighted source code, and enhanced tracebacks. The library is actively maintained by Textualize and works across Linux, macOS, and Windows, requiring Python 3.8 or later.

pip install rich
INSTALL
IMPORT
SIG · RICH
R
rich
observabilitypythonv15.0.0
Install
4.7s avg
Import
11ms
Disk
82MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v15.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.012s · 89.6MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 4.7s · import 0.006s · 90MB
82MB installed
● package 82MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

print
✓ from rich import print
Replaces the built-in print() function with a Rich-enhanced version for automatic styling and pretty-printing.
Console
✓ from rich.console import Console
Provides fine-grained control over terminal output, including styling, logging, and advanced rendering.
install
✓ from rich.pretty import install
Installs Rich's pretty-printing capabilities into the Python REPL, automatically formatting data structures.
inspect
✓ from rich import inspect
A utility function to generate detailed, color-coded reports on any Python object, useful for debugging.
Table
✓ from rich.table import Table
Progress
✓ from rich.progress import Progress
Markdown
✓ from rich.markdown import Markdown
Syntax
✓ from rich.syntax import Syntax

This quickstart demonstrates the two primary ways to use Rich: by importing its enhanced `print` function as a direct replacement for Python's built-in `print` for easy styling with console markup, and by instantiating a `Console` object for more advanced features like logging and rendering complex structures such as tables.

from rich import print from rich.console import Console from rich.table import Table # Using rich.print as a drop-in replacement print("[bold magenta]Hello[/bold magenta] [green]Rich[/green] World!") # Using Console for more control console = Console() console.log("This is a log message with [blue]timestamp[/blue] and file info.") # Creating a simple table table = Table(title="Example Table") table.add_column("Header 1", style="cyan", no_wrap=True) table.add_column("Header 2", style="magenta") table.add_row("Row 1, Cell 1", "Row 1, Cell 2") table.add_row("Row 2, Cell 1", "Row 2, Cell 2") console.print(table)
rich --version
Debug
Known issues
breakingConsole markup syntax was significantly updated in versions leading up to 13.0.0. Python structures like `[1,2,3]` are no longer parsed as markup, and standard color numbers syntax changed from `[5]` to `color(<number>)`. The markup escape method changed from double brackets (e.g., `foo[[]]`) to preceding with a backslash (e.g., `foo\[bar]`).
fix
Review and update console markup strings according to the new syntax outlined in the Rich documentation, particularly regarding bracket usage and color specification.
affects: Prior to 13.0.0
breakingVersion 12.0.0 dropped support for Python 3.7. Rich now officially requires Python 3.8 or later.
fix
Ensure your project runs on Python 3.8 or a newer version.
affects: 12.0.0 and above
breakingAs of Rich 14.0.0, empty `NO_COLOR` and `FORCE_COLOR` environment variables are now considered disabled, impacting how Rich decides to render colored output.
fix
If relying on these environment variables for color control, ensure they are set to appropriate values (e.g., `1` for `FORCE_COLOR` to force color, or `0` for `NO_COLOR` to disable it) rather than being empty.
affects: 14.0.0 and above
gotchaRich's `Console.print()` method (and `rich.print`) automatically highlights Python data structures and syntax. If this automatic highlighting of elements like braces, commas, or numbers is undesired (e.g., when trying to achieve a very specific plain style), it needs to be explicitly disabled.
fix
Pass `highlight=False` to the `console.print()` method (e.g., `console.print('[[green]1[/green]] Create new password', highlight=False)`).
affects: All versions
gotchaPyCharm's default run console often does not fully emulate a terminal, which can prevent Rich from rendering styled output correctly.
fix
In PyCharm, enable the 'Emulate terminal in output console' option in your run/debug configurations for projects using Rich.
affects: All versions (PyCharm specific)
Upgrade
Version history
15.0.0latest on PyPI · released Apr 12, 2026
Audit
Dependencies
pygmentsrequiredUsed for syntax highlighting of code and tracebacks.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
2
Resources
rich — pip install rich · libregistry