In order to show a progress bar, Rich needs to know how may steps are involved and when you finish a step. The track function can get this information automatically from a sequence. You're using this in your example, but your sequence only has a single element so you go from 0 to 100% in a single step.

If you want to track progress of something you need a sequence that defines the work to be done. For instance if you had a list of urls to scrape, you might do something like this:

from rich.progress import track
SCRAPE_URLS = ["https://example.org", "https://google.org", ...]
for url in track(SCRAPE_URLS):
    scrape(url)

The progress bar will advance for every URL.

Answer from Will McGugan on Stack Overflow
🌐
Rich
rich.readthedocs.io › en › latest › progress.html
Progress Display — Rich 14.1.0 documentation
Rich provides an easy way to generate a progress bar while reading a file. If you call open() it will return a context manager which displays a progress bar while you read.
🌐
GitHub
github.com › Textualize › rich › discussions › 1500
showing multiple *different* progress bars · Textualize/rich · Discussion #1500
For the subtask progress bars, I want to remove them when that specific subtask (like downloading a file) is done. Am I pushing things too far here, trying to make it too dynamic? ... Let me answer my own question: I got things to work pretty much as I wanted by using a Live instance with a RenderGroup instance that combines a bunch of Progress instances, each of which showing the progress on a different aspect. Full example is below... import os import time from rich.console import RenderGroup from rich.live import Live from rich.progress import BarColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn from rich.progress import DownloadColumn, TransferSpeedColumn, TimeRemainingColumn from rich.rule import Rule app1_urls = [ ('https://example.org/app1-part1.tar.gz', 3401321), ('https://example.org/app1-part2.tar.gz', 6382217), ] app2_urls = [ ('h…
Discussions

Can't get progress bar to work in python rich - Stack Overflow
i'm trying to add a progress bar with rich to my code. However, while the code is running, the bar only updates to 100% after it's finished. Can I have any help? My code: theme = Theme({'success': ... More on stackoverflow.com
🌐 stackoverflow.com
Displaying an "indeterminate" progress bar in the terminal with Rich.
1.5M subscribers in the Python community. The largest Python community for Reddit! Stay up to date with the latest news, packages, and meta… More on reddit.com
🌐 r/Python
2
4
May 25, 2020
multithreading - How to create individual rich progress bars for each worker in Python multiprocessing's imap_unordered()? - Stack Overflow
How do I add an individual rich progress bar for each of the 4 workers? Ideally, I would like a 5th main progress bar that tracks the total completion, but if it's too much work, then it's not necessary. ... You are not using multiprocessing but rather multithreading. ... @Booboo so you're saying Python ... More on stackoverflow.com
🌐 stackoverflow.com
Progress bar fixed to bottom of window
Hello, is there a possibility to create a progress bar fixed to the bottom of the terminal window, like in this image? I want the text to appear above the progress bar. Thank you in advance! More on github.com
🌐 github.com
1
2
October 12, 2021
🌐
Timothygebhard
timothygebhard.de › posts › richer-progress-bars-for-rich
Richer progress bars for _rich_ · Timothy Gebhard
Today, I finally got around to looking into this in more detail, and it turns out that is actually very easy to tweak rich to produce a progess bar that displays all the information I need and still looks better than tqdm!1 Here is the code that I am currently using (based on version 12.0.0 of rich, which was released just this week): from rich.progress import ( BarColumn, MofNCompleteColumn, Progress, TextColumn, TimeElapsedColumn, TimeRemainingColumn, ) # Define custom progress bar progress_bar = Progress( TextColumn("[progress.percentage]{task.percentage:>3.0f}%"), BarColumn(), MofNCompleteColumn(), TextColumn("•"), TimeElapsedColumn(), TextColumn("•"), TimeRemainingColumn(), ) # Use custom progress bar with progress_bar as p: for i in p.track(range(1000)): # Do something here pass
🌐
Typer
typer.tiangolo.com › tutorial › progressbar
Progress Bar - Typer
You can use Rich's Progress Display to show a progress bar, for example:
🌐
Rich
rich.readthedocs.io › en › stable › reference › progress.html
rich.progress — Rich 14.1.0 documentation
Gets a progress bar widget for a task. ... Renders file size downloaded and total, e.g. ‘0.5/2.3 GB’. ... Calculate common unit for completed and total. ... Renders completed filesize. ... Show data completed. ... Renders completed count/total, e.g. ‘ 10/1000’. Best for bounded tasks with int quantities. Space pads the completed count so that progress length does not change as task progresses past powers of 10. ... Show completed/total. ... class rich.progress.Progress(*columns, console=None, auto_refresh=True, refresh_per_second=10, speed_estimate_period=30.0, transient=False, redirect_stdout=True, redirect_stderr=True, get_time=None, disable=False, expand=False)[source]
🌐
Reddit
reddit.com › r/python › displaying an "indeterminate" progress bar in the terminal with rich.
r/Python on Reddit: Displaying an "indeterminate" progress bar in the terminal with Rich.
May 25, 2020 - Rich 1.1.2 adds log output over progress bars · r/Python • · upvotes · · comments · Русский · 繁體中文 · See more See fewer · العربية · Slovenčina · Dansk · 0 0 · Reddit · reReddit: Top posts of May 25, 2020 · Reddit · reReddit: Top posts of May 2020 ·
Find elsewhere
🌐
PyPI
pypi.org › project › rich
rich · PyPI
Rich can render multiple flicker-free progress bars to track long-running tasks.
Top answer
1 of 2
2

I heavily borrowed from @Gothboidesu previous answer and mostly changed it so that the workers have pulsing bars (each worker's total number can't be determined beforehand) and only the main bar having a progress %.

import random
import time
import threading
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TimeRemainingColumn
from rich.live import Live
from rich.console import Console
from multiprocessing.dummy import Pool

def do_something(number):
    thread_name = threading.current_thread().name
    with task_lock:
        if thread_name not in thread_task_map:
            # Create a new bar for this thread
            thread_task_map[thread_name] = progress.add_task(f"[green]{thread_name}", total=None, visible=True)

    task = thread_task_map[thread_name]

    time.sleep(number/100)

    progress.update(task, advance=1)
    progress.update(overall_task, advance=1)


numbers = random.sample(range(1, 101), 50)
pool = Pool(4)

console = Console()
progress = Progress(
    SpinnerColumn(),
    TextColumn("{task.description}"),
    BarColumn(),
    TextColumn("{task.completed} numbers crunched."),
    TimeRemainingColumn()
)

# Dictionary to hold a task per thread
thread_task_map = {}
task_lock = threading.Lock()

# Overall progress bar
overall_task = progress.add_task("[cyan]Overall", total=len(numbers))
with Live(progress, refresh_per_second=30, console=console):
    pool.imap_unordered(do_something, numbers)
    pool.close()
    pool.join()
2 of 2
1

A multithreading pool uses a single input task queue and when a thread becomes idle it takes from that queue the next task to execute. But you have no real control over which thread will process which task and how many total tasks each task will process. So how would you know how many total tasks each thread would eventually handle?

This solution creates individual threads and splits up the input tasks into N_THREADS chunks and passes one of the chunks to each of the threads. Optionally, a threading.Queue instance can be passed to the threads if a result value needs to be returned:

import time
import random
from threading import Thread
from queue import Queue, Empty
from typing import Callable, Optional, Any, Generator

from rich.progress import Progress
from rich.live import Live

N_THREADS = 4

class WorkerThread:
    """This class encapsulates a Thread and initializes a progress bar."""

    def __init__(self, args: list[any], worker: Callable[[any], any], out_q: Optional[Queue]=None):
        # Each element of args is a new task to be executed by this thread and it can
        # be of any type. If the worker function requires multiple input values, then
        # each element could be, for example, a tuple that gets unpacked by the worker function
        # or perhaps a dictionary of named arguments.
        self._args = args
        self._out_q = out_q
        self._worker = worker

        self._thread = Thread(target=self.run)
        self._task = progress.add_task(self._thread.name, total=len(self._args))

    def start(self):
        self._thread.start()

    def join(self) -> None:
        self._thread.join()

    def run(self) -> None:
        for arg in self._args:
            result = self._worker(arg)
            if self._out_q:
                # return result:
                self._out_q.put(result)
            progress.update(self._task, advance=1)
            progress.update(master_task, advance=1)


def do_something(number):
    # slow down the progress a bit to better see what is happening:
    time.sleep(number/25)
    return number

def chunks(lst: list[Any], number_chunks: int) -> Generator[Any, None, None]:
    list_size = len(lst)
    chunk_size = list_size // number_chunks
    offset = 0
    for i in range(number_chunks - 1):
        yield lst[offset:offset+chunk_size]
        offset += chunk_size
    yield lst[offset:]

def main():
    global progress, master_task

    N_NUMBERS = 50
    numbers = random.sample(range(1, 101), N_NUMBERS)
    out_q = Queue()

    progress = Progress()
    with Live(progress):
        master_task = progress.add_task('All tasks', total=N_NUMBERS)
        args_list = list(chunks(numbers, N_THREADS))
        worker_threads = [WorkerThread(args, do_something, out_q) for args in args_list]
        for worker_thread in worker_threads:
            worker_thread.start()
        for worker_thread in worker_threads:
            worker_thread.join()

    try:
        results = []
        while True:
            results.append(out_q.get_nowait())
    except Empty:
         pass
    #print(results)

if __name__ == '__main__':
    main()
🌐
YouTube
youtube.com › shorts › oyyL6ZPOsdI
Rich Colorful Progress Bars In Python - YouTube
We are supporting everyone freely. Join us for live support. WhatsApp Support: https://whatsapp.com/channel/0029Va5BbiT9xVJXygonSX0GInstagram Support: https...
Published: October 18, 2025
🌐
Daniel Michaels
danielms.site › zet › 2022 › python-rich-progress-bar-and-httpx
Daniel Michaels | Python rich progress bar and httpx
December 15, 2022 - path = "/tmp/file" url = httpx.URL("https://releases.ubuntu.com/20.04/ubuntu-20.04.3-desktop-amd64.iso") with httpx.stream("GET", url=url, verify=False, follow_redirects=True) as r: with Progress() as progress: size = int(r.headers["Content-Length"] with open(path, "wb") as dest: dl = progress.add_task("[red]Downloading Ubuntu[/red]", total=size) for data in r.iter_raw(): dest.write(data) progress.update(dl, advance=len(data), description="[yellow]Downloading...[/yellow]") progress.update(dl, description="[green]Download Complete[/green]")
🌐
Lightning AI
lightning.ai › docs › pytorch › LTS › _modules › pytorch_lightning › callbacks › progress › rich_progress.html
pytorch_lightning.callbacks.progress.rich_progress — PyTorch Lightning 1.9.6 documentation
[docs]class RichProgressBar(ProgressBarBase): """Create a progress bar with `rich text formatting <https://github.com/Textualize/rich>`_. Install it with pip: .. code-block:: bash pip install rich .. code-block:: python from pytorch_lightning import Trainer from pytorch_lightning.callbacks import RichProgressBar trainer = Trainer(callbacks=RichProgressBar()) Args: refresh_rate: Determines at which rate (in number of batches) the progress bars get updated.
🌐
Zenn
zenn.dev › nano_sudo › articles › 8a0e60cc24648a
美麗なコンソールアプリを手軽に作成! richライブラリを使ってみた
August 4, 2023 - (Richは、ターミナルに色やスタイルを付けたり、テーブルやマークダウン、シンタックスハイライトされたコードなどの高度なコンテンツを表示したりするためのPythonライブラリです。)
🌐
GitHub
github.com › textualize › rich › blob › main › README.ja.md
rich/README.ja.md at main · Textualize/rich
Rich is a Python library for rich text and beautiful formatting in the terminal. - Textualize/rich
Author: Textualize
🌐
Rich
rich.readthedocs.io › en › stable › _modules › rich › progress_bar.html
rich.progress_bar — Rich 14.1.0 documentation
[docs] class ProgressBar(JupyterMixin): """Renders a (progress) bar. Used by rich.progress. Args: total (float, optional): Number of steps in the bar. Defaults to 100. Set to None to render a pulsing animation. completed (float, optional): Number of steps completed.
🌐
Easybuild
docs.easybuild.io › progress-bars
Progress bars - EasyBuild - building software with ease
EasyBuild will show progress bars for various aspects of the installation progress by default, if the Rich Python package is available.
🌐
GitHub
github.com › willmcgugan › rich › blob › master › rich › progress.py
rich/rich/progress.py at master · Textualize/rich
# Can be replaced with `from typing import Self` in Python 3.11+ from typing_extensions import Self # pragma: no cover · · from . import filesize, get_console · from .console import Console, Group, JustifyMethod, RenderableType · from .highlighter import Highlighter · from .jupyter import JupyterMixin · from .live import Live · from .progress_bar import ProgressBar ·
Author: Textualize
🌐
Easybuild
docs.easybuild.io › en › latest › Progress_bars.html
Redirecting...
December 7, 2022 - You're being redirected to a new destination