class documentation

class ProgressBar(t.Generic[V]):

View In Hierarchy

Undocumented

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method finish Undocumented
Method format​_bar Undocumented
Method format​_eta Undocumented
Method format​_pct Undocumented
Method format​_pos Undocumented
Method format​_progress​_line Undocumented
Method generator Return a generator which yields the items added to the bar during construction, and updates the progress bar after the yielded block returns.
Method make​_step Undocumented
Method render​_finish Undocumented
Method render​_progress Undocumented
Method update Update the progress bar by advancing a specified number of steps, and optionally set the current_item for this new position.
Instance Variable ​_completed​_intervals Undocumented
Instance Variable ​_last​_line Undocumented
Instance Variable autowidth Undocumented
Instance Variable avg Undocumented
Instance Variable bar​_template Undocumented
Instance Variable color Undocumented
Instance Variable current​_item Undocumented
Instance Variable empty​_char Undocumented
Instance Variable entered Undocumented
Instance Variable eta​_known Undocumented
Instance Variable file Undocumented
Instance Variable fill​_char Undocumented
Instance Variable finished Undocumented
Instance Variable info​_sep Undocumented
Instance Variable is​_hidden Undocumented
Instance Variable item​_show​_func Undocumented
Instance Variable iter Undocumented
Instance Variable label Undocumented
Instance Variable last​_eta Undocumented
Instance Variable length Undocumented
Instance Variable max​_width Undocumented
Instance Variable pos Undocumented
Instance Variable show​_eta Undocumented
Instance Variable show​_percent Undocumented
Instance Variable show​_pos Undocumented
Instance Variable start Undocumented
Instance Variable update​_min​_steps Undocumented
Instance Variable width Undocumented
Property eta Undocumented
Property pct Undocumented
Property time​_per​_iteration Undocumented
def __enter__(self):

Undocumented

Returns
ProgressBarUndocumented
def __exit__(self, exc_type, exc_value, tb):

Undocumented

def __init__(self, iterable, length=None, fill_char='#', empty_char=' ', bar_template='%(bar)s', info_sep=' ', show_eta=True, show_percent=None, show_pos=False, item_show_func=None, label=None, file=None, color=None, update_min_steps=1, width=30):

Undocumented

Parameters
iterable:t.Optional[t.Iterable[V]]Undocumented
length:t.Optional[int]Undocumented
fill​_char:strUndocumented
empty​_char:strUndocumented
bar​_template:strUndocumented
info​_sep:strUndocumented
show​_eta:boolUndocumented
show​_percent:t.Optional[bool]Undocumented
show​_pos:boolUndocumented
item​_show​_func:t.Optional[t.Callable[[t.Optional[V]], t.Optional[str]]]Undocumented
label:t.Optional[str]Undocumented
file:t.Optional[t.TextIO]Undocumented
color:t.Optional[bool]Undocumented
update​_min​_steps:intUndocumented
width:intUndocumented
def __iter__(self):

Undocumented

Returns
t.Iterator[V]Undocumented
def __next__(self):

Undocumented

Returns
VUndocumented
def finish(self):

Undocumented

def format_bar(self):

Undocumented

Returns
strUndocumented
def format_eta(self):

Undocumented

Returns
strUndocumented
def format_pct(self):

Undocumented

Returns
strUndocumented
def format_pos(self):

Undocumented

Returns
strUndocumented
def format_progress_line(self):

Undocumented

Returns
strUndocumented
def generator(self):
Return a generator which yields the items added to the bar during construction, and updates the progress bar after the yielded block returns.
Returns
t.Iterator[V]Undocumented
def make_step(self, n_steps):

Undocumented

Parameters
n​_steps:intUndocumented
def render_finish(self):

Undocumented

def render_progress(self):

Undocumented

def update(self, n_steps, current_item=None):

Update the progress bar by advancing a specified number of steps, and optionally set the current_item for this new position.

Changed in version 8.0: Added the current_item optional parameter.
Changed in version 8.0: Only render when the number of steps meets the update_min_steps threshold.
Parameters
n​_steps:intNumber of steps to advance.
current​_item:t.Optional[V]Optional item to set as current_item for the updated position.
_completed_intervals: int =

Undocumented

_last_line =

Undocumented

autowidth =

Undocumented

avg =

Undocumented

bar_template =

Undocumented

color =

Undocumented

current_item =

Undocumented

empty_char =

Undocumented

entered: bool =

Undocumented

eta_known: bool =

Undocumented

file =

Undocumented

fill_char =

Undocumented

finished: bool =

Undocumented

info_sep =

Undocumented

is_hidden =

Undocumented

item_show_func =

Undocumented

iter =

Undocumented

label =

Undocumented

last_eta =

Undocumented

length =

Undocumented

max_width =

Undocumented

pos: int =

Undocumented

show_eta =

Undocumented

show_percent =

Undocumented

show_pos =

Undocumented

start =

Undocumented

update_min_steps =

Undocumented

width =

Undocumented

@property
eta: float =

Undocumented

@property
pct: float =

Undocumented

@property
time_per_iteration: float =

Undocumented