ClickProgressHandler¶
- class lsst.daf.butler.cli.progress.ClickProgressHandler(**kwargs: Any)¶
- Bases: - ProgressHandler- A - ProgressHandlerimplementation that delegates to- click.progressbar.- Parameters:
- **kwargs
- Additional keyword arguments to pass to - click.progressbar. May not include- iterable,- length, or- label, as these are passed directly from- get_progress_bararguments.
 
 - Methods Summary - callback(ctx, params, value)- clickcallback that installs this handler as the global handler for progress bars.- get_progress_bar(iterable, desc, total, level)- Create a new progress bar. - option(cmd)- clickcommand decorator that adds a- --progressoption that installs a default-constructed instance of this progress handler.- Methods Documentation - classmethod callback(ctx: Context, params: Parameter, value: Any) None¶
- clickcallback that installs this handler as the global handler for progress bars.- Should usually be called only by the - optionmethod.- Parameters:
- ctxclick.Context
- Context provided by Click. 
- paramsclick.Parameter
- Parameters provided by Click. 
- valuetyping.Any
- Value to control whether a handler class is registered. 
 
- ctx
 
 - get_progress_bar(iterable: Iterable[_T] | None, desc: str | None, total: int | None, level: int) AbstractContextManager[ProgressBar[_T]]¶
- Create a new progress bar. - Parameters:
- iterableIterableorNone
- An arbitrary Python iterable that will be iterated over when the returned - ProgressBaris. 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. 
- totalintorNone
- 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 - logginglevel 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.
 
- iterable
 
 - classmethod option(cmd: Any) Any¶
- clickcommand decorator that adds a- --progressoption that installs a default-constructed instance of this progress handler.- Parameters:
- cmdtyping.Any
- Command to be modified. 
 
- cmd