rich/examples
K2 adcb5c748c Add tqdm compatibility shim with Rich progress backend
Implements a runtime adapter that replaces tqdm imports with Rich's
progress bars via install_tqdm(). The shim preserves common tqdm APIs
(iteration, len(), postfix, write, wrapattr) while routing rendering
through rich.progress.Progress.

Features:
- Opt-in monkeypatching of tqdm/trange and notebook variants
- Shared global Progress instance for performance
- Render throttling via mininterval/miniters/maxinterval
- Simplified text backend for file outputs (partial mode)
- Postfix value caching to avoid redundant formatting

Includes runnable examples demonstrating basic replacement and
aggressive reference overwriting, plus comprehensive unit tests
covering adapter installation, throttling, and postfix handling.

Updates README and contributor list.
2025-12-05 07:41:51 -05:00
..
attrs.py don't reraise 2022-12-24 09:45:37 +00:00
bars.py example fix 2020-10-17 15:54:00 +01:00
columns.py format with black 2020-08-20 12:54:39 +00:00
cp_progress.py docs for new progress feature 2022-04-01 14:17:21 +01:00
downloader.py examples/downloader: update suggested URL 2024-08-15 07:19:41 +02:00
dynamic_progress.py Black formatting (#3035) 2023-11-07 17:57:21 +00:00
exception.py update black 2022-02-14 10:03:44 +00:00
export.py print exports to terminal 2021-10-16 22:04:45 +05:30
file_progress.py progress docs 2022-04-01 14:49:02 +01:00
fullscreen.py more scrubbing 2022-09-19 11:33:38 +01:00
group.py .on methods and name changes 2021-07-28 09:10:23 +01:00
group2.py .on methods and name changes 2021-07-28 09:10:23 +01:00
highlighter.py listdir 2020-06-01 16:08:06 +01:00
jobs.py examples 2020-10-14 11:42:05 +01:00
justify.py overflow 2020-06-06 12:08:07 +01:00
justify2.py added example 2020-07-10 16:52:01 +01:00
layout.py Updates example/layout.py to use Splitter class 2021-03-29 22:35:33 +01:00
link.py black formatted 2020-07-15 11:42:11 +01:00
listdir.py added progress.reset 2020-10-14 10:19:38 +01:00
live_progress.py live refactor 2021-02-06 11:49:54 +00:00
log.py listdir 2020-06-01 16:08:06 +01:00
overflow.py docs 2020-06-06 13:11:29 +01:00
padding.py formatting 2020-09-13 13:12:34 +01:00
print_calendar.py tweaked calendar example 2021-10-10 17:37:26 +01:00
rainbow.py docs 2020-08-08 17:38:57 +01:00
README.md Update README.md (#2328) 2022-06-14 09:21:38 +01:00
recursive_error.py tests 2021-09-24 09:41:23 +01:00
repr.py words 2021-06-18 20:44:23 +01:00
save_table_svg.py progress docs 2022-04-01 14:49:02 +01:00
screen.py fixes 2021-02-20 11:05:21 +00:00
spinners.py added reconfigure 2020-12-13 12:23:28 +00:00
status.py formatting 2020-12-10 17:25:13 +00:00
suppress.py add suppress option to tracebacks 2021-09-23 22:00:19 +01:00
table.py fix more spelling 2020-09-16 07:20:22 +00:00
table_movie.py Remove unused import 2021-10-03 01:07:01 -04:00
top_lite_simulator.py Remove all sys.version_info >= (3, 8) checks as Python 3.7 is no longer supported 2025-06-15 11:02:57 -04:00
tqdm_adapter_basic.py Add tqdm compatibility shim with Rich progress backend 2025-12-05 07:41:51 -05:00
tqdm_adapter_hidden.py Add tqdm compatibility shim with Rich progress backend 2025-12-05 07:41:51 -05:00
tqdm_hidden_lib.py Add tqdm compatibility shim with Rich progress backend 2025-12-05 07:41:51 -05:00
tree.py new layout class 2021-02-12 21:59:35 +00:00

Examples

This directory contains various demonstrations various Rich features. To run them, make sure Rich is installed, then run the example you want with python example.py on the command line. For example, python justify.py.

Be sure to check the source!