4 ms·
I like the self-built approach especially for the learning value. If you’re using this in a CLI tool you’re writing in Python you might be using the library ri
by wolfskaempf 3y ago
I like the self-built approach especially for the learning value.
If you’re using this in a CLI tool you’re writing in Python you might be using the library rich anyway, which provides this functionality as well including some extra features.
https://rich.readthedocs.io/en/stable/progress.html https://rich.readthedocs.io/en/stable/progress.html
- morningsam 3y agoWhat I don't like about rich is that, dependencies and all, its installed size comes out to around 20 MB. 9 MB of that is due to its dependency on pygments for syntax highlighting, which a lot of people probably don't even want/need. If anyone knows of a smaller, more focused library providing something similar to rich's Live Display functionality, I'd appreciate it.
- Jakob 3y agoIt’s a bit obvious, but you could contribute to make pygments an optional dependency, and then not install that. Or you fork it outright.
- Ringz 3y agoThere is an open issue [1] on GitHub to make it more modular and get rid of markdown and syntax highlighting but I have no hope for rich to get more minimal. [1]: https://github.com/Textualize/rich/issues/2277 https://github.com/Textualize/rich/issues/2277