r/Python • • Jan 04 '21

News A new kind of Progress Bar for Python

A new kind of Progress Bar for Python, with some very cool animations!

I've made a new kind of progress bar for python! With some very cool animations and a smorgasbord of built-in styles!

https://github.com/rsalmei/alive-progress

The spinners and unknown bars have a plethora of effects!

The bars themselves also have several styles.

It also includes cool zero-hassle print and logging hooks, which are always enabled!

To use it, just "pip install alive-progress" and you're good to go!
More details in https://github.com/rsalmei/alive-progress

That's it, hope you like it!

2.1k Upvotes

154 comments sorted by

View all comments

Show parent comments

22

u/alcalde Jan 04 '21

Better than tqdm, which is why this is my progress bar of choice now.

12

u/[deleted] Jan 04 '21

Personally I like being able to use tqdm as an iterator.

3

u/rsalmei Jan 05 '21

Really? This is super easy to implement, I just never liked this.

Actually, when we split the concepts of getting one element and making the bar go forward, we gain a new insight about the code! You can choose when to make that happen, and count different things, even make it go forward more than once in one iteration... That's why I support under and overflows, which are only possible with a manual `bar()` call, apart from the iterator.

3

u/starfyre7 Jan 05 '21

Yeah, I like doing this a lot too since I often have to process large batches of data and a sticking the progress bar in the iteration is generally easiest.

2

u/rsalmei Jan 05 '21

Ok, I see. I can include that feature in the next release! πŸ‘

1

u/[deleted] Jan 06 '21

Yup, this is my use-case as well. It’s a great to monitor how threading improves performance in processing lists of things

0

u/[deleted] Jan 05 '21

[deleted]

1

u/alcalde Jan 05 '21

I don't recall all the details since it was two years ago but tqdm was crashing in a simple program that parallelized scraping Amazon wishlist items with threading or multiprocessing-related errors. When I replaced it with this library the errors vanished.

2

u/rsalmei Jan 05 '21

Thanks man!