You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you ever wondered where your lengthy processing was at, and when would it finish? Do you usually hit `RETURN` several times to make sure it didn't crash, or the SSH connection didn't freeze? Have you ever thought it'd be awesome to be able to _pause some processing_ without hassle, return to the Python prompt to manually fix some items, then _seamlessly resume_ it? I did...
18
+
19
+
I've started this new progress bar thinking about all that, behold the **alive-progress**! 😃
Introducing the newest concept in progress bars for Python! `alive-progress` is in a class of its own, with an array of cool features that set it apart. Here are a few highlights:
25
+
- A mesmerizing **live spinner** that clearly shows your lengthy process did not crash and your SSH connection did not freeze, with **visual feedback** reacting to your processing speed.
26
+
- An efficient **multithreaded** bar that updates itself at a fraction of the actual processing speed to keep **CPU usage low** and avoid terminal spamming (1,000,000 iterations per second equates to roughly 60 updates per second, and you can also calibrate this to your liking).
27
+
- An **ETA** (expected time of arrival) feature with an intelligent _Exponential Smoothing Algorithm_ that shows the time to completion, allowing you to plan your time and manage your workload more effectively.
28
+
- Automatic **print** and **logging** hooks that provide seamless integration and effortless tracking, even enriching them with the current bar position when they occur.
29
+
- It prints a **nice receipt** when the processing finishes, including the elapsed time and the observed throughput.
30
+
- It detects **under** and **overflows**, enabling you to track hits, misses, or any desired count, not necessarily the actual iterations.
31
+
- You can **pause** it! That's right, you heard it here first! No other progress bar anywhere has this feature! You can get back to the Python prompt during any processing, adjust some items, and get back into that running process as if it had never stopped! All `alive_bar` widgets are kept as they were, and the elapsed time nicely ignores the paused time!
32
+
- It is **highly customizable**, with a smorgasbord of spinner and bar styles, as well as several ready-to-use factories to easily generate yours! You can even use the super powerful and cool `check()` tool to help you design your own animations! You can see all the generated frames and cycles exploded on screen, with several verbosity levels, even including an _alive_ rendition! It's boundless creativity at your fingertips!
33
+
34
+
---
35
+
## Table of contents
36
+
37
+
This README is always evolving, so do take a more comprehensive look from time to time... You might find great new details in other sections! 😊
16
38
17
39
<!-- TOC -->
18
-
*[alive-progress :)](#alive-progress--)
19
-
*[A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!](#a-new-kind-of-progress-bar-with-real-time-throughput-eta-and-very-cool-animations-)
This README is always evolving, so do take a more comprehensive look from time to time... You might find great new details in other sections! 😊
56
-
57
-
58
-
## Introduction
59
-
60
-
Have you ever wondered where your lengthy processing was, and when it would finish? Ever found yourself hitting [RETURN] now and then to ensure it didn't hang, or if, in a remote SSH session, the connection was still working? Ever needed to *pause* some processing for a while, return to the Python prompt for a manual inspection or fixing an item, and then *resume* the process seamlessly? I did...
61
-
62
-
I've started this cool progress bar thinking about all that, the **alive-progress**! 😃
I like to think of this as a new kind of progress bar for Python since it has, among other things:
68
-
69
-
- a **live spinner** that is incredibly cool and clearly shows your lengthy process did not hang, or your ssh connection did not drop;
70
-
- a **visual feedback** which reacts to your processing, as the live spinner will go faster or slower with it;
71
-
- an **efficient** multithreaded bar, which updates itself at a fraction of the actual processing speed (1,000,000 iterations per second equates to roughly 60 updates per second) to keep **CPU usage low** and avoid terminal spamming (you can also calibrate this to your liking);
72
-
- nice monitoring of both _position and throughput_ of your processing;
73
-
- an **ETA** (expected time of arrival) with an intelligent _exponential smoothing algorithm_, that shows the time to completion;
74
-
- automatic **print** and **logging** hooks, which allow print statements and logging messages to work _effortlessly_, right amid an animated bar, and even enriching them with the current bar position when they occur;
75
-
- a **nice receipt** is printed when your processing finishes, including the last bar rendition, the elapsed time, and the observed throughput;
76
-
- it detects **under and overflows**, enabling you to track hits, misses, or any desired count, not necessarily the actual iterations;
77
-
- it automatically detects if there's an **allocated tty**, and if there isn't (like in a shell pipeline), only the final receipt is printed (so you can safely include it in any code, and rest assured your log file won't get thousands of progress lines);
78
-
- you can **pause** it! I think that's an unprecedented feature for progress bars ANYWHERE — in Python or any other language — no one has ever done it! It's incredible to be able to get back to the Python prompt during any running process! Then you can manually adjust an item or prepare something and get back into that running process as if it had never stopped!! All `alive_bar` widgets are kept as they were, and the elapsed time nicely ignores the paused time!;
79
-
- it is **customizable**, with a growing smorgasbord of spinner and bar styles, as well as several ready-to-use factories to easily generate yours! Now (📌 new in 2.0), we even have a super powerful and cool `check()` tool, in both spinners and bars, to help you design your own animations! You can see all the frames and cycles exploded on screen, with several verbosity levels, even including an **alive** rendition! It's awesome 😜
80
-
81
-
82
-
## 📌 NEW in 3.1 series!
76
+
## 📌 NEW in 3.1 series
83
77
84
78
A very cool update here! In addition to polishing things up and improving terminal support, now `alive-progress` supports resuming computations!
85
79
@@ -119,7 +113,7 @@ Also in this version:
119
113
120
114
121
115
<details>
122
-
<summary>📌 NEW in 3.0 series!</summary>
116
+
<summary>📌 NEW in 3.0 series</summary>
123
117
124
118
Yep, I could finally get this version out! These are the new goodies:
125
119
@@ -143,7 +137,7 @@ And last but not least, a more polished layout for you to enjoy your progress!
143
137
</details>
144
138
145
139
<details>
146
-
<summary>📌 NEW in 2.4 series!</summary>
140
+
<summary>📌 NEW in 2.4 series</summary>
147
141
148
142
Now, `alive_bar` supports *Dual Line* text mode!
149
143
@@ -172,7 +166,7 @@ There's also a new `finalize` function parameter in `alive_it` which enables you
172
166
</details>
173
167
174
168
<details>
175
-
<summary>📌 NEW in 2.3 series!</summary>
169
+
<summary>📌 NEW in 2.3 series</summary>
176
170
177
171
This is all about customization; the core widgets can now be changed:
178
172
- send a string to the `monitor`, `elapsed`, and `stats` widgets to make them look anyway you want!
Some major new features, often requested, have finally landed!
220
214
- bar title can be dynamically set, changed, or even removed after being displayed
@@ -226,7 +220,7 @@ Some major new features, often requested, have finally landed!
226
220
</details>
227
221
228
222
<details>
229
-
<summary>📌 NEW in 2.1 series!</summary>
223
+
<summary>📌 NEW in 2.1 series</summary>
230
224
231
225
YES! Now `alive-progress` has support for Jupyter Notebooks and also includes a _Disabled_ state! Both were highly sought after, and have finally landed!
232
226
<br>And better, I've implemented an auto-detection mechanism for jupyter notebooks, so it just works, out of the box, without any changes in your code!!
@@ -240,7 +234,7 @@ See for yourself:
240
234
</details>
241
235
242
236
<details>
243
-
<summary>📌 NEW in 2.0 series!</summary>
237
+
<summary>📌 NEW in 2.0 series</summary>
244
238
245
239
This is a major breakthrough in `alive-progress`!
246
240
<br>I took 1 year developing it, and I'm very proud of what I've accomplished \o/
@@ -817,9 +811,9 @@ For example, take a look at the effect these very different calibrations have, r
817
811
Do these astonishing `alive-progress` animations refuse to display?
818
812
819
813
PyCharm is awesome, I love it! But I'll never understand why they've disabled emulating a terminal by default... If you do use PyCharm's output console, please enable this on all your Run Configurations:
820
-

814
+
<palign="center"><imgalt="alive-progress in pycharm"src="https://raw.githubusercontent.com/rsalmei/alive-progress/main/img/pycharm-terminal.png"></p>
821
815
822
-
I even recommend you enter`File` > `New Projects Setup` > `Run Configuration Templates`, select `Python`, and also enable it there, so any new ones you create will already have this set.
816
+
> I even recommend you go into`File` > `New Projects Setup` > `Run Configuration Templates`, select `Python`, and also enable it there, so any new ones you create will already have this set.
823
817
824
818
In addition to that, some terminals report themselves as "non-interactive", like when running out of a real terminal (PyCharm and Jupyter for example), in shell pipelines (`cat file.txt | python program.py`), or in background processes (not connected to a tty).
0 commit comments