Skip to main content

A visually appealing progress bar for long lasting computations.

Project description

A visually appealing progress bar for long lasting computations. It also computes the remaining estimated time for the task by ad-hoc learning of the completion so far. For this reason scikit-learn and numpy are required.

You can install progressor via

pip install progressor

and import it in python using:

import progressor

Compute a task as follows:

from __future__ import print_function
import time

res = [ 0 ]

def task(elem):
    time.sleep(0.01)
    res[0] += elem

progressor.progress_list(range(1000), task, prefix="sleep list")
print(res[0])

or in a range:

def task_range(cur_ix, length):
    task(cur_ix)

progressor.progress(0, 1000, task_range, prefix="sleep range")
print(res[0])

or while reading a file:

with progressor.IOWrapper(open(datafile, "r"), prefix="loading data", out=sys.stdout) as f_in:
    data = f_in.read()

The output looks roughly like this:

sleep list: |████████████▌       |  62.30% (T   7.492s ETA   6.791s)

If no estimate of the progress towards completion can be made use:

def repeat(num):
    while True:
        yield num

progressor.progress_indef(repeat(1), task, prefix="sleep indefinitely")

which produces output like this:

sleep indefinitely: /

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

progressor-0.1.19.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

progressor-0.1.19-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file progressor-0.1.19.tar.gz.

File metadata

  • Download URL: progressor-0.1.19.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

File hashes

Hashes for progressor-0.1.19.tar.gz
Algorithm Hash digest
SHA256 eb750aea910a14bfd01bbfbb76872f6f0103d1bc537b8efabe4d51424e4d1283
MD5 cc110148481f0cde7e38d404bd4ed7f5
BLAKE2b-256 10c91b1bfcbf945bdb77989c9196ea9d470684e0f24b8985b7ce96f381aea3b4

See more details on using hashes here.

File details

Details for the file progressor-0.1.19-py2.py3-none-any.whl.

File metadata

  • Download URL: progressor-0.1.19-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

File hashes

Hashes for progressor-0.1.19-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5137e5285928a267d5feb916f9891f65e7e7c47fd92f3603d8c969686add9941
MD5 a638379c1ebba134fb8188d87ea6542d
BLAKE2b-256 5d3ed6781d057ecba556ef4211a05a38ec2b01f2092035101848bbe96f8230cf

See more details on using hashes here.

Supported by

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