Progress bars with Rich
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.
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.
Yes it is :-)
This looks awesome! Is there a way to get elapsed time instead of estimated time of completion?
Sure, something like this should do it.
Hi This looks great! One question though - is there a way to increase the thickness of the bar to make it more visually appealing?