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 - Pretty dataclass support

Published by willmcgugan over 3 years ago

The highlight of this release is that pretty printing now supports dataclasses, which can now collapse just like other data structures. Here's an example:

[9.13.0] - 2021-03-06

Added

  • Pretty printer now supports dataclasses

Fixed

Changed

  • Added ws and wss to url highlighter
rich - Fix for custom formatter in RichHandler

Published by willmcgugan over 3 years ago

[9.12.4] - 2021-03-01

Fixed

Changed

  • Allow highly compressed table cells to go to 0 width
  • Optimization to remove empty styles in various places
rich - Faster tables

Published by willmcgugan over 3 years ago

A optimization to the Padding class. This is unlikely to impact anyone unless you are printing very large tables.

[9.12.3] - 2021-02-28

Changed

  • Optimized Padding
rich -

Published by willmcgugan over 3 years ago

[9.12.2] - 2021-02-27

Added

  • Added ConsoleOptions.copy

Changed

  • Optimized ConsoleOptions.update
rich -

Published by willmcgugan over 3 years ago

[9.12.1] - 2021-02-27

### Fixed

Added

  • Added Task.finished_speed

Changed

  • Froze TransferSpeedColumn speed when task is finished
  • Added SIGINT handler to downloader.py example
  • Optimization for large tables
rich -

Published by willmcgugan over 3 years ago

Mostly fixes in this update. Plus a change of behaviour for tables with no columns, and an added height parameter to Panel.

[9.12.0] - 2021-02-24

Fixed

Changed

Added

  • Added height to Panel
rich - Some minor fixes

Published by willmcgugan over 3 years ago

[9.11.1] - 2021-02-20

Fixed

Changed

  • python -m rich.markdown and rich.syntax show usage with no file

Added

  • Added height parameter to Layout
  • Added python -m rich.segment
rich - Now with Rich Layout system

Published by willmcgugan over 3 years ago

The highlight of this release is the new Layout system which can be used to produce htop like terminal dashboards.

[9.11.0] - 2021-02-15

Fixed

### Added

  • Added cheeky sponsorship request to test card
  • Added quiet argument to Console constructor
  • Added support for a callback function to format timestamps (allows presentation of milliseconds)
  • Added Console.set_alt_screen and Console.screen
  • Added height to ConsoleOptions
  • Added vertical parameter to Align
  • Added Layout class

Changed

  • Pretty.overflow now defaults to None
  • Panel now respects options.height
  • Traceback lexer defaults to Python if no extension on source
  • Added ConsoleDimensions size attribute to ConsoleOptions so that size can't change mid-render
rich - Optimizations and faster tracebacks

Published by willmcgugan over 3 years ago

[9.10.0] - 2021-01-27

Changed

  • Some optimizations for Text
  • Further optimized Tracebacks by not tokenizing code more that necessary
  • Table Column.header_style and Column.footer_style are now added to Table header/footer style
rich - Traceback optimizations and fixes

Published by willmcgugan over 3 years ago

[9.9.0] - 2021-01-23

Changed

  • Extended Windows palette to 16 colors
  • Modified windows palette to Windows 10 colors
  • Change regex for attrib_name to be more performant
  • Optimized traceback generation

Fixed

  • Fix double line tree guides on Windows
  • Fixed Tracebacks ignoring initial blank lines
  • Partial fix for tracebacks not finding source after chdir

Added

  • Added post_style argument to Segment.apply_style
rich - Fixed deadlock in Live - please update if you are using Live / Status

Published by willmcgugan almost 4 years ago

[9.8.2] - 2021-01-15

Fixed

rich -

Published by willmcgugan almost 4 years ago

[9.8.1] - 2021-01-13

Fixed

rich -

Published by willmcgugan almost 4 years ago

A few fixes and minor enhancements.

[9.8.0] - 2021-01-11

### Added

  • Added rich_measure for tree
  • Added rich.align.VerticalCenter

Changed

  • The style argument on Align now applies to background only
  • Changed display of progress bars in no_color mode for clarity
  • Console property size will fall back to getting the terminal size of stdout it stdin fails, this allows size to be correctly determined when piping

Fixed

rich - A Treemendous release

Published by willmcgugan almost 4 years ago

The highlight of this release is the new Tree renderable.

In addition there is also a no_color flag which removes color from the output but preserves style (bold, italic etc). Previously Rich respected the NO_COLOR env var but it also remove style.

[9.7.0] - 2021-01-09

Added

  • Added rich.tree
  • Added no_color argument to Console
rich - Console markup escaping fix

Published by willmcgugan almost 4 years ago

[9.6.2] - 2021-01-07

Fixed

rich -

Published by willmcgugan almost 4 years ago

[9.6.1] - 2020-12-31

Fixed

  • Fixed encoding error on Windows when loading code for Tracebacks
rich - IPython support

Published by willmcgugan almost 4 years ago

This version adds IPython support to rich.pretty and some enhancements to rich.inspect

[9.6.0] - 2020-12-30

Changed

  • MarkupError exception raise from None to omit internal exception
  • Factored out RichHandler.render and RichHandler.render_message for easier extending
  • Display pretty printed value in rich.inspect

Added

  • Added Progress.TimeElapsedColumn
  • Added IPython support to pretty.install

Fixed

  • Fixed display of locals in Traceback for stdin
rich - Fix terminal size detection on Windows

Published by willmcgugan almost 4 years ago

This release was a hotfix for broken terminal size detection on Windows

[9.5.1] - 2020-12-19

Fixed

rich -

Published by willmcgugan almost 4 years ago

⚠️ Some subtle changes to behavior in this version, with regards to getting the size of the terminal and highlighting strings renderables. Please review the release notes carefully.

[9.5.0] - 2020-12-18

Changed

  • If file is not specified on Console then the Console.file will return the current sys.stdout. Prior to 9.5.0 sys.stdout was cached on the Console, which could break code that wrapped sys.stdout after the Console was constructed.
  • Changed Color.__str__ to not include ansi codes
  • Changed Console.size to get the terminal dimensions via sys.stdin. This means that if you set file to be an io.StringIO file (for example) then the width will be set to the current terminal dimensions and not a default of 80.

Added

  • Added stderr parameter to Console
  • Added rich.reconfigure
  • Added Color.__rich__
  • Added Console.soft_wrap
  • Added Console.style parameter
  • Added Table.highlight parameter to enable highlighting of cells
  • Added Panel.highlight parameter to enable highlighting of panel title
  • Added highlight to ConsoleOptions

Fixed

rich - We got a live one

Published by willmcgugan almost 4 years ago

This release adds a new rich.live interface which can display continually updated renderable, which you can use to create animated "dashboards".

Also in this release we have 'spinner' animations via a new Console.status method, or a SpinnerColumn in progress bars.

[9.4.0] - 2020-12-12

### Added

  • Added rich.live https://github.com/willmcgugan/rich/pull/382
  • Added algin parameter to Rule and Console.rule
  • Added rich.Status class and Console.status
  • Added getitem to Text
  • Added style parameter to Console.log
  • Added rich.diagnose command

### Changed

  • Table.add_row style argument now applies to entire line and not just cells
  • Added end_section parameter to Table.add_row to force a line underneath row

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