Crates.io | kdam |
lib.rs | kdam |
version | 0.6.2 |
source | src |
created_at | 2022-03-21 11:28:42.773344 |
updated_at | 2024-12-10 19:12:33.584858 |
description | A console progress bar library for Rust. (inspired by tqdm & rich.progress) |
homepage | |
repository | https://github.com/clitic/kdam/tree/main/kdam |
max_upload_size | |
id | 554037 |
size | 165,806 |
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
kdam also supports rich.progress style bars with customizable columns.
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.
If you like colours then you can also create a gradient progress bar.
kdam/examples/coloured/gradient.rs
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.
Dual Licensed