tqdm.github.io Open in urlscan Pro
2606:50c0:8002::153  Public Scan

Submitted URL: http://tqdm.github.io/
Effective URL: https://tqdm.github.io/
Submission: On September 07 via manual from US — Scanned from DE

Form analysis 2 forms found in the DOM

<form class="md-header__option" data-md-component="palette"> <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio"
    name="__palette" id="__palette_1"> <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <path d="M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zM7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path>
    </svg> </label> <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="orange" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2"> <label
    class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden=""> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3Z"></path>
    </svg> </label> </form>

Name: search

<form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false"
    data-md-component="search-query" required=""> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"></path>
    </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"></path>
    </svg> </label>
  <nav class="md-search__options" aria-label="Search"> <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"></path>
      </svg> </button> </nav>
</form>

Text Content

Skip to content

tqdm documentation
Home

Type to start searching
tqdm/tqdm
 * v4.66.1
 * 25.6k
 * 1.3k

tqdm documentation
tqdm/tqdm
 * v4.66.1
 * 25.6k
 * 1.3k

 * Home
 * Library Reference
   Library Reference
    * tqdm.tqdm
    * tqdm.notebook
    * tqdm.asyncio
    * tqdm.keras
    * tqdm.dask
    * tqdm.tk
    * tqdm.gui
    * tqdm.rich
    * CLI
    * tqdm.contrib
    * tqdm.contrib.concurrent
    * tqdm.contrib.itertools
    * tqdm.contrib.logging
    * tqdm.contrib.slack
    * tqdm.contrib.discord
    * tqdm.contrib.telegram
    * tqdm.utils
    * Shortcuts

 * Developer Reference
   Developer Reference
    * Warnings and Exceptions
    * tqdm.TMonitor

 * Release History
 * Contributing
 * Merch Store!
 * Ports to Other Languages
 * Presentation (PyData)
   Presentation (PyData)
    * Video
    * Slides

 * External Links
   External Links
    * Source Code (ENTIRE DOCUMENTATION ON ONE PAGE)
    * wiki
    * FAQs
    * Issues
    * Downloads
      Downloads
       * GitHub
       * PyPI
       * Conda
   
    * Tests
      Tests
       * GitHub Actions
       * Coveralls
       * Codecov
       * Codacy
       * Performance Benchmarks (asv)
   
    * Citations
      Citations
       * DOI
       * Metrics (Open Hub)

 * Licence
 * Video

What if you didn’t manage infrastructure? Deploy and launch modern apps on
Aptible.
Ads by EthicalAds


TQDM#







--------------------------------------------------------------------------------

tqdm means "progress" in Arabic (taqadum, تقدّم) and is an abbreviation for "I
love you so much" in Spanish (te quiero demasiado).

Instantly make your loops show a smart progress meter - just wrap any iterable
with tqdm(iterable), and you're done!

from tqdm import tqdm
for i in tqdm(range(10000)):
    ...


76%|████████████████████████████         | 7568/10000 [00:33<00:10, 229.00it/s]

trange(N) can be also used as a convenient shortcut for tqdm(range(N)).





It can also be executed as a module with pipes:

$ seq 9999999 | tqdm --bytes | wc -l
75.2MB [00:00, 217MB/s]
9999999
$ 7z a -bd -r backup.7z docs/ | grep Compressing | \
    tqdm --total $(find docs/ -type f | wc -l) --unit files >> backup.log
100%|███████████████████████████████▉| 8014/8014 [01:37<00:00, 82.29files/s]


Overhead is low -- about 60ns per iteration (80ns with tqdm_gui), and is unit
tested against performance regression. By comparison, the well-established
ProgressBar has an 800ns/iter overhead.

In addition to its low overhead, tqdm uses smart algorithms to predict the
remaining time and to skip unnecessary iteration displays, which allows for a
negligible overhead in most cases.

tqdm works on any platform (Linux, Windows, Mac, FreeBSD, NetBSD,
Solaris/SunOS), in any console or in a GUI, and is also friendly with
IPython/Jupyter notebooks.

tqdm does not require any dependencies (not even curses!), just Python and an
environment supporting carriage return \r and line feed \n control characters.



© Casper da Costa-Luis @casperdcl 2015-2022

Simplify infrastructure with MongoDB Atlas, the leading developer data platform
Ads by EthicalAds
Close Ad