pypi rich 7.0.0
Syntax improvements

The main feature of this release was a way of display syntax highlighting with only standard colors (i.e. the colors you can configure in the terminal), which you can do by setting the theme to "ansi_dark" or "ansi_light". The other themes are generally prettier (IMHO) but use colors defined by the theme, and not by the user's settings.

When testing the above I also made some optimizations which benefit all the Rich output. You may only notice this if you are syntax highlighting large XML files, but its faster now.

This is a major release as there were a small number of signature changes. Most people won't be impacted, but please review the release notes below.

Screen Shot 2020-09-18 at 16 35 46

[7.0.0] - 2020-09-18


  • New ansi_dark and ansi_light themes
  • Added Text.append_tokens for fast appending of string + Style pairs
  • Added Text.remove_suffix
  • Added Text.append_tokens

### Changed

  • Text.tabs_to_spaces was renamed to Text.expand_tabs, which works in place rather than returning a new instance
  • Renamed Column.index to Column._index
  • Optimized Style.combine and Style.chain
  • Optimized text rendering by fixing internal cache mechanism
  • Optimized hash generation for Styles
latest releases: 10.12.0, 10.11.0, 10.10.0...
13 months ago