pbar module¶
Utilities for progress bars.
with_progress_hidden function¶
Decorator to run a function with ProgressHidden.
with_progress_shown function¶
Decorator to run a function with ProgressShown.
ProgressBar class¶
ProgressBar(
iterable=None,
bar_id=None,
bar_type=None,
force_open_bar=None,
reuse=None,
disable=None,
show_progress=None,
show_progress_desc=None,
prefix=None,
postfix=None,
desc_kwargs=None,
registry=<vectorbtpro.registries.pbar_registry.PBarRegistry object>,
silence_warnings=None,
**kwargs
)
Context manager to manage a progress bar.
Supported types:
- 'tqdm_auto'
- 'tqdm_notebook'
- 'tqdm_gui'
- 'tqdm'
For defaults, see pbar.
Superclasses
Inherited members
active class property¶
Whether the bar is active.
after_update method¶
Do something after an update.
bar class property¶
Bar.
bar_id class property¶
Bar id.
bar_type class property¶
Bar type.
before_update method¶
Do something before an update.
close method¶
Close the bar.
close_time class property¶
Time the bar was closed.
desc_kwargs class property¶
Keyword arguments passed to ProgressBar.set_description.
disabled class property¶
Whether the bar is disabled.
displayed class property¶
Whether the bar is displayed.
enter method¶
Enter the bar.
exit method¶
Exit the bar.
force_open_bar class property¶
Whether to force-open a bar even if progress is not shown.
format_num class method¶
Format a number.
iter method¶
Get iterator over ProgressBar.iterable.
iterable class property¶
Iterable.
kwargs class property¶
Keyword arguments passed to initialize the bar.
open method¶
Open the bar.
open_time class property¶
Time the bar was opened.
pending class property¶
Whether the bar is pending.
prepare_desc class method¶
Prepare description.
refresh method¶
Refresh the bar.
refresh_time class property¶
Time the bar was refreshed.
registry class property¶
Registry of type PBarRegistry.
If None, registry is disabled.
remove_bar method¶
Remove the bar.
reset method¶
Reset the bar.
reuse class property¶
Whether the bar can be reused.
set_bar method¶
Set the bar.
set_description method¶
Set description.
Uses the method ProgressBar.set_prefix if as_postfix=True in ProgressBar.desc_kwargs. Otherwise, uses the method ProgressBar.set_postfix.
Uses ProgressBar.desc_kwargs as keyword arguments.
set_description_str method¶
Set description without preparation.
Uses the method ProgressBar.set_prefix_str if as_postfix=True in ProgressBar.desc_kwargs. Otherwise, uses the method ProgressBar.set_postfix_str.
Uses ProgressBar.desc_kwargs as keyword arguments.
set_postfix method¶
Set postfix.
Prepares it with ProgressBar.prepare_desc.
set_postfix_str method¶
Set postfix without preparation.
set_prefix method¶
Set prefix.
Prepares it with ProgressBar.prepare_desc.
set_prefix_str method¶
Set prefix without preparation.
should_display class property¶
Whether the bar should be displayed.
show_progress class property¶
Whether to show the bar.
show_progress_desc class property¶
Whether show the bar description.
silence_warnings class property¶
Whether to silence warnings.
update method¶
Update with one or more iterations.
update_time class property¶
Time the bar was updated.
update_to method¶
Update to a specific number.
ProgressHidden class¶
Context manager to hide progress.
Superclasses
Inherited members
disable_machinery class property¶
Whether to disable machinery.
disable_registry class property¶
Whether to disable registry.
init_settings class property¶
Initial settings.
ProgressShown class¶
Context manager to show progress.
Superclasses
Inherited members
enable_machinery class property¶
Whether to enable machinery.
enable_registry class property¶
Whether to enable registry.
init_settings class property¶
Initial settings.