How to use the rich.progress.TextColumn function in rich

To help you get started, we’ve selected a few rich examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github efenka / mtv_dl / mtv_dl.py View on Github external
def progress_bar() -> Iterator[Progress]:
    progress_console = console
    if HIDE_PROGRESSBAR:
        progress_console = Console(file=open(os.devnull, 'w'))
    with Progress(TextColumn("[bold blue]{task.description}", justify="right"),
                  BarColumn(bar_width=None),
                  "[progress.percentage]{task.percentage:>3.1f}%",
                  TimeRemainingColumn(),
                  refresh_per_second=4,
                  console=progress_console) as progress:
        yield progress