rich.status

class rich.status.Status(status: Union[rich.console.ConsoleRenderable, rich.console.RichCast, str], *, console: rich.console.Console = None, spinner: str = 'dots', spinner_style: Union[str, Style] = 'status.spinner', speed: float = 1.0, refresh_per_second: float = 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

Get the Console used by the Status objects.

property renderable

Get the renderable for the status (a table with spinner and status).

start()None[source]

Start the status animation.

stop()None[source]

Stop the spinner animation.

update(status: Optional[Union[rich.console.ConsoleRenderable, rich.console.RichCast, str]] = None, *, spinner: Optional[str] = None, spinner_style: Optional[Union[str, Style]] = None, speed: Optional[float] = 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.