tlc.core.utils.progress#

Utilities for tracking progress of long-running tasks.

Module Contents#

Functions#

Function

Description

track

Create a progress bar for a sequence of items.

Data#

Data

Description

rich_track_in_progress

API#

tlc.core.utils.progress.rich_track_in_progress = False#
tlc.core.utils.progress.track(sequence: Sequence[rich.progress.ProgressType] | Iterable[rich.progress.ProgressType], description: str = '', show_speed: bool = True, total: float | None = None, refresh_per_second: float | None = None, update_period: float = 0.2) Iterable[rich.progress.ProgressType]#

Create a progress bar for a sequence of items.

Parameters:
  • sequence – The sequence of items to iterate over.

  • description – The description to display.

  • show_speed – Show the speed of the progress bar.

  • total – The total number of items in the sequence.

  • refresh_per_second – The number of times per second to refresh the progress bar.

  • update_period – The minimum time between updates.

Returns:

An iterable that yields the items in the sequence whilst displaying a progress bar.