
Rich
A Python library for colorful, formatted text, tables and progress bars in the terminal.
- Stars
- 57.7k
- Forks
- 2.4k
- Licence
- MIT
- Language
- Python
- Last update
- 5 months ago
- Type
- Library
What it is
Rich is a Python library that makes terminal output easier to read. You call it from your own Python code to add color and style, and to render things like tables, progress bars, Markdown, syntax-highlighted code and tracebacks. The README says it works out of the box with a simple print-style interface.
- Replace print() with rich's print to add color and bold text to script output
- Draw a formatted table of results in the terminal using the Table class
- Show syntax-highlighted Python code or pretty-printed data structures with the Console object
- Format Python's standard logging output with the Handler class
Great for
- Python developers who write command-line scripts and want clearer output
- People building logging or debugging output for long-running Python programs
- Developers who want to show tables or progress bars in a terminal without building the layout by hand
- Learners who want to see how formatted terminal output works in Python
Not ideal for
- Non-Python projects, since the library is written for Python (the README requires Python 3.8 or later)
- Users who only need a finished application rather than a library to build into their own code
- Environments limited to the classic Windows terminal, where the README says color is limited to 16 colors
How to get it
- 1
Install with a package manager
You'll need: Python 3.8 or later
Install with pip
python -m pip install rich - 2
Run it
- Install rich with pip using the command above
- Run python -m rich in your terminal to see a sample of the output
- In a Python file, run: from rich import print, then print with bold or colored markup
- 3
Get the most out of it
- Use Console() for finer control over output, including the style keyword argument
- Call pretty.install() in the Python REPL so data structures print pretty and highlighted
- Use log() with log_locals=True for debugging output that shows local variables
- Use the Handler class to colorize output from Python's logging module
Downloads
Strengths
- Simple, familiar interface: rich's print has the same signature as Python's built-in print
- Covers many output types (tables, progress bars, Markdown, tracebacks) in one library
- Works on Linux, macOS and Windows and in Jupyter notebooks with no extra setup, per the README
Trade-offs
- Color and emoji depend on the terminal; the README says the classic Windows terminal is limited to 16 colors
- The README excerpt is truncated, so some advanced features are not described here
- It is a library for developers, so it does nothing useful on its own without Python code
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| rich (this) | 57.7k | Library | beginner | 5 months ago | Python developers who write command-line scripts and want clearer output |
| textual | 37.6k | Framework | beginner | 27 days ago | Python developers who want a terminal app with buttons, tables and forms |
| typer | 20.2k | Library | beginner | 5 days ago | Python developers writing small or medium command-line tools |
| shiki | 13.9k | Library | intermediate | 4 days ago | Developers building documentation or blog sites that show code samples |
| docling | 70k | Library | beginner | 5 days ago | Python developers building retrieval or RAG pipelines over PDFs and office files |
| slides | 11.7k | App | beginner | 4 months ago | Developers who already live in the terminal and want to present technical material |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.