TQDM(1)
๐ NAME ๐
tqdm โ bestie, it's a progress bar for Python and CLI that's fast and extensible. That's the whole vibe. โจ
๐ฆ SYNOPSIS ๐ฆ
tqdm [options]
๐ธ DESCRIPTION ๐ธ
okay so first things first, go peek at https://github.com/tqdm/tqdm โ that's the mothership. ๐ซถ
and the way you can just... pipe into it? iconic. it's giving "slap it in the middle of a pipeline and suddenly you have โจfeedbackโจ". watch:
$ # count lines of code
$ cat *.py | tqdm | wc -l
327it [00:00, 981773.38it/s]
327
$ # find all files
$ find . -name "*.py" | tqdm | wc -l
432it [00:00, 833842.30it/s]
432
# ... and more info
$ find . -name '*.py' -exec wc -l \{} \; \
| tqdm --total 432 --unit files --desc counting \
| awk '{ sum += $1 }; END { print sum }'
counting: 100%|โโโโโโโโโ| 432/432 [00:00<00:00, 794361.83files/s]
131998
like?? the --total 432 --unit files --desc counting combo?? chef's kiss. ๐ง
๐ OPTIONS ๐
okay this is the part where i hold your hand and we go through literally every single flag. no skips. no shortcuts. we're doing this together. ๐
-h,--helpโ prints this help and dips out. classic. ๐-v,--versionโ prints the version and exits. boom. โญ--desc=descโstr, optional. a prefix that sits in front of your progress bar. your little label moment. ๐--total=totalโintorfloat, optional. how many iterations you're expecting. if you don't say, it useslen(iterable)when that's even possible. if it'sfloat("inf")โ or if it's genuinely the last resort โ you only get the basic progress stats, so no ETA, no progress bar ๐ญ. and ifguiisTrueand this param needs to be updated later, give it an initial arbitrary big positive number, like9e9.--leaveโbool, optional. if[default: True], it keeps all traces of the progress bar after iteration ends. ifNone, it'll only leave it ifpositionis0.--ncols=ncolsโint, optional. the width of the whole output message. if you set it, the bar dynamically resizes to stay inside that bound. if you don't, it tries to use the environment width. the fallback is a meter width of10with no limit on the counter and statistics. if it's0, it prints no meter at all โ only stats.--mininterval=minintervalโfloat, optional. minimum progress display update interval,[default: 0.1]seconds. โจ--maxinterval=maxintervalโfloat, optional. maximum progress display update interval,[default: 10]seconds. it automatically adjustsminitersto matchminintervalafter a long display update lag. only works ifdynamic_minitersor the monitor thread is enabled. ๐ฅ--miniters=minitersโintorfloat, optional. minimum progress display update interval, in iterations. if0anddynamic_miniters, it'll auto-adjust to equalminintervalโ more CPU efficient, great for tight loops. if> 0, it skips displaying the specified number of iterations. tweak this andminintervaltogether for very efficient loops. and if your progress is erratic with both fast and slow iterations (network, skipping items, etc.) you should setminiters=1.--ascii=asciiโboolorstr, optional. if unspecified orFalse, it uses unicode smooth blocks to fill the meter. the fallback is ASCII characters123456789#.--disableโbool, optional. whether to disable the entire progress bar wrapper[default: False]. if set toNone, it disables on non-TTY. ๐--unit=unitโstr, optional. the string used to define the unit of each iteration[default: it].--unit-scale=unit_scaleโboolorintorfloat, optional. if1orTrue, the number of iterations gets reduced/scaled automatically and a metric prefix following the International System of Units standard gets added (kilo, mega, etc.)[default: False]. if it's any other non-zero number, it scalestotalandn.--dynamic-ncolsโbool, optional. if set, it constantly altersncolsandnrowsto the environment (so window resizes work)[default: False]. ๐ช--smoothing=smoothingโfloat, optional. exponential moving average smoothing factor for speed estimates (ignored in GUI mode). ranges from0(average speed) to1(current/instantaneous speed)[default: 0.3].--bar-format=bar_formatโstr, optional. specify a custom bar string formatting. may impact performance.[default:{l_bar}{bar}{r_bar}']`, where:
l_bar=`{desc}: {percentage:3.0f}%|'
r_bar=`| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
'{rate_fmt}{postfix}]'
possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, elapsed, elapsed_s, ncols, nrows, desc, unit, rate, rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, postfix, unit_divisor, remaining, remaining_s, eta. also note that a trailing : is automatically removed after {desc} if {desc} is empty. ๐
--initial=initialโintorfloat, optional. the initial counter value. useful when you're restarting a progress bar[default: 0]. if you're using a float, consider specifying{n:.3f}or similar inbar_format, or specifyingunit_scale. ๐--position=positionโint, optional. the line offset to print this bar at (starting from0). automatic if unspecified. useful for managing multiple bars at once (eg, from threads). ๐--postfix=postfixโdictor*, optional. extra stats to display at the end of the bar. it callsset_postfix(**postfix)if possible (when it's a dict).--unit-divisor=unit_divisorโfloat, optional.[default: 1000], and it's ignored unlessunit_scaleisTrue.--write-bytesโbool, optional. whether to write bytes. if(default: False)it writes unicode.--lock-args=lock_argsโtuple, optional. passed torefreshfor intermediate output (initialisation, iterating, and updating).--nrows=nrowsโint, optional. the screen height. if specified, it hides nested bars outside this bound. if unspecified, it tries to use the environment height. the fallback is20.--colour=colourโstr, optional. bar colour (e.g.green,#00ff00). ๐จ--delay=delayโfloat, optional. don't display anything until[default: 0]seconds have elapsed.--delim=delimโchr, optional. delimiting character[default:\n]. use\0for null. N.B.: on Windows systems, Python converts\nto\r\n.--buf-size=buf_sizeโint, optional. string buffer size in bytes[default: 256], used whendelimis specified.--bytesโbool, optional. if true, it counts bytes, ignoresdelim, and defaultsunit_scaletoTrue,unit_divisorto1024, andunittoB. ๐งฎ--teeโbool, optional. if true, it passes stdin to both stderr and stdout.--updateโbool, optional. if true, it treats input as newly elapsed iterations, i.e. numbers to pass toupdate(). note that this is slow (~2e5 it/s) since every input must be decoded as a number. ๐ญ--update-toโbool, optional. if true, it treats input as total elapsed iterations, i.e. numbers to assign toself.n. note that this is slow too (~2e5 it/s) since every input must be decoded as a number. ๐ญ--nullโbool, optional. if true, it discards input (no stdout).--manpath=manpathโstr, optional. directory in which to install thetqdmman pages. ๐--comppath=comppathโstr, optional. directory in which to placetqdmcompletion.--log=logโstr, optional.CRITICAL|FATAL|ERROR|WARN(ING)|[default:INFO]|DEBUG|NOTSET.
๐ซถ AUTHORS ๐ซถ
the tqdm developers โ https://github.com/tqdm โ absolute legends, no cap. ๐
and that's the whole page bestie!! this was the tqdm User Manuals situation, dated 2015-2026, living under the section TQDM(1) in the General Commands Manual โ go forth and pipe things, i believe in you ๐โจ๐
๐ฆ where this page comes from
- epel 10: python3-tqdm 4.68.4-2.el10_3 ยท MPL-2.0 AND LicenseRef-Callaway-MIT
- fedora 44: python3-tqdm 4.69.0-2.fc44 ยท MPL-2.0 AND LicenseRef-Callaway-MIT
- ubuntu stonking: python3-tqdm 4.70.0-1 ยท MPL-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms