tqdm
Display progress bars for loops and iterables
TLDR
Show iterations per second and use stdout afterwards
Create a progress bar
Create an archive out of a directory and use the file count of that directory to create a progress bar
Create an archive with tar and create a progress bar (system agnostic, GNU tar uses stdout while BSD tar uses stderr)
SYNOPSIS
tqdm [options] command [command arguments]
PARAMETERS
--version
Show program's version number and exit.
-h, --help
Show help message and exit.
--desc=TEXT
Prefix for the progress bar.
--total=VALUE
Total number of expected iterations.
--unit=TEXT
Unit of measurement (e.g., 'files', 'bytes').
--unit_scale
Automatically scale the unit (e.g., 1024 bytes=1 KB).
--unit_divisor=VALUE
Divisor for automatically scaled units (default: 1000).
--leave
Leave the progress bar on the screen after completion.
--disable
Disable the display of the progress bar.
--ascii
Force ASCII output (no Unicode characters).
--bytes
Shorthand for '--unit=byte --unit_scale'.
--file=FILE
Output stream for the progress bar (default: stderr).
--dynamic_ncols
Resize progress bar to fit the terminal window.
--mininterval=VALUE
Minimum progress display update interval (in seconds).
--delim=TEXT
Column delimiter (default: space).
--write_bytes
Write bytes (rather than Unicode).
--no-write_bytes
Do not write bytes (rather than Unicode).
--verbose
Print some statistics after completion/interruption.
DESCRIPTION
The tqdm command is a versatile and easy-to-use tool for adding progress bars to any command-line application. tqdm (from the Arabic word *taqaddum* meaning 'progress') allows you to monitor the execution of long-running processes, providing visual feedback on the progress, estimated time remaining, and iteration speed. It can wrap around any iterable object, automatically updating the progress bar as the process iterates. This significantly improves the user experience when dealing with tasks like large file processing, data analysis scripts, or network operations. tqdm intelligently handles various output environments, including terminals, Jupyter notebooks, and web consoles, ensuring optimal display and performance. It is commonly used by developers and data scientists to enhance their command-line workflows and provides valuable insights into the performance of their scripts and applications.
USAGE EXAMPLES
tqdm command
Wraps the output of a command with a progress bar.
tqdm --total 100 command
Specifies the total number of iterations to expect.
INTEGRATION
tqdm can also be used as a library within Python scripts, allowing for more fine-grained control over the progress bar's behavior and appearance.