1TQDM(1)                                                                TQDM(1)
2
3
4

NAME

6       tqdm - fast, extensible progress bar for Python and CLI
7

SYNOPSIS

9       tqdm [options]
10

DESCRIPTION

12       See <https://github.com/tqdm/tqdm>.  Can be used as a pipe:
13
14              $ # count lines of code
15              $ cat *.py | tqdm | wc -l
16              327it [00:00, 981773.38it/s]
17              327
18
19              $ # find all files
20              $ find . -name "*.py" | tqdm | wc -l
21              432it [00:00, 833842.30it/s]
22              432
23
24              # ... and more info
25              $ find . -name '*.py' -exec wc -l \{} \; \
26                | tqdm --total 432 --unit files --desc counting \
27                | awk '{ sum += $1 }; END { print sum }'
28              counting: 100%|█████████| 432/432 [00:00<00:00, 794361.83files/s]
29              131998
30

OPTIONS

32       -h, --help
33              Print this help and exit
34
35       -v, --version
36              Print version and exit
37
38       --desc=desc
39              str, optional.  Prefix for the progressbar.
40
41       --total=total
42              int,  optional.  The number of expected iterations.  If unspeci‐
43              fied, len(iterable) is used if possible.  If float("inf") or  as
44              a  last resort, only basic progress statistics are displayed (no
45              ETA, no progressbar).  If gui is True and this  parameter  needs
46              subsequent updating, specify an initial arbitrary large positive
47              integer, e.g.  int(9e9).
48
49       --leave=leave
50              bool, optional.  If [default: True], keeps  all  traces  of  the
51              progressbar  upon termination of iteration.  If None, will leave
52              only if position is 0.
53
54       --ncols=ncols
55              int, optional.  The width of  the  entire  output  message.   If
56              specified,  dynamically  resizes  the progressbar to stay within
57              this bound.  If unspecified, attempts to use environment  width.
58              The fallback is a meter width of 10 and no limit for the counter
59              and statistics.  If 0, will not print any meter (only stats).
60
61       --mininterval=mininterval
62              float, optional.  Minimum progress display update interval  [de‐
63              fault: 0.1] seconds.
64
65       --maxinterval=maxinterval
66              float,  optional.  Maximum progress display update interval [de‐
67              fault: 10] seconds.  Automatically adjusts  miniters  to  corre‐
68              spond  to mininterval after long display update lag.  Only works
69              if dynamic_miniters or monitor thread is enabled.
70
71       --miniters=miniters
72              int, optional.  Minimum progress display update interval, in it‐
73              erations.   If 0 and dynamic_miniters, will automatically adjust
74              to equal mininterval (more CPU efficient, good for tight loops).
75              If  >  0,  will  skip display of specified number of iterations.
76              Tweak this and mininterval to get very efficient loops.  If your
77              progress is erratic with both fast and slow iterations (network,
78              skipping items, etc) you should set miniters=1.
79
80       --ascii=ascii
81              bool or str, optional.  If unspecified  or  False,  use  unicode
82              (smooth blocks) to fill the meter.  The fallback is to use ASCII
83              characters " 123456789#".
84
85       --disable=disable
86              bool, optional.  Whether to disable the entire progressbar wrap‐
87              per [default: False].  If set to None, disable on non-TTY.
88
89       --unit=unit
90              str,  optional.   String that will be used to define the unit of
91              each iteration [default: it].
92
93       --unit_scale=unit_scale
94              bool or int or float, optional.  If 1 or True, the number of it‐
95              erations  will be reduced/scaled automatically and a metric pre‐
96              fix following the International System of Units standard will be
97              added (kilo, mega, etc.) [default: False].  If any other non-ze‐
98              ro number, will scale total and n.
99
100       --dynamic_ncols=dynamic_ncols
101              bool, optional.  If set, constantly alters ncols to the environ‐
102              ment (allowing for window resizes) [default: False].
103
104       --smoothing=smoothing
105              float,  optional.   Exponential  moving average smoothing factor
106              for speed estimates (ignored in GUI mode).  Ranges from 0 (aver‐
107              age speed) to 1 (current/instantaneous speed) [default: 0.3].
108
109       --bar_format=bar_format
110              str, optional.  Specify a custom bar string formatting.  May im‐
111              pact  performance.   [default:   '{l_bar}{bar}{r_bar}'],   where
112              l_bar='{desc}:  {percentage:3.0f}%|'  and  r_bar='| {n_fmt}/{to‐
113              tal_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possi‐
114              ble  vars:  l_bar,  bar, r_bar, n, n_fmt, total, total_fmt, per‐
115              centage, elapsed, elapsed_s, ncols, desc, unit, rate,  rate_fmt,
116              rate_noinv,  rate_noinv_fmt,  rate_inv,  rate_inv_fmt,  postfix,
117              unit_divisor, remaining, remaining_s.  Note that a trailing ": "
118              is automatically removed after {desc} if the latter is empty.
119
120       --initial=initial
121              int, optional.  The initial counter value.  Useful when restart‐
122              ing a progress bar [default: 0].
123
124       --position=position
125              int, optional.  Specify  the  line  offset  to  print  this  bar
126              (starting  from  0)  Automatic if unspecified.  Useful to manage
127              multiple bars at once (eg, from threads).
128
129       --postfix=postfix
130              dict or *, optional.  Specify additional stats to display at the
131              end  of  the  bar.   Calls  set_postfix(**postfix)  if  possible
132              (dict).
133
134       --unit_divisor=unit_divisor
135              float, optional.  [default: 1000], ignored unless unit_scale  is
136              True.
137
138       --write_bytes=write_bytes
139              bool,  optional.   If  (default:  None) and file is unspecified,
140              bytes will be written in Python 2.   If  True  will  also  write
141              bytes.  In all other cases will default to unicode.
142
143       --delim=delim
144              chr,  optional.  Delimiting character [default: '\n'].  Use '\0'
145              for null.  N.B.: on Windows systems,  Python  converts  '\n'  to
146              '\r\n'.
147
148       --buf_size=buf_size
149              int,  optional.  String buffer size in bytes [default: 256] used
150              when delim is specified.
151
152       --bytes=bytes
153              bool, optional.  If true, will count bytes,  ignore  delim,  and
154              default  unit_scale  to  True, unit_divisor to 1024, and unit to
155              'B'.
156
157       --manpath=manpath
158              str, optional.  Directory in which to install tqdm man pages.
159
160       --log=log
161              str,  optional.   CRITICAL|FATAL|ERROR|WARN(ING)|[default:  'IN‐
162              FO']|DEBUG|NOTSET.
163

AUTHORS

165       tqdm developers <https://github.com/tqdm>.
166
167
168
169tqdm User Manuals                  2015-2019                           TQDM(1)
Impressum