Progress Bar
Displays a progress bar to the user.
Examples
Default behavior
This is what happens when there is no parameter passed
from abstra.forms import display_progress
display_progress()
Custom fields
You can customize the current and total number of steps. Also the message of each step
from time import sleep
from abstra.forms import display_progress
for i in range(10):
display_progress(i, 10, text="Computing values")
sleep(1) # Do some computation
Parameters
Name | Description | Type |
---|---|---|
current | The progress being made. Defaults to 50. | float |
total | Total progress. Defaults to 100. | float |
text | The text displayed with this progress step. Defaults to "". | str |
end_program | Whether the program should end after the widget is shown. Defaults to False. | bool |
full_width | Whether the input should use full screen width. Defaults to False. | bool |
button_text | What text to display on the button when the widget is not part of a Page. Defaults to 'Next'. | str |