-
-
Notifications
You must be signed in to change notification settings - Fork 0
2. Parameters (en)
Patsuckow Aleksey edited this page Dec 27, 2019
·
1 revision
Parameters that can be changed, as desired, and passed to the constructor of the SimpleProgressBar class.
Parameters
----------
start : int, >= 0, optional
Number is the beginning of iterations. A progress bar is displayed in
the console as an initial percentage. It may not start from zero.
[default: 0]
stop : int, >= start, optional
The final number of iterations. This can be either an integer number o
f iterations, or an integer number of bits of information when
uploading or downloading a file.
[default: 100]
progress_bar : str, optional
Choose show or hide the progress bar: ['show', 'hide']
If you decide to "hide", the options will be disabled as unnecessary:
variant_bar, variant_brackets, variant_arrow, variant_space, len_bar.
[default: 'show']
variant_bar : str, optional
Select one of the options for displaying the progress bar:
['increasing', 'static', 'decreasing']
'increasing' - increasing progress bar, will increase from 0% to 100%.
'static' - static progress bar. The place for movement of the progress
bar will be immediately displayed. The progress bar will
increase from 0% to 100%.
'decreasing' - A decreasing progress bar, during operation, will
decrease from 100% to 0%.
As a decrease can begin not from 100%, but for example from 75%, etc.,
so an increase can start not from 0%, but for example from 30%, etc.
Displayed when progress_bar='show'
[default: 'static']
variant_brackets : str, len(str) == 0 or len(str) == 2, optional
Specify the parenthesis characters that you want to see before and
after the progress bar.
For example: '||', '{}', '[]', '//', '**' etc. Unicode-symbols.
If you do not need parentheses, put: ''
Displayed when progress_bar='show' and variant_bar='static'
[default: '||']
variant_arrow : str, not empty, not space, optional
Indicator arrow variant. For example: '⏹', '∎', '▣', '◉', '●', '#',
'X', '=', '/' '\', '.' etc. Unicode-symbols.
Displayed when progress_bar='show'
[default: '▇']
variant_space : str, not empty, may be a white space, optional
Variant of a whitespace character on an unfilled progress bar area.
For example: ' ', '-', '·', '༝', '༚', '༛', '༞', '•', '⬞', '◯', '▢',
'⬜' etc. Unicode-symbols.
Displayed when progress_bar='show' and variant_bar='static'
[default: '-']
len_bar : int, 10 >= len_bar <= 100, optional
Progress bar length. Counted in console columns.
It only makes sense when progress_bar='show'
[default: 35]
progress_str : str, optional
Specify the desired name for the percent indicator.
Displayed when progress_bar='hide'
[default: 'Progress']
percent : str, optional
This parameter is responsible for displaying percent complete and is
displayed by default.
But, if you need to display the download of the file, and the file
size (content-length) is unknown and impossible to obtain (since many
online file services began to hide this information and even hide
direct links to files), then you’ll have to “hide” the percent of
execution - 'hide'.
[default: 'show']
timer : str, optional
Choose show or hide the timer: ['show', 'hide']
If you decide to "hide", the options will be disabled as unnecessary:
variant_timer, icon_timer, variant_icon_timer, timer_str,
reverse_timer_str.
[default: 'show']
variant_timer: str, optional
Choose which timer is needed: ['increasing', 'decreasing']
It only makes sense when timer='show'
[default: 'increasing']
icon_timer : str, optional
Select view the icon timer: ['animated', 'static', 'hide']
It only makes sense when timer='show'
[default: 'animated']
variant_icon_timer : str, optional
If icon_timer setup in 'animated', then we show an animated
watch using our set of Unicode-symbols.
For example: '⏳⏳⏳⌛⌛⌛ ', '⣾⣷⣯⣟⡿⢿⣻⣽', '⣽⣻⢿⡿⣟⣯⣷⣾',
'᎐᎐᎓᎓᎒᎒᎓᎓᎐᎐', '᎒᎒᎓᎓᎐᎐', '᎐᎐᎓᎓᎒᎒', '᎐᎓᎒᎓᎐', '᎐᎓᎒', '᎒᎓᎐', '∴∵', '∴∵∷',
'▁▂▃▄▅▆▇█▇▆▅▄▃▂▁', '▁▂▃▄▅▆▇█', '█▇▆▅▄▃▂▁', '▞▚', '▬▭', '▮▯', '⚪⚫',
'▏▎▍▌▋▊▉█▉▊▋▌▍▎▏', '▏▎▍▌▋▊▉█', '█▉▊▋▌▍▎▏', 'ↀↀↂↂↈↈ',
'⋮⋰⋱', '⋱⋰⋮', '⋱⋰', '⎽⎼⎻⎺⎻⎼⎽', '-\\|//', '//|\\-',
'ⅠⅠⅡⅡⅢⅢⅢⅡⅡⅠⅠ', 'ⅠⅠⅡⅡⅢⅢ', 'ⅠⅡⅢ', '◑◒◐◓', '○◔◑◕●', '●◕◑◔○',
'◀▼▶▲', '▲▶▼◀', '◢◣◤◥', '◥◤◣◢', '◥◣◤◢', '◢◤◣◥', '◩⬔◪⬕', '⬕◪⬔◩',
'⬜⬜⬛⬛', '⬜⬛', '◨⬓◧⬒', '⬒◧⬓◨', '◨⬓◧⬒◨⬓◧⬒◨⬒◧⬓◨⬒◧⬓◨⬓', '♦♦♢♢', '♦♢',
' ◨⬓◧⬒◨⬓◧⬒◨⬓◧⬒◨⬓◧⬒ ⬒◧⬓◨⬒◧⬓◨⬒◧⬓◨⬒◧⬓◨', '⊕⊗', '☢☢☢ ', '⌃⌄',
'⇑⇗⇒⇘⇓⇙⇐⇖', '←↖↑↗→↘↓↙', '⇠⇡⇢⇣', '↞↟↠↡', '↤↥↦↧', '★☆✪', '★☆✪✫✯',
'☆✪', '⍟✪☆', '☆✪⍟', '✧✦', '✳✴✵✷', '⚹✳✴✵✷', '✲✱', '♡♡♡♡♡♥♥♡♡♥♥'
Displayed when timer='show' and icon_timer='animated'
[default: '🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦']
timer_str : str, optional
The line displayed between the timer icon and the digital timer
counter, which is incrementing.
If you do not want to not show this line, you just need to pass an
empty line to the parameter: timer_str=''
Displayed when timer='show' and variant_timer='increasing'
[default: 'Timer']
reverse_timer_str : str, optional
The string displayed between the timer icon and the digital timer
counter, which is decreasing.
If you do not want to not show this line, you just need to pass an
empty line to the parameter: reverse_timer_str=''
Displayed when timer='show' and variant_timer='decreasing'
[default: 'eta']
speed : str, optional
Choose to show or hide the speed indicator: ['show', 'hide']
If you decide to "hide", the options will be disabled as unnecessary:
icon_speed, variant_icon_speed, speed_str
By default, the indicator is hidden, because the setting is required
only if the progress indicator calculates the file transfer speed.
[default: 'hide']
icon_speed : str, optional
Choose to show or hide the speed icon, from the list: ['show', 'hide']
Displayed when speed='show'
[default: 'show']
variant_icon_speed : str, optional
If icon_speed="show", then we will show the icon that is installed by
default, or the one that the user will set.
For example: '🚄', '🛪', '🛫', '🛧', '🛬', '🛦', '🚴', '🚵', '🏃'
Displayed when speed='show' and icon_speed='show'
[default: '🚀']
speed_str : str, optional
The line displayed between the speed icon and the digital speed
counter.
If you do not want to not show this line, you just need to pass an
empty line to the parameter: speed_str=''
Displayed when speed='show'
[default: 'Speed']
load : str, optional, 'show' or 'hide'
Choose to show or hide the load indicator: ['show', 'hide']
By default, the indicator is hidden, because configuration is required
only if the progress indicator calculates the file size when it is
transferred.
[default: 'hide']
icon_load : str, optional
Choose to show or not the load icon, from the list: ['show', 'hide']
It only makes sense when load='show'
[default: 'show']
variant_icon_load : str, optional
If icon_load="show", then we will show the icon that is installed by
default, or the one that the user will set.
For example:
down: '⭳', '↧', '↓', '🡇', '⭣', '⇓', '⮇', '⭭', '🠯', '🠇', etc.
up: '⭱', '↥', '↑', '🡅', '⭡', '⇑', '⮅', '⭫', '🠭', '🠅', etc.
up-down: '⬍', '↕', '⇕', '⇅', '⭥', '⮁', etc.
Displayed when load='show' and icon_load='show'
[default: '⭳']
load_str : str, optional
The string to be displayed between the load indicator and the
digital load counter.
If you do not want to not show this line, you just need to pass an
empty line to the parameter: load_str=''
Displayed when load='show'
[default: 'Loaded']
color : str, optional
Select one color by which the indicators will be highlighted and the
progress bar itself, from the list: ['black', 'red', 'green', 'yellow',
'blue', 'magenta', 'cyan', 'gray', 'white']
[default: 'green']
end_msg : str, optional
The message after the completion of the progress bar (if necessary).
-
Unicode-symbols values that can be used for parameters, can be taken from the Unicode table. You can copy Unicode characters, for example, from this site: https://unicode-table.com/en/
-
By default, the width of the console window is different on different systems, but on average 80 columns. If you do not expand the console window to full screen, then this will not be enough to display all the possible indicators and inscriptions in the progress bar line. But thanks to the settings, you can display those indicators, icons and exchanges of indicators that you need and hide what you do not need.