Skip to main content

A progressbar that works well for log files and also Jupyter notebooks

Project description

# Progress Bar

[![Build Status](https://travis-ci.com/BlackHC/progress_bar.svg?branch=master)](https://travis-ci.com/BlackHC/progress_bar) [![codecov](https://codecov.io/gh/BlackHC/progress_bar/branch/master/graph/badge.svg)](https://codecov.io/gh/BlackHC/progress_bar) [![PyPI](https://img.shields.io/badge/PyPI-blackhc.progress_bar-blue.svg)](https://pypi.python.org/pypi/blackhc.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

```python
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

blackhc.progress_bar-1.0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blackhc.progress_bar-1.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file blackhc.progress_bar-1.0.2.tar.gz.

File metadata

  • Download URL: blackhc.progress_bar-1.0.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for blackhc.progress_bar-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f04868dabe9fe07dfee7f706f22d66bf3460b2619370cd6bb8d928f9ff3f3201
MD5 7b288f214b4b1a80b7433478b46e695c
BLAKE2b-256 90a5ccf7c71dd14d2870d59b648195e3cbe2c23dd14b542343847c8a9790bc17

See more details on using hashes here.

File details

Details for the file blackhc.progress_bar-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: blackhc.progress_bar-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for blackhc.progress_bar-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca014adfb4cadcd241712b342b7e691fc260945f03c95dd6c49703ae04c85289
MD5 017d82211f9683683a101f6536e650cb
BLAKE2b-256 fd764e845f8649428c8b60984f4e5de1f2bcdcbd6d6da75522cd302b9041b4e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page