rich

Rich is a Python library for rich text and beautiful formatting in the terminal.

MIT License

Downloads
241.8M
Stars
48.1K
Committers
268

Bot releases are hidden (Show)

rich -

Published by willmcgugan almost 3 years ago

Reverted a fix for https://github.com/willmcgugan/rich/issues/1530

On reflection, I think the fix might introduce the possibility for a deadlock -- although none was reported.

[10.15.1] - 2021-11-29

Changed

  • Reverted thread-safety fix for Live that introduced deadlock potential
rich -

Published by willmcgugan almost 3 years ago

[10.15.0] - 2021-11-28

Added

  • Added dynamic_progress.py to examples
  • Added ConsoleOptions.update_height
  • Fixed Padding not respecting height
  • Added Text.from_ansi method

Changed

  • Some optimizations for simple strings (with only single cell widths)

Fixed

rich -

Published by willmcgugan almost 3 years ago

Mostly fixes for edge cases. Added a rich_cast function to rich.protocol, which is unlikely to be used outside of Rich itself.

[10.14.0] - 2021-11-16

Fixed

Added

Changed

rich -

Published by willmcgugan almost 3 years ago

This release is mostly bugfixes (details below). The minor version bump is because print_json grew a number of parameters to match json.dumps

[10.13.0] - 2021-11-07

Added

Fixed

Changed

rich - Python3.10 support

Published by willmcgugan about 3 years ago

[10.12.0] - 2021-10-06

Updated

  • Official Py3.10 release

Fixed

  • Fixed detection of custom repr when pretty printing dataclasses
rich -

Published by willmcgugan about 3 years ago

Added two new options to Tracebacks, to hide framework code, and guard against very long tracebacks.

[10.11.0] - 2021-09-24

Added

  • Added suppress parameter to tracebacks
  • Added max_frames parameter to tracebacks
rich -

Published by willmcgugan about 3 years ago

[10.10.0] - 2021-09-18

Added

  • Added stdin support to rich.json

Fixed

rich - Enhancements to print_json

Published by willmcgugan about 3 years ago

This release highlights JSON keys with a different color

[10.9.0] - 2020-08-29

Added

  • Added data parameter to print_json method / function
  • Added an --indent parameter to python -m rich.json

Changed

  • Changed default indent of JSON to 2 (down from 4)
  • Changed highlighting of JSON keys to new style (bold blue)
rich - Pretty print JSON

Published by willmcgugan about 3 years ago

This release adds pretty printing of JSON

[10.8.0] - 2020-08-28

Added

  • Added Panel.subtitle
  • Added Panel.subtitle_align
  • Added rich.json.JSON
  • Added rich.print_json and Console.print_json

Fixed

rich -

Published by willmcgugan about 3 years ago

[10.7.0] - 2021-08-05

Added

  • Added Text.apply_meta
  • Added meta argument to Text.assemble
  • Added Style.from_meta
  • Added Style.on
  • Added Text.on

Changed

  • Changed RenderGroup to Group and render_group to group (old names remain for compatibility but will be deprecated in the future)
  • Changed rich.repr.RichReprResult to rich.repr.Result (old names remain for compatibility but will be deprecated in the future)
  • Changed meta serialization to use pickle rather than marshal to permit callables
rich - Emoji variants

Published by willmcgugan over 3 years ago

[10.6.0] - 2021-07-12

Deprecated

  • Added deprecation warning for tabulate_mapping which will be removed in v11.0.0

Added

  • Added precision argument to filesize.decimal
  • Added separator argument to filesize.decimal
  • Added _rich_traceback_guard to Traceback
  • Added emoji_variant to Console
  • Added -emoji and -text variant selectors to emoji code

Fixed

Changed

  • Changed Console.size to use unproxied stdin and stdout
rich - Mostly repr fixes

Published by willmcgugan over 3 years ago

Some fixes, and a few methods to support Textual

[10.5.0] - 2021-05-07

Fixed

