A progressbar that works well for log files and also Jupyter notebooks
Project description
Progress Bar
A progress bar that is either using TQDM for nice outputs internally, or a log-friendly replacement that works well for piping into files.
Example
from blackhc.progress_bar import with_progress_bar
for _ in with_progress_bar(range(100000)):
pass
The package will decide whether to use tqdm or not based on whether output is attached to a terminal or not, or whether the cell is executed within a Jupyter Notebook or IPython terminal.
You can use blackhc.progress_bar.use_tqdm = True/False
to force TQDM (or force disable it).
Installation
To install using pip, use:
pip install blackhc.progress_bar
To run the tests, use:
python setup.py test
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file blackhc.progress_bar-1.1.0.tar.gz
.
File metadata
- Download URL: blackhc.progress_bar-1.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c14268eb1dca7c847f52114c835d8aa1b8f582e4a50fb5b0c8d60369c0f7960f |
|
MD5 | 154013df52ee0ba4bf765813f9616a05 |
|
BLAKE2b-256 | f6099d221a50c28dae7148ce0e1d06f034ebf4480c05992a79521bde75d92eb9 |
File details
Details for the file blackhc.progress_bar-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: blackhc.progress_bar-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b0c9f153d4f27270a102e4679839a0b3023a90e66e8c8610d56c4538df4458 |
|
MD5 | 56932d5914ddfdafbba02280a3398f49 |
|
BLAKE2b-256 | 8980ed702c1b4a76ba83340c2ea427be648f9cb2429b6e8e1ef25f65617bbb6b |