tqdm.1 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. .\" Automatically generated by Pandoc 3.8.3
  2. .\"
  3. .TH "TQDM" "1" "2015\-2026" "tqdm User Manuals"
  4. .SH NAME
  5. tqdm \- fast, extensible progress bar for Python and CLI
  6. .SH SYNOPSIS
  7. tqdm [\f[I]options\f[R]]
  8. .SH DESCRIPTION
  9. See \c
  10. .UR https://github.com/tqdm/tqdm
  11. .UE \c
  12. \&.
  13. Can be used as a pipe:
  14. .IP
  15. .EX
  16. $ \f[I]# count lines of code\f[R]
  17. $ cat *.py \f[B]|\f[R] tqdm \f[B]|\f[R] wc \-l
  18. 327it [00:00, 981773.38it/s]
  19. 327
  20. $ \f[I]# find all files\f[R]
  21. $ find . \-name \(dq*.py\(dq \f[B]|\f[R] tqdm \f[B]|\f[R] wc \-l
  22. 432it [00:00, 833842.30it/s]
  23. 432
  24. \f[I]# ... and more info\f[R]
  25. $ find . \-name \(aq*.py\(aq \-exec wc \-l \(rs{} \(rs; \(rs
  26. \f[B]|\f[R] tqdm \-\-total 432 \-\-unit files \-\-desc counting \(rs
  27. \f[B]|\f[R] awk \(aq{ sum += $1 }; END { print sum }\(aq
  28. counting: 100%\f[B]|\f[R]█████████\f[B]|\f[R] 432/432 [00:00<00:00, 794361.83files/s]
  29. 131998
  30. .EE
  31. .SH OPTIONS
  32. .TP
  33. \-h, \-\-help
  34. Print this help and exit.
  35. .TP
  36. \-v, \-\-version
  37. Print version and exit.
  38. .TP
  39. \-\-desc=\f[I]desc\f[R]
  40. str, optional.
  41. Prefix for the progressbar.
  42. .TP
  43. \-\-total=\f[I]total\f[R]
  44. int or float, optional.
  45. The number of expected iterations.
  46. If unspecified, len(iterable) is used if possible.
  47. If float(\(lqinf\(rq) or as a last resort, only basic progress
  48. statistics are displayed (no ETA, no progressbar).
  49. If \f[CR]gui\f[R] is True and this parameter needs subsequent updating,
  50. specify an initial arbitrary large positive number, e.g.\ 9e9.
  51. .TP
  52. \-\-leave
  53. bool, optional.
  54. If [default: True], keeps all traces of the progressbar upon termination
  55. of iteration.
  56. If \f[CR]None\f[R], will leave only if \f[CR]position\f[R] is
  57. \f[CR]0\f[R].
  58. .TP
  59. \-\-ncols=\f[I]ncols\f[R]
  60. int, optional.
  61. The width of the entire output message.
  62. If specified, dynamically resizes the progressbar to stay within this
  63. bound.
  64. If unspecified, attempts to use environment width.
  65. The fallback is a meter width of 10 and no limit for the counter and
  66. statistics.
  67. If 0, will not print any meter (only stats).
  68. .TP
  69. \-\-mininterval=\f[I]mininterval\f[R]
  70. float, optional.
  71. Minimum progress display update interval [default: 0.1] seconds.
  72. .TP
  73. \-\-maxinterval=\f[I]maxinterval\f[R]
  74. float, optional.
  75. Maximum progress display update interval [default: 10] seconds.
  76. Automatically adjusts \f[CR]miniters\f[R] to correspond to
  77. \f[CR]mininterval\f[R] after long display update lag.
  78. Only works if \f[CR]dynamic_miniters\f[R] or monitor thread is enabled.
  79. .TP
  80. \-\-miniters=\f[I]miniters\f[R]
  81. int or float, optional.
  82. Minimum progress display update interval, in iterations.
  83. If 0 and \f[CR]dynamic_miniters\f[R], will automatically adjust to equal
  84. \f[CR]mininterval\f[R] (more CPU efficient, good for tight loops).
  85. If > 0, will skip display of specified number of iterations.
  86. Tweak this and \f[CR]mininterval\f[R] to get very efficient loops.
  87. If your progress is erratic with both fast and slow iterations (network,
  88. skipping items, etc) you should set miniters=1.
  89. .TP
  90. \-\-ascii=\f[I]ascii\f[R]
  91. bool or str, optional.
  92. If unspecified or False, use unicode (smooth blocks) to fill the meter.
  93. The fallback is to use ASCII characters \(rq 123456789#\(lq.
  94. .TP
  95. \-\-disable
  96. bool, optional.
  97. Whether to disable the entire progressbar wrapper [default: False].
  98. If set to None, disable on non\-TTY.
  99. .TP
  100. \-\-unit=\f[I]unit\f[R]
  101. str, optional.
  102. String that will be used to define the unit of each iteration [default:
  103. it].
  104. .TP
  105. \-\-unit\-scale=\f[I]unit_scale\f[R]
  106. bool or int or float, optional.
  107. If 1 or True, the number of iterations will be reduced/scaled
  108. automatically and a metric prefix following the International System of
  109. Units standard will be added (kilo, mega, etc.)
  110. [default: False].
  111. If any other non\-zero number, will scale \f[CR]total\f[R] and
  112. \f[CR]n\f[R].
  113. .TP
  114. \-\-dynamic\-ncols
  115. bool, optional.
  116. If set, constantly alters \f[CR]ncols\f[R] and \f[CR]nrows\f[R] to the
  117. environment (allowing for window resizes) [default: False].
  118. .TP
  119. \-\-smoothing=\f[I]smoothing\f[R]
  120. float, optional.
  121. Exponential moving average smoothing factor for speed estimates (ignored
  122. in GUI mode).
  123. Ranges from 0 (average speed) to 1 (current/instantaneous speed)
  124. [default: 0.3].
  125. .TP
  126. \-\-bar\-format=\f[I]bar_format\f[R]
  127. str, optional.
  128. Specify a custom bar string formatting.
  129. May impact performance.
  130. [default: `{l_bar}{bar}{r_bar}'], where l_bar=`{desc}:
  131. {percentage:3.0f}%|' and r_bar=`| {n_fmt}/{total_fmt}
  132. [{elapsed}<{remaining}, \(cq \(cq{rate_fmt}{postfix}]' Possible vars:
  133. l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, elapsed,
  134. elapsed_s, ncols, nrows, desc, unit, rate, rate_fmt, rate_noinv,
  135. rate_noinv_fmt, rate_inv, rate_inv_fmt, postfix, unit_divisor,
  136. remaining, remaining_s, eta.
  137. Note that a trailing \(lq:\(rq is automatically removed after {desc} if
  138. the latter is empty.
  139. .TP
  140. \-\-initial=\f[I]initial\f[R]
  141. int or float, optional.
  142. The initial counter value.
  143. Useful when restarting a progress bar [default: 0].
  144. If using float, consider specifying \f[CR]{n:.3f}\f[R] or similar in
  145. \f[CR]bar_format\f[R], or specifying \f[CR]unit_scale\f[R].
  146. .TP
  147. \-\-position=\f[I]position\f[R]
  148. int, optional.
  149. Specify the line offset to print this bar (starting from 0) Automatic if
  150. unspecified.
  151. Useful to manage multiple bars at once (eg, from threads).
  152. .TP
  153. \-\-postfix=\f[I]postfix\f[R]
  154. dict or *, optional.
  155. Specify additional stats to display at the end of the bar.
  156. Calls \f[CR]set_postfix(**postfix)\f[R] if possible (dict).
  157. .TP
  158. \-\-unit\-divisor=\f[I]unit_divisor\f[R]
  159. float, optional.
  160. [default: 1000], ignored unless \f[CR]unit_scale\f[R] is True.
  161. .TP
  162. \-\-write\-bytes
  163. bool, optional.
  164. Whether to write bytes.
  165. If (default: False) will write unicode.
  166. .TP
  167. \-\-lock\-args=\f[I]lock_args\f[R]
  168. tuple, optional.
  169. Passed to \f[CR]refresh\f[R] for intermediate output (initialisation,
  170. iterating, and updating).
  171. .TP
  172. \-\-nrows=\f[I]nrows\f[R]
  173. int, optional.
  174. The screen height.
  175. If specified, hides nested bars outside this bound.
  176. If unspecified, attempts to use environment height.
  177. The fallback is 20.
  178. .TP
  179. \-\-colour=\f[I]colour\f[R]
  180. str, optional.
  181. Bar colour (e.g.\ `green', `#00ff00').
  182. .TP
  183. \-\-delay=\f[I]delay\f[R]
  184. float, optional.
  185. Don\(cqt display until [default: 0] seconds have elapsed.
  186. .TP
  187. \-\-delim=\f[I]delim\f[R]
  188. chr, optional.
  189. Delimiting character [default: `\(rsn'].
  190. Use `\(rs0' for null.
  191. N.B.: on Windows systems, Python converts `\(rsn' to `\(rsr\(rsn'.
  192. .TP
  193. \-\-buf\-size=\f[I]buf_size\f[R]
  194. int, optional.
  195. String buffer size in bytes [default: 256] used when \f[CR]delim\f[R] is
  196. specified.
  197. .TP
  198. \-\-bytes
  199. bool, optional.
  200. If true, will count bytes, ignore \f[CR]delim\f[R], and default
  201. \f[CR]unit_scale\f[R] to True, \f[CR]unit_divisor\f[R] to 1024, and
  202. \f[CR]unit\f[R] to `B'.
  203. .TP
  204. \-\-tee
  205. bool, optional.
  206. If true, passes \f[CR]stdin\f[R] to both \f[CR]stderr\f[R] and
  207. \f[CR]stdout\f[R].
  208. .TP
  209. \-\-update
  210. bool, optional.
  211. If true, will treat input as newly elapsed iterations, i.e.\ numbers to
  212. pass to \f[CR]update()\f[R].
  213. Note that this is slow (\(ti2e5 it/s) since every input must be decoded
  214. as a number.
  215. .TP
  216. \-\-update\-to
  217. bool, optional.
  218. If true, will treat input as total elapsed iterations, i.e.\ numbers to
  219. assign to \f[CR]self.n\f[R].
  220. Note that this is slow (\(ti2e5 it/s) since every input must be decoded
  221. as a number.
  222. .TP
  223. \-\-null
  224. bool, optional.
  225. If true, will discard input (no stdout).
  226. .TP
  227. \-\-manpath=\f[I]manpath\f[R]
  228. str, optional.
  229. Directory in which to install tqdm man pages.
  230. .TP
  231. \-\-comppath=\f[I]comppath\f[R]
  232. str, optional.
  233. Directory in which to place tqdm completion.
  234. .TP
  235. \-\-log=\f[I]log\f[R]
  236. str, optional.
  237. CRITICAL|FATAL|ERROR|WARN(ING)|[default: `INFO']|DEBUG|NOTSET.
  238. .SH AUTHORS
  239. tqdm developers \c
  240. .UR https://github.com/tqdm
  241. .UE \c.