libdnf5_cli.progressbar
- class libdnf5_cli.progressbar.DownloadProgressBar(*args)
- get_messages()
- get_number_widget_visible()
- set_number_widget_visible(value)
- set_state(value)
- set_ticks(value)
- set_total_ticks(value)
- thisown
- libdnf5_cli.progressbar.MessageType_ERROR
- libdnf5_cli.progressbar.MessageType_INFO
- libdnf5_cli.progressbar.MessageType_SUCCESS
- libdnf5_cli.progressbar.MessageType_WARNING
- class libdnf5_cli.progressbar.MultiProgressBar(*args)
- NEVER_VISIBLE_LIMIT
- TrackingMode_ON_CHANGE
State changes are tracked incrementally via bar_*() wrapper methods. Much faster when many bars are registered but only a few are active.
- TrackingMode_ON_RENDER
All bars are scanned on every render to detect state changes.
- add_bar(bar)
- bar_add_message(bar, type, message)
Adds a message to the bar.
- bar_add_ticks(bar, value)
Adds to the number of processed ticks.
- bar_get_auto_finish(bar)
Returns whether auto-finish is enabled.
- bar_get_average_speed(bar)
Returns the average speed in ticks per second.
- bar_get_current_speed(bar)
Returns the current (recent) speed in ticks per second.
- bar_get_description(bar)
Returns the description string.
- bar_get_elapsed_seconds(bar)
Returns elapsed time in seconds.
- bar_get_message_prefix(bar)
Returns the message prefix string.
- bar_get_messages(bar)
Returns all messages.
- bar_get_number(bar)
Returns the display number of the bar.
- bar_get_percent_done(bar)
Returns the percentage of ticks done (0–100).
- bar_get_remaining_seconds(bar)
Returns estimated remaining time in seconds.
- bar_get_state(bar)
Returns the current state.
- bar_get_ticks(bar)
Preferred way to modify a bar registered in this MultiProgressBar. Use these instead of calling ProgressBar methods directly, so that MultiProgressBar can track state changes and use them for rendering optimizations. Calls on a finished bar are ignored for mutating methods.
Returns the number of processed ticks.
- bar_get_total_ticks(bar)
Returns the total number of ticks.
- bar_is_failed(bar)
Returns true if the bar is in the ERROR state.
- bar_is_finished(bar)
Returns true if the bar has reached a terminal state (SUCCESS or ERROR).
- bar_pop_message(bar)
Removes the last message.
- bar_set_auto_finish(bar, value)
Enables or disables auto-finish. Disable to manage the terminal state manually.
- bar_set_description(bar, value)
Sets the description string.
- bar_set_state(bar, value)
Sets the state. Setting back to READY is not allowed.
- bar_set_ticks(bar, value)
Sets the number of processed ticks.
- bar_set_total_ticks(bar, value)
Sets the total number of ticks.
- bar_start(bar)
Starts the bar (transitions from READY to STARTED).
- get_total_bar()
Returns the total bar.
- get_total_num_of_bars()
Returns the total number of progress bars. It can be greater than the current number of registered progress bars.
- get_tracking_mode()
Returns the tracking mode set at construction.
- set_total_bar_number_widget_visible(value)
Sets the visibility of number widget in the total bar.
- set_total_bar_visible_limit(value)
Sets the minimum number of registered progress bars to show the total bar.
- set_total_num_of_bars(value)
Allows one to preset the value of the total number of progress bars. If the value is lower than the current number of registered progress bars, it is automatically increased.
- thisown
- class libdnf5_cli.progressbar.ProgressBar(*args, **kwargs)
- add_message(type, message)
- add_ticks(value)
- calculate_messages_terminal_lines(terminal_width)
Calculate number of lines occupied by messages when printed on terminal of the given width. Takes new lines and wide utf characters into account.
- get_auto_finish()
- get_average_speed()
- get_begin()
- get_current_speed()
- get_description()
- get_description_width()
- get_elapsed_seconds()
- get_message_prefix()
- get_messages()
- get_number()
- get_percent_done()
- get_remaining_seconds()
- get_state()
- get_ticks()
- get_total()
- get_total_ticks()
- is_failed()
- is_finished()
- pop_message()
remove the last message
- reset()
- set_auto_finish(value)
- set_description(value)
- set_number(value)
- set_state(value)
- set_ticks(value)
- set_total(value)
- set_total_ticks(value)
- start()
- thisown
- update()
- libdnf5_cli.progressbar.ProgressBarState_ERROR
- libdnf5_cli.progressbar.ProgressBarState_READY
- libdnf5_cli.progressbar.ProgressBarState_STARTED
- libdnf5_cli.progressbar.ProgressBarState_SUCCESS
- libdnf5_cli.progressbar.ProgressBarState_WARNING