rich.status

class rich.status.Status(status, *, console=None, spinner='dots', spinner_style='status.spinner', speed=1.0, refresh_per_second=12.5)[source]

Displays a status indicator with a ‘spinner’ animation.

Parameters
  • status (RenderableType) – A status renderable (str or Text typically).

  • console (Console, optional) – Console instance to use, or None for global console. Defaults to None.

  • spinner (str, optional) – Name of spinner animation (see python -m rich.spinner). Defaults to “dots”.

  • spinner_style (StyleType, optional) – Style of spinner. Defaults to “status.spinner”.

  • speed (float, optional) – Speed factor for spinner animation. Defaults to 1.0.

  • refresh_per_second (float, optional) – Number of refreshes per second. Defaults to 12.5.

property console: rich.console.Console

Get the Console used by the Status objects.

start()[source]

Start the status animation.

Return type

None

stop()[source]

Stop the spinner animation.

Return type

None

update(status=None, *, spinner=None, spinner_style=None, speed=None)[source]

Update status.

Parameters
  • status (Optional[RenderableType], optional) – New status renderable or None for no change. Defaults to None.

  • spinner (Optional[str], optional) – New spinner or None for no change. Defaults to None.

  • spinner_style (Optional[StyleType], optional) – New spinner style or None for no change. Defaults to None.

  • speed (Optional[float], optional) – Speed factor for spinner animation or None for no change. Defaults to None.

Return type

None