rich
Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
Description
[](https://pypi.org/project/rich/) [](https://badge.fury.io/py/rich) [](https://pepy.tech/project/rich) [](https://codecov.io/gh/Textualize/rich) [](https://www.willmcgugan.com/tag/rich/) [](https://twitter.com/willmcgugan)  [English readme](https://github.com/textualize/rich/blob/master/README.md) • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md) • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) • [Polskie readme](https://github.com/textualize/rich/blob/master/README.pl.md) Rich is a Python library for _rich_ text and beautiful formatting in the terminal. The [Rich API](https://rich.readthedocs.io/en/latest/) makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.  For a video introduction to Rich see [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88). See what [people are saying about Rich](https://www.willmcgugan.com/blog/pages/post/rich-tweets/). ## Compatibility Rich works with Linux, macOS and Windows. True color / emoji works with new Windows Terminal, classic terminal is limited to 16 colors. Rich requires Python 3.8 or later. Rich works with [Jupyter notebooks](https://jupyter.org/) with no additional configuration required. ## Installing Install with `pip` or your favorite PyPI package manager. ```sh python -m pip install rich ``` Run the following to test Rich output on your terminal: ```sh python -m rich ``` ## Rich Print To effortlessly add rich output to your application, you can import the [rich print](https://rich.readthedocs.io/en/latest/introduction.html#quick-start) method, which has the same signature as the builtin Python function. Try this: ```python from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ```  ## Rich REPL Rich can be installed in the Python REPL, so that any data structures will be pretty printed and highlighted. ```python >>> from rich import pretty >>> pretty.install() ```  ## Using the Console For more control over rich terminal content, import and construct a [Console](https://rich.readthedocs.io/en/latest/reference/console.html#rich.console.Console) object. ```python from rich.console import Console console = Console() ``` The Console object has a `print` method which has an intentionally similar interface to the builtin `print` function. Here's an example of use: ```python console.print("Hello", "World!") ``` As you might expect, this will print `"Hello World!"` to the terminal. Note that unlike the builtin `print` function, Rich will word-wrap your text to fit within the terminal width. There are a few ways of adding color and style to your output. You can set a style for the entire output by adding a `style` keyword argument. Here's an example: ```python console.print("Hello", "World!", style="bold red") ``` The output will be something like the following:  | Low | 4/21/2026 |
| v15.0.0 | A few fixes. The major version bump is to honor the passing of 3.8 support which reached its EOL in October 7, 2024 ## [15.0.0] - 2026-04-12 ### Changed - Breaking change: Dropped support for Python3.8 ### Fixed - Fixed empty print ignoring the `end` parameter https://github.com/Textualize/rich/pull/4075 - Fixed `Text.from_ansi` removing newlines https://github.com/Textualize/rich/pull/4076 - Fixed `FileProxy.isatty` not proxying https://github.com/Textualize/rich/pull/4077 - F | Medium | 4/12/2026 |
| v14.3.4 | No new features in this release, but there should be improved startup time for Rich apps, and potentially improved runtime if you have a lot of links. ## [14.3.4] - 2026-04-11 ### Changed - Improved import time with lazy loading https://github.com/Textualize/rich/pull/4070 - Changed link id generation to avoid random number generation at runtime https://github.com/Textualize/rich/pull/3845 | Medium | 4/11/2026 |
| v14.3.3 | Fixed a infinite loop in split_graphemes ## [14.3.3] - 2026-02-19 ### Fixed - Fixed infinite loop with `cells.split_graphemes` https://github.com/Textualize/rich/pull/4006 | Low | 2/19/2026 |
| v14.3.2 | A fix for `cell_len` edge cases ## [14.3.2] - 2026-02-01 ### Fixed - Fixed solo ZWJ crash https://github.com/Textualize/rich/pull/3953 - Fixed control codes reporting width of 1 https://github.com/Textualize/rich/pull/3953 | Low | 2/1/2026 |
| v14.3.1 | Fixed issue with characters outside of unicode range reporting 0 cell size ## [14.3.1] - 2026-01-24 ### Fixed - Fixed characters out of unicode range reporting a cell size if 0 https://github.com/Textualize/rich/pull/3944 | Low | 1/24/2026 |
| v14.3.0 | Rich now has support for multi-codepoint emojis. There have also been some Markdown improvements, and a number of fixes. See the release notes below for details. ## [14.3.0] - 2026-01-24 ### Fixed - IPython now respects when a `Console` instance is passed to `pretty.install` https://github.com/Textualize/rich/pull/3915 - Fixed extraneous blank line on non-interactive disabled `Progress` https://github.com/Textualize/rich/pull/3905 - Fixed extra padding on first cell in columns https:/ | Low | 1/24/2026 |
| v14.2.0 | This release bumps Python compatibility to the just-released Python 3.14. ## [14.2.0] - 2025-10-09 ### Changed - Python3.14 compatibility https://github.com/Textualize/rich/pull/3861 | Low | 10/9/2025 |
| v14.1.0 | Live objects may now be nested. Previously a progress bar inside another progress context would fail. See the changelog below for this and other changes. ## [14.1.0] - 2025-06-25 ### Changed - Removed `typing_extensions` from runtime dependencies https://github.com/Textualize/rich/pull/3763 - Live objects (including Progress) may now be nested https://github.com/Textualize/rich/pull/3768 - Added padding property to Syntax which returns a tuple of four integers https://github.com/Textu | Low | 7/25/2025 |
| v14.0.0 | Mostly updates to Traceback rendering, to add support for features introduced in Python3.11 We also have a new env var that I am proposing to become a standard. `TTY_COMPATIBLE=1` tells Rich to write ansi-escape sequences even if it detects it is not writing to a terminal. This is intended for use with GitHub Actions / CI, which can interpret escape sequences, but aren't a terminal. There is also a change to how NO_COLOR and FORCE_COLOR are interpreted, which is the reason for the major ve | Low | 3/30/2025 |
| v13.9.4 | ## [13.9.4] - 2024-11-01 ### Changed - Optimizations to cell_len which may speed up Rich / Textual output https://github.com/Textualize/rich/pull/3546 | Low | 11/2/2024 |
| v13.9.3 | Fix a broken regex that resulted in the slow path being chosen for some operations. This fix should result in notable speedups for some operations, such as wrapping text. ## [13.9.3] - 2024-10-22 ### Fixed - Fixed broken regex that may have resulted in poor performance. https://github.com/Textualize/rich/pull/3535 | Low | 10/22/2024 |
| v13.9.2 | A hotfix for highlighting in the table, and a fix for `Segment.split_cells` ## [13.9.2] - 2024-10-04 ### Fixed - Fixed `Table` columns not highlighting when added by `add_row` https://github.com/Textualize/rich/issues/3517 - Fixed an issue with Segment.split_cells reported in Textual https://github.com/Textualize/textual/issues/5090 | Low | 10/4/2024 |
| v13.9.1 | ## [13.9.1] - 2024-10-01 ### Fixed - Fixed typing_extensions dependency | Low | 10/1/2024 |
| v13.9.0 | This version adds support for fine-grained information in tracebacks. In other words, it will highlight columns in tracebacks (for supported Python versions). Here's an example: <img width="1143" alt="Screenshot 2024-10-01 at 13 07 35" src="https://github.com/user-attachments/assets/d1405f90-4ae5-4fad-83ce-05c2e4542f4e"> This version also **drops support for Python 3.7**, which has long since reached its EOL. If you are stuck on Python3.7 for any reason, you will not be able to upgrade to | Low | 10/1/2024 |
| v13.8.1 | ## [13.8.1] - 2024-09-10 ### Fixed - Added support for Python 3.13 https://github.com/Textualize/rich/pull/3481 - Fixed infinite loop when appending Text to same instance https://github.com/Textualize/rich/pull/3480 | Low | 9/10/2024 |
| v13.8.0 | This is a fairly large update. Mostly an accumulation of small fixes and enhancements. Nothing qualifies as a *breaking change (for some definition), but there may be some subtly changes to output. Check below for anything that might affect you! ## [13.8.0] - 2024-08-26 ### Fixed - Fixed `Table` rendering of box elements so "footer" elements truly appear at bottom of table, "mid" elements in main table body. - Fixed styles in Panel when Text objects are used for title https://github.co | Low | 8/26/2024 |
| v13.7.1 | Fixes some character widths ## [13.7.1] - 2023-02-28 ### Fixed - Updated the widths of some characters https://github.com/Textualize/rich/pull/3289 | Low | 2/28/2024 |
| v13.7.0 | ## [13.7.0] - 2023-11-15 ### Added - Adds missing parameters to Panel.fit https://github.com/Textualize/rich/issues/3142 ### Fixed - Some text goes missing during wrapping when it contains double width characters https://github.com/Textualize/rich/issues/3176 - Ensure font is correctly inherited in exported HTML https://github.com/Textualize/rich/issues/3104 - Fixed typing for `FloatPrompt`. | Low | 11/15/2023 |
| v13.6.0 | Mostly a meta update in readiness for the release of Python3.12 ## [13.6.0] - 2023-09-30 ### Added - Added Python 3.12 to classifiers. | Low | 9/30/2023 |
| v13.5.3 | ## [13.5.3] - 2023-09-17 ### Fixed - Markdown table rendering issue with inline styles and links https://github.com/Textualize/rich/issues/3115 - Fix Markdown code blocks on a light background https://github.com/Textualize/rich/issues/3123 | Low | 9/17/2023 |
| v13.5.2 | Bugfix ## [13.5.2] - 2023-08-01 ### Fixed - Fixed Text.expand_tabs assertion error | Low | 8/1/2023 |
| v13.5.1 | Very minor update to URL highlighting ## [13.5.1] - 2023-07-31 ### Fixed - Fix tilde character (`~`) not included in link regex when printing to console https://github.com/Textualize/rich/issues/3057 | Low | 7/31/2023 |
| v13.5.0 | https://textual.textualize.io/blog/2023/07/29/pull-requests-are-cake-or-puppies/ ## [13.5.0] - 2023-07-29 ### Fixed - Fixed Text.expand_tabs not expanding spans. - Fixed TimeElapsedColumn from showing negative. - Fix for escaping strings with a trailing backslash https://github.com/Textualize/rich/issues/2987 - Fixed exception in Markdown with partial table https://github.com/Textualize/rich/issues/3053 - Fixed the HTML export template so that the `<html>` tag comes before the `<he | Low | 7/29/2023 |
| v13.4.2 | ## [13.4.2] - 2023-06-12 ### Changed - Relaxed markdown-it-py dependency | Low | 6/12/2023 |
| v13.4.1 | ## [13.4.1] - 2023-05-31 ### Fixed - Fixed typing extensions import in markdown https://github.com/Textualize/rich/issues/2979 | Low | 5/31/2023 |
| v13.4.0 | ## [13.4.0] - 2023-05-31 ### Added - Added support for tables in `Markdown` https://github.com/Textualize/rich/pull/2977  | Low | 5/31/2023 |
| v13.3.5 | ## [13.3.5] - 2023-04-27 ### Fixed - Fixed italic indent guides in SVG output | Low | 4/27/2023 |
| v13.3.4 | ## [13.3.4] - 2023-04-12 ### Fixed - Fixed for `is_terminal` ignoring FORCE_COLOR https://github.com/Textualize/rich/pull/2923 | Low | 4/12/2023 |
| v13.3.3 | Just a new method on the Style class. A helper for Textual, you probable aren't going to need it. ## [13.3.3] - 2023-02-27 ### Added - Added Style.clear_meta_and_links | Low | 3/27/2023 |
| v13.3.2 | Mixed bag, mostly fixes ## [13.3.2] - 2023-02-04 ### Fixed - Reversed `pre` and `code` tags in base HTML format https://github.com/Textualize/rich/pull/2642 - Fix syntax error when building with nuitka https://github.com/Textualize/rich/pull/2635 - Fixed pretty printing of empty dataclass https://github.com/Textualize/rich/issues/2819 - Use `Console(stderr=True)` in `rich.traceback.install` to support io redirection. - Fixes superfluous spaces in html output https://github.com/Textu | Low | 3/4/2023 |
| v13.3.1 | This release contains a fix for truecolor to eight bit color conversion, which results in more accurate colors. ## [13.3.1] - 2023-01-28 ### Fixed - Fixed truecolor to eight bit color conversion https://github.com/Textualize/rich/pull/2785 | Low | 1/28/2023 |
| v13.3.0 | ## [13.3.0] - 2023-01-27 ### Fixed - Fixed failing tests due to Pygments dependency https://github.com/Textualize/rich/issues/2757 - Relaxed ipywidgets https://github.com/Textualize/rich/issues/2767 ### Added - Added `encoding` parameter in `Theme.read` | Low | 1/27/2023 |
| v13.2.0 | v13.2.0 replaces the unmaintained `commonmark` library with `markdown-it-py`. This new parser has a lot more capabilities and will allow us to implement a number of additional Markdown features in the future. The output from the `Markdown` renderable may change a little from previous versions. ## [13.2.0] - 2023-01-19 ### Changed - Switch Markdown parsing from commonmark to markdown-it-py https://github.com/Textualize/rich/pull/2439 | Low | 1/19/2023 |
| v13.1.0 | This release fixes tracebacks in Jupyter which didn't show the code. Additionally tracebacks have two new parameters to hide double underscore and single underscore locals. See the changelog for details <img width="947" alt="Screenshot 2023-01-14 at 11 26 38" src="https://user-images.githubusercontent.com/554369/212469643-a6f80ccf-93cd-4970-90fd-eb0f384b4e28.png"> ## [13.1.0] - 2023-01-14 ### Fixed - Fixed wrong filenames in Jupyter tracebacks https://github.com/Textualize/rich/ | Low | 1/14/2023 |
| v13.0.1 | Fix for an issue where Segment.split_cells produced the wrong result. Mostly a hotfix for the benefit of Textual. ## [13.0.1] - 2023-01-06 ### Fixed - Fixed issue with Segment.split_cells for mixed single and double cell widths | Low | 1/6/2023 |
| v13.0.0 | Some relatively minor fixes and improvements. The most significant update (and the reason for the major version bump) is that Rich has dropped Python3.6 support. If you are a Python3.6 user and can't upgrade for whatever reason, pin to version 12.6.0. ## [13.0.0] - 2022-12-30 ### Fixed - Reversed `pre` and `code` tags in base HTML format https://github.com/Textualize/rich/pull/2642 - Improved detection of `attrs` library, that isn't confused by the presence of the `attr` library. - | Low | 12/30/2022 |
| v12.6.0 | **NOTE:** 12.6.0 may be the last version to support Python3.6. The next version will be 13.0.0, and will be Python3.7+ ## [12.6.0] - 2022-10-02 ### Added - Parse ANSI escape sequences in pretty repr https://github.com/Textualize/rich/pull/2470 - Add support for `FORCE_COLOR` env var https://github.com/Textualize/rich/pull/2449 - Allow a `max_depth` argument to be passed to the `install()` hook https://github.com/Textualize/rich/issues/2486 - Document using `None` as name in `__rich | Low | 10/2/2022 |
| v12.5.1 | ## [12.5.1] - 2022-07-11 ### Fixed - Fixed missing typing extensions dependency on 3.9 https://github.com/Textualize/rich/issues/2386 | Low | 7/11/2022 |
| v12.5.0 | ## [12.5.0] - 2022-07-11 ### Added - Environment variables `JUPYTER_COLUMNS` and `JUPYTER_LINES` to control width and height of console in Jupyter - Markdown friendly `Box` style, `MARKDOWN`, for rendering tables ready to copy into markdown files - `inspect` will prefix coroutine functions with `async def` ### Changed - Default width of Jupyter console size is increased to 115 - Optimized Segment.divide - `Style.__add__` will no longer return `NotImplemented` - Remove rich.\_l | Low | 7/11/2022 |
| v12.4.4 | ## [12.4.4] - 2022-05-24 ### Changed - Added clipping per line to SVG output to avoid box characters overlapping - Optimized SVG output | Low | 5/24/2022 |
| v12.4.3 | ## [12.4.3] - 2022-05-23 ### Changed - Further tweaks to SVG character matrix - Added clip rect to SVG to prevent box characters overlapping bottom of terminal | Low | 5/23/2022 |
| v12.4.2 | ## [12.4.2] - 2022-05-23 ### Fixed - Fix for SVG on Firefox ### Changed - Removed excess margin from SVG, tweaked cell sizes to better render block characters | Low | 5/23/2022 |
| v12.4.1 | A fix and further enhancements to the SVG export. Default color scheme is now dimmed Monokai, and there is a keyline around the terminal so it looks distinct against a dark background.  ## [12.4.1] - 2022-05-08 ### Fixed - Fix for default background color in SVG export https://github.com/Textualize/rich/issues/2260 ### Changed - Added a keyline around SVG | Low | 5/8/2022 |
| v12.4.0 | This release has a major change to the SVG export. It is now a simpler design, and will render outside of a browser.  <img width="1387" alt="Screenshot 2022-05-07 at 15 57 54" src="https://user-images.githubusercontent.com/554369/167259817-4ecd292a-6ce0-4a3e-a3b5-65bd00837e4e.png"> ## [12.4.0] - 2022-05-07 ### Changed - Rebuilt SVG export to create a simpler SVG that is | Low | 5/7/2022 |
| v12.3.0 | ## [12.3.0] - 2022-04-26 ### Added - Ability to change terminal window title https://github.com/Textualize/rich/pull/2200 - Added show_speed parameter to progress.track which will show the speed when the total is not known - Python blocks can now opt out from being rendered in tracebacks's frames, by setting a `_rich_traceback_omit = True` in their local scope https://github.com/Textualize/rich/issues/2207 ### Fixed - Fall back to `sys.__stderr__` on POSIX systems when trying to | Low | 4/26/2022 |
| v12.2.0 | ## [12.2.0] - 2022-05-05 ### Changed - Bumped typing-extensions minimum to 4.0.0 - Bumped minimum Python version to 3.6.3 | Low | 4/5/2022 |
| v12.1.0 |   ## [12.1.0] - 2022-04-03 ### Added - Progress.open and Progress.wrap_file method to track the progress while reading from a file or file-like object https://github.com/willmcgugan/rich/pull/1759 - SVG export functionality https://github.com/Textualize/rich | Low | 4/3/2022 |
| v12.0.1 | ## [12.0.1] - 2022-03-22 ### Changed - Improve performance of cell_length https://github.com/Textualize/rich/pull/2061 - Improve performance of chop_cells https://github.com/Textualize/rich/pull/2077 ### Fixed - Fix capturing stdout on legacy Windows https://github.com/Textualize/rich/pull/2066 | Low | 3/22/2022 |
| v12.0.0 | This release drops Colorama as a dependancy in favour of an internal Win32 render. There are some new features for progress bars, added support for pretty printing named tuples, and a bunch of fixes. As a major version there are a few breaking changes, see below. ## [12.0.0] - 2022-03-10 ### Added - Added options to TimeRemainingColumn to render a compact time format and render elapsed time when a task is finished. https://github.com/Textualize/rich/pull/1992 - Added ProgressC | Low | 3/10/2022 |
| v11.2.0 | ## [11.2.0] - 2022-02-08 ### Added - Add support for US spelling of "gray" in ANSI color names https://github.com/Textualize/rich/issues/1890 - Added `rich.diagnose.report` to expose environment debugging logic as function https://github.com/Textualize/rich/pull/1917 - Added classmethod `Progress.get_default_columns()` to get the default list of progress bar columns https://github.com/Textualize/rich/pull/1894 ### Fixed - Fixed performance issue in measuring text | Low | 2/8/2022 |
