I've added progress bar support to Rich.

If you haven't seen my earlier posts on the subject, Rich is a terminal rendering framework for Python. It lets you render styled text and a whole bunch of other things (markdown, syntax, tables, tracebacks, etc.) to the terminal.

This latest addition to the lib renders progress bars with additional information such as percentage completed, time remaining, data transfer speed etc. It's highly configurable, so you can customize it to show whatever information you like. And since it's implemented as a Rich renderable, you can easily add color and formatting. Here's what it looks like:

As you can see it supports multiple bars, which makes it useful for displaying progress of concurrent tasks. See downloader.py for an example which uses Rich to display progress of concurrent downloads.

Pogress bars are in Rich 0.7.0, now on Pypi.

This is the last major feature planned before a 1.0 release of Rich. Tweet @willmcgugan if you have any feedback or requests.

Use Markdown for formatting
*Italic* **Bold** `inline code` Links to [Google](http://www.google.com) > This is a quote > ```python import this ```
your comment will be previewed here
gravatar
Anon

Looks great! One question: is it thread safe? This was always an issue for me when I wanted to put a tqdm progress bar on top of an embarrassingly parallel problem.

gravatar
Will McGugan

Yes it is :-)

gravatar
Eric James

This looks awesome! Is there a way to get elapsed time instead of estimated time of completion?

gravatar
Will McGugan

Sure, something like this should do it.

progress = Progress(BarColumn(), "{task.elapsed}")