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  or float, optional.  The number of expected iterations.  If
43              unspecified, len(iterable) is used if possible.  If float("inf")
44              or  as  a  last  resort, only basic progress statistics are dis‐
45              played (no ETA, no progressbar).  If gui is True and this param‐
46              eter  needs  subsequent  updating,  specify an initial arbitrary
47              large positive number, e.g.  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 or float, optional.  Minimum progress display update  inter‐
73              val,  in  iterations.  If 0 and dynamic_miniters, will automati‐
74              cally adjust to equal mininterval (more CPU efficient, good  for
75              tight  loops).  If > 0, will skip display of specified number of
76              iterations.  Tweak this and mininterval to  get  very  efficient
77              loops.   If your progress is erratic with both fast and slow it‐
78              erations  (network,  skipping  items,  etc)   you   should   set
79              miniters=1.
80
81       --ascii=ascii
82              bool  or  str,  optional.   If unspecified or False, use unicode
83              (smooth blocks) to fill the meter.  The fallback is to use ASCII
84              characters " 123456789#".
85
86       --disable=disable
87              bool, optional.  Whether to disable the entire progressbar wrap‐
88              per [default: False].  If set to None, disable on non-TTY.
89
90       --unit=unit
91              str, optional.  String that will be used to define the  unit  of
92              each iteration [default: it].
93
94       --unit_scale=unit_scale
95              bool or int or float, optional.  If 1 or True, the number of it‐
96              erations will be reduced/scaled automatically and a metric  pre‐
97              fix following the International System of Units standard will be
98              added (kilo, mega, etc.) [default: False].  If any other non-ze‐
99              ro number, will scale total and n.
100
101       --dynamic_ncols=dynamic_ncols
102              bool,  optional.   If  set, constantly alters ncols and nrows to
103              the environment (allowing for window resizes) [default: False].
104
105       --smoothing=smoothing
106              float, optional.  Exponential moving  average  smoothing  factor
107              for speed estimates (ignored in GUI mode).  Ranges from 0 (aver‐
108              age speed) to 1 (current/instantaneous speed) [default: 0.3].
109
110       --bar_format=bar_format
111              str, optional.  Specify a custom bar string formatting.  May im‐
112              pact   performance.    [default:  '{l_bar}{bar}{r_bar}'],  where
113              l_bar='{desc}: {percentage:3.0f}%|'  and  r_bar='|  {n_fmt}/{to‐
114              tal_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possi‐
115              ble vars: l_bar, bar, r_bar, n, n_fmt,  total,  total_fmt,  per‐
116              centage,  elapsed,  elapsed_s,  ncols,  nrows, desc, unit, rate,
117              rate_fmt, rate_noinv,  rate_noinv_fmt,  rate_inv,  rate_inv_fmt,
118              postfix,  unit_divisor,  remaining,  remaining_s.   Note  that a
119              trailing ": " is automatically removed after {desc} if the  lat‐
120              ter is empty.
121
122       --initial=initial
123              int or float, optional.  The initial counter value.  Useful when
124              restarting a progress bar [default: 0].  If using float, consid‐
125              er  specifying  {n:.3f}  or similar in bar_format, or specifying
126              unit_scale.
127
128       --position=position
129              int, optional.  Specify  the  line  offset  to  print  this  bar
130              (starting  from  0)  Automatic if unspecified.  Useful to manage
131              multiple bars at once (eg, from threads).
132
133       --postfix=postfix
134              dict or *, optional.  Specify additional stats to display at the
135              end  of  the  bar.   Calls  set_postfix(**postfix)  if  possible
136              (dict).
137
138       --unit_divisor=unit_divisor
139              float, optional.  [default: 1000], ignored unless unit_scale  is
140              True.
141
142       --write_bytes=write_bytes
143              bool,  optional.   If  (default:  None) and file is unspecified,
144              bytes will be written in Python 2.   If  True  will  also  write
145              bytes.  In all other cases will default to unicode.
146
147       --lock_args=lock_args
148              tuple,  optional.   Passed  to  refresh  for intermediate output
149              (initialisation, iterating, and updating).
150
151       --nrows=nrows
152              int, optional.  The screen height.  If specified,  hides  nested
153              bars  outside this bound.  If unspecified, attempts to use envi‐
154              ronment height.  The fallback is 20.
155
156       --delim=delim
157              chr, optional.  Delimiting character [default: '\n'].  Use  '\0'
158              for  null.   N.B.:  on  Windows systems, Python converts '\n' to
159              '\r\n'.
160
161       --buf_size=buf_size
162              int, optional.  String buffer size in bytes [default: 256]  used
163              when delim is specified.
164
165       --bytes=bytes
166              bool,  optional.   If  true, will count bytes, ignore delim, and
167              default unit_scale to True, unit_divisor to 1024,  and  unit  to
168              'B'.
169
170       --manpath=manpath
171              str, optional.  Directory in which to install tqdm man pages.
172
173       --log=log
174              str,  optional.   CRITICAL|FATAL|ERROR|WARN(ING)|[default:  'IN‐
175              FO']|DEBUG|NOTSET.
176

AUTHORS

178       tqdm developers <https://github.com/tqdm>.
179
180
181
182tqdm User Manuals                  2015-2020                           TQDM(1)
Impressum