Added

  • Added new_line_start argument to Console.print
  • Added Segment.divide method
  • Added Segment.split_cells method
  • Added segment.SegmentLines class
rich - Auto Rich Repr

Published by willmcgugan over 3 years ago

The highlight of this release is a decorator to automatically create a Rich repr for any class.

[10.4.0] - 2021-06-18

Added

  • Added Style.meta
  • Added rich.repr.auto decorator

Fixed

  • Fixed error pretty printing classes with special rich_repr method
rich - Rich Repr updates

Published by willmcgugan over 3 years ago

This release fleshes out the new Rich Repr protocol

[10.3.0] - 2021-06-09

Added

  • Added Console.size setter
  • Added Console.width setter
  • Added Console.height setter
  • Added angular style Rich reprs
  • Added an IPython extension. Load via %load_ext rich

Changed

  • Changed the logic for retrieving the calling frame in console logs to a faster one for the Python implementations that support it.
rich - Fix console markup in status text

Published by willmcgugan over 3 years ago

[10.2.2] - 2021-05-19

Fixed

rich - Fix markdown in layout

Published by willmcgugan over 3 years ago

[10.2.1] - 2021-05-17

Fixed

rich - Expanded pretty printing

Published by willmcgugan over 3 years ago

This version has some enhancements to pretty printing. Rich will now pretty print objects created with attrs (https://www.attrs.org/en/stable/). Additionally, there is expanded support for UserList, UserDict, and mappingproxy -- less common containers in Python.

[10.2.0] - 2021-05-12

Added

  • Added syntax for call, i.e. "Foo(bar)"
  • Added Console.measure as a convenient alias for Measurement.get
  • Added support for pretty printing attrs objects
  • Added mappingproxy to pretty print
  • Added UserDict and UserList support to pretty printer

Changed

  • Changed colorama init to set strip=False
  • Changed highlighter for False, True, None to not match in the middle of a word. i.e. NoneType is no longer highlighted as None

Fixed

  • Fixed initial
rich - Improved Jupyter support

Published by willmcgugan over 3 years ago

[10.1.0] - 2020-04-03

Fixed

  • Fixed support for jupyter qtconsole and similar Jupyter environments
rich - Fix for race condition in Progress

Published by willmcgugan over 3 years ago

[10.0.1] - 2021-03-30

Fixed

rich - Update to render protocol

Published by willmcgugan over 3 years ago

Some significant signature to render protocol, hence the major version bump. These are unlikely to impact many people unless you are implementing your own renderables.

Most of the work in this version was to aid development of adding more dynamic features to future versions.

See changelog for details...

[10.0.0] - 2021-03-27

Changed

  • Made pydoc import lazy as at least one use found it slow to import https://github.com/willmcgugan/rich/issues/1104
  • Modified string highlighting to not match in the middle of a word, so that apostrophes are not considered strings
  • New way of encoding control codes in Segment
  • New signature for Control class
  • Changed Layout.split to use new Splitter class
  • Improved layout.tree
  • Changed default theme color for repr.number to cyan
  • __rich_measure__ signature changed to accept ConsoleOptions rather than max_width

Added

  • Added __rich_repr__ protocol method to Pretty
  • Added rich.region.Region
  • Added ConsoleOptions.update_dimensions
  • Added rich.console.ScreenUpdate
  • Added Console.is_alt_screen
  • Added Control.segment, Control.bell, Control.home, Control.move_to, Control.clear, Control.show_cursor, Control.alt_screen
  • Added Console.update_screen and Console.update_screen_lines
  • Added Layout.add_split, Layout.split_column, Layout.split_row, layout.refresh
  • Added new Rich repr protocol __rich_repr__

Fixed

Package Rankings
Top 0.25% on Pypi.org
Top 5.24% on Proxy.golang.org
Top 1.85% on Conda-forge.org
Top 7.68% on Anaconda.org
Badges
Extracted from project README
Downloads PyPI version codecov Rich blog Twitter Follow