Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/source/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ The following column objects are available:
- :class:`~rich.progress.TransferSpeedColumn` Displays transfer speed (assumes the steps are bytes).
- :class:`~rich.progress.SpinnerColumn` Displays a "spinner" animation.
- :class:`~rich.progress.RenderableColumn` Displays an arbitrary Rich renderable in the column.
- :class:`~rich.progress.TaskProgressColumn` Displays task completion progress as a percentage.

To implement your own columns, extend the :class:`~rich.progress.ProgressColumn` class and use it as you would the other columns.

Expand Down Expand Up @@ -296,3 +297,20 @@ Example
-------

See `downloader.py <https://github.com/willmcgugan/rich/blob/master/examples/downloader.py>`_ for a realistic application of a progress display. This script can download multiple concurrent files with a progress bar, transfer speed and file size.

TaskProgressColumn
~~~~~~~~~~~~~~~~~~

The ``TaskProgressColumn`` displays the percentage of task completion.

It is typically used to show how much of a task has been completed relative to
its total value. This column is included in the default progress columns and is
useful when tracking long-running tasks.

Example::

from rich.progress import Progress, TaskProgressColumn

progress = Progress(
TaskProgressColumn(),
)