Skip to content

Instantly share code, notes, and snippets.

@MartinThoma
Created February 6, 2022 15:09
Show Gist options
  • Save MartinThoma/efb328acecad63ef3fb08c4eb59072ff to your computer and use it in GitHub Desktop.
Save MartinThoma/efb328acecad63ef3fb08c4eb59072ff to your computer and use it in GitHub Desktop.
import time
from rich.progress import Progress
with Progress() as progress:
task1 = progress.add_task("[red]Downloading...", total=1000)
task2 = progress.add_task("[green]Processing...", total=1000)
task3 = progress.add_task("[cyan]Cooking...", total=1000)
while not progress.finished:
progress.update(task1, advance=0.5)
progress.update(task2, advance=0.3)
progress.update(task3, advance=0.9)
time.sleep(0.02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment