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,
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.
active property¶
Whether the bar is active.
after_update method¶
Do something after an update.
bar property¶
Bar.
bar_id property¶
Bar id.
bar_type property¶
Bar type.
before_update method¶
Do something before an update.
close method¶
Close the bar.
close_time property¶
Time the bar was closed.
desc_kwargs property¶
Keyword arguments passed to ProgressBar.set_description().
disabled property¶
Whether the bar is disabled.
displayed property¶
Whether the bar is displayed.
enter method¶
Enter the bar.
exit method¶
Exit the bar.
force_open_bar property¶
Whether to force-open a bar even if progress is not shown.
iter method¶
Get iterator over ProgressBar.iterable.
iterable property¶
Iterable.
kwargs property¶
Keyword arguments passed to initialize the bar.
open method¶
Open the bar.
open_time property¶
Time the bar was opened.
pending property¶
Whether the bar is pending.
prepare_desc method¶
Prepare description.
refresh method¶
Refresh the bar.
refresh_time property¶
Time the bar was refreshed.
registry property¶
Registry of type PBarRegistry.
If None, registry is disabled.
remove_bar method¶
Remove the bar.
reset method¶
Reset the bar.
reuse 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 property¶
Whether the bar should be displayed.
show_progress property¶
Whether to show the bar.
show_progress_desc property¶
Whether show the bar description.
silence_warnings property¶
Whether to silence warnings.
update method¶
Update with one or more iterations.
update_time property¶
Time the bar was updated.
update_to method¶
Update to a specific number.
ProgressHidden class¶
Context manager to hide progress.
disable_machinery property¶
Whether to disable machinery.
disable_registry property¶
Whether to disable registry.
init_settings property¶
Initial settings.
ProgressShown class¶
Context manager to show progress.
enable_machinery property¶
Whether to enable machinery.
enable_registry property¶
Whether to enable registry.
init_settings property¶
Initial settings.