ProgressHandler

class lsst.daf.butler.progress.ProgressHandler

Bases: ABC

An interface for objects that can create progress bars.

Methods Summary

get_progress_bar(iterable, desc, total, level)

Create a new progress bar.

Methods Documentation

abstract get_progress_bar(iterable: Iterable[_T] | None, desc: str, total: int | None, level: int) AbstractContextManager[ProgressBar[_T]]

Create a new progress bar.

Parameters:
iterableIterable or None

An arbitrary Python iterable that will be iterated over when the returned ProgressBar is. If None, whether the progress bar is iterable is handler-defined, but it may be updated manually.

descstr

A user-friendly description for this progress bar; usually appears next to it.

totalint or None

The total number of steps in this progress bar. If None`, len(iterable) should be used. If that does not work, whether the progress bar works at all is handler-defined.

levelint

A logging level value (defaults to logging.INFO) associated with the process reporting progress. Handlers are not responsible for disabling progress reporting on levels, but may utilize level information to annotate them differently.