Python loading spinners with Rich: Using Console.status

Python loading spinners with Rich: Using Console.status

Is your Python program going to take a while? Use Rich to display animation while waiting:

c = Console()
with c.status('Going through numbers') as status:
    # iterate

The status marker goes to the left of your text. See “python -m rich.spinner” for all possibilities.