Rich formats text, tables, progress bars, markdown, and tracebacks in the terminal. It runs on Linux, macOS, and Windows with Python 3.8 or newer.
Overview
Rich is a Python package for adding color, layout, and structure to command-line and notebook output. A Console API provides print and log methods with wrapping, styles, and markup similar to lightweight BBCode tags.
Built-in renderables include unicode tables, progress bars with multiple tasks, spinners, trees, columns, markdown, syntax-highlighted code, panels, and improved exception tracebacks. It integrates with Python logging and can replace the default traceback handler for clearer errors.
The library detects terminal capabilities, including true color and emoji on newer Windows Terminal builds, and works in Jupyter without extra setup. Related projects offer a standalone Rich CLI and the Textual framework for full terminal user interfaces.
Key features
- Console print and log API
- Syntax-highlighted code blocks
- Unicode tables and columns
- Multi-task progress bars
- Markdown rendering in terminals
- Styled traceback output
- Python logging integration
- Jupyter notebook support
Use cases
- CLI status and error display
- Download or batch progress UI
- Debugging with pretty objects
- Terminal dashboards and reports