#progress-bar #progress #color

kdam

A console progress bar library for Rust. (inspired by tqdm & rich.progress)

21 releases

new 0.6.2 Dec 10, 2024
0.6.1 Nov 23, 2024
0.5.2 May 13, 2024
0.5.1 Dec 1, 2023
0.1.0 Mar 21, 2022

#47 in Command-line interface

Download history 2349/week @ 2024-08-24 3165/week @ 2024-08-31 2382/week @ 2024-09-07 1901/week @ 2024-09-14 2037/week @ 2024-09-21 2388/week @ 2024-09-28 1833/week @ 2024-10-05 2655/week @ 2024-10-12 2634/week @ 2024-10-19 2823/week @ 2024-10-26 2466/week @ 2024-11-02 2332/week @ 2024-11-09 2886/week @ 2024-11-16 2802/week @ 2024-11-23 3676/week @ 2024-11-30 2945/week @ 2024-12-07

12,724 downloads per month
Used in 34 crates (29 directly)

MIT/Apache

110KB
2K SLoC

kdam

kdam is a console progress bar library for rust. It is port of tqdm library which is written in python. kdam supports almost all features of tqdm except a few. It also supports jupyter notebook same as tqdm does. Some features of tqdm can't be ported directly. So they are implemented in different way like, RowManager which manages multiple progress bars but in tqdm progress bars are automatically managed using nrows. In addition to tqdm existing features kdam also provides extra features such as spinners, charset with fill, gradient colours etc. Since, kdam is written in rust its upto 4 times faster than tqdm.

Instantly make your loops show a smart progress meter. Just wrap any iterator with tqdm!(iterator) macro and you're done!

use kdam::tqdm;

fn main() {
    for _ in tqdm!(0..100) {}
}
100%|█████████████████████████████| 100/100 [00:00<00:00, 25854.49it/s]

kdam also supports different bar animation styles. All available bar animation styles are:

kdam/examples/showcase/animations.rs showcase_animations

kdam also supports rich.progress style bars with customizable columns.

kdam/examples/rich.rs showcase_rich_progress_animation

kdam doesn't restrict you to use default progress bar style. You can create your own progress bar using bar_format template. If you are not satisfied with bar_format limited options then you can also build your own custom progress bar.

This is clone of alive-progress using kdam.

kdam/examples/template.rs showcase_alive_progress_template

If you like colours then you can also create a gradient progress bar.

kdam/examples/coloured/gradient.rs showcase_gradient

Getting Started

Add this to your Cargo.toml file.

[dependencies]
kdam = "0.6.2"

Or add from command line.

$ cargo add kdam

See docs and examples to know how to use it.

License

Dual Licensed

Dependencies

~1–12MB
~159K SLoC