Terminal tests
$ echo $TERM
xterm-256color
$ export TERM=xterm-256color
$ echo $TERM
xterm-256color
$ python -m rich
Rich features
Colors ✓ 4-bit color ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✓ 8-bit color ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✓ Truecolor (16.7 million) ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✓ Dumb terminals ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✓ Automatic color conversion ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Styles All ansi styles: bold, dim, italic, underline, strikethrough,
reverse, and even blink.
Text Word wrap text. Justify left, center, right or full.
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
dolor sit amet, dolor sit amet, dolor sit amet, dolor sit amet,
consectetur consectetur consectetur consectetur
adipiscing adipiscing adipiscing elit. adipiscing elit.
elit. Quisque elit. Quisque Quisque in metus Quisque in metus
in metus sed in metus sed sed sapien sed sapien
sapien sapien ultricies ultricies
ultricies ultricies pretium a at pretium a at
pretium a at pretium a at justo. Maecenas justo. Maecenas
justo. Maecenas justo. Maecenas luctus velit et luctus velit et
luctus velit et luctus velit et auctor maximus. auctor maximus.
auctor maximus. auctor maximus.
Asian 🇨🇳 该库支持中文,日文和韩文文本!
language 🇯🇵
support ライブラリは中国語、日本語、韓国語のテキストをサポートしています
🇰🇷 이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다
Markup Rich supports a simple bbcode-like markup for color, style, and
emoji! 👍 🍎 🐜 🐻 🥖 🚌
Tables Date Title Production Budget Box Office
─────────────────────────────────────────────────────────────────
Dec 20, 2019 Star Wars: $275,000,000 $375,126,118
The Rise of
Skywalker
May 25, 2018 Solo: A $275,000,000 $393,151,347
Star Wars
Story
Dec 15, 2017 Star Wars $262,000,000 $1,332,539,889
Ep. VIII:
The Last
Jedi
May 19, 1999 Star Wars $115,000,000 $1,027,044,677
Ep. I: The
phantom
Menace
Syntax 1 def iter_last(values: Itera {
highlighting 2 │ """Iterate and generate │ 'foo': [
& 3 │ iter_values = iter(valu │ │ 3.1427,
pretty 4 │ try: │ │ (
printing 5 │ │ previous_value = ne │ │ │ 'Paul Atreides',
6 │ except StopIteration: │ │ │ 'Vladimir
7 │ │ return Harkonnen',
8 │ for value in iter_value │ │ │ 'Thufir Hawat'
9 │ │ yield False, previo │ │ )
10 │ │ previous_value = va │ ],
11 │ yield True, previous_va │ 'atomic': (
│ │ False,
│ │ True,
│ │ None
│ )
}
Markdown # Markdown ╔═════════════════════════════╗
║ Markdown ║
Supports much of the *markdown* ╚═════════════════════════════╝
__syntax__!
Supports much of the markdown
- Headers syntax!
- Basic formatting: **bold**,
*italic*, `code` • Headers
- Block quotes • Basic formatting: bold,
- Lists, and more... italic, code
• Block quotes
• Lists, and more...
+more! Progress bars, columns, styled logging handler, tracebacks,
etc...
rendered in 80.0ms (cold cache)
rendered in 33.2ms (warm cache)
╭──────────────────────── Thanks for trying out Rich! ─────────────────────────╮
│ │
│ We hope you enjoy using Textualize ]8;id=569105;https://github.com/textualize\https://github.com/textualize]8;;\ │
│ Rich! │
│ Buy devs a ☕ ]8;id=609044;https://ko-fi.com/textualize\https://ko-fi.com/textualize]8;;\ │
│ Rich is maintained with ❤ │
│ by ]8;id=168896;https://www.textualize.io\Textualize.io]8;;\ Twitter ]8;id=193622;https://twitter.com/willmcgugan\https://twitter.com/willmcgugan]8;;\ │
│ │
│ - Will McGugan │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