#progress-bar #progress #color

kdam

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

17 unstable releases (4 breaking)

0.5.1 Dec 1, 2023
0.5.0 Oct 5, 2023
0.4.1 Aug 22, 2023
0.4.0 Jul 23, 2023
0.1.0 Mar 21, 2022

#51 in Command-line interface

Download history 677/week @ 2023-12-23 1088/week @ 2023-12-30 1578/week @ 2024-01-06 1691/week @ 2024-01-13 1517/week @ 2024-01-20 1921/week @ 2024-01-27 1799/week @ 2024-02-03 2117/week @ 2024-02-10 1475/week @ 2024-02-17 1618/week @ 2024-02-24 2086/week @ 2024-03-02 2086/week @ 2024-03-09 2103/week @ 2024-03-16 2264/week @ 2024-03-23 2234/week @ 2024-03-30 2234/week @ 2024-04-06

9,085 downloads per month
Used in 24 crates (21 directly)

MIT/Apache

105KB
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.5.1"

Or add from command line.

$ cargo add kdam

See docs and examples to know how to use it.

License

Dual Licensed

Dependencies

~2–15MB
~168K SLoC