Skip to main content

Display a progress bar and the status of a job in the console

Project description

printStatus

A simple collection of functions to print a progress bar in the console. In addition, it facilitates to print the status of a currently running job or the exit status of a finished job.

The module is for instance used by the GIST pipeline (https://abittner.gitlab.io/thegistpipeline/) and the generated messages look like this:

.. image:: https://abittner.gitlab.io/thegistpipeline/V3.0.0-doc1/_images/runningPipeline.png :scale: 75%

Installation

You can install this package with pip::

pip install printStatus

Usage

A simple example of the usage of this module is provided in demo.py. The following functions are available:

printStatus.module(message): Print the name of the currently active module.

printStatus.running(message): Print a new message to stdout with the tag "Running".

printStatus.done(message): Print a new message to stdout with the tag "Done".

printStatus.updateDone(message, progressbar=False): Overwrite the previous message in stdout with the tag "Done" and a new message. Set progressbar=True if the previous message was the progress bar.

printStatus.warning(message): Print a new message to stdout with the tag "Warning".

printStatus.updateWarning(message, progressbar=False): Overwrite the previous message in stdout with the tag "Warning" and a new message. Set progressbar=True if the previous message was the progress bar.

printStatus.failed(message): Print a new message to stdout with the tag "Failed".

printStatus.updateFailed(message): Overwrite the previous message in stdout with the tag "Failed" and a new message. Set progressbar=True if the previous message was the progress bar.

Compatibility

Tested with Python3. Note that the appearance of the colours in the terminal depends on the specific setup of your terminal.

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

printStatus-1.0.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

printStatus-1.0.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file printStatus-1.0.4.tar.gz.

File metadata

  • Download URL: printStatus-1.0.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for printStatus-1.0.4.tar.gz
Algorithm Hash digest
SHA256 88ce2ff7927918b0223cf07f6897ed67d5f9e5ba8011d96ebe2c649a14c2fb1f
MD5 47070f4eb273926127373680c5312724
BLAKE2b-256 d52dee5488634b15f78ee167afa123797049e9d91601993589f687cddb69b277

See more details on using hashes here.

File details

Details for the file printStatus-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: printStatus-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for printStatus-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 078a89430cb62f2191a9bc768d1b974ca91fb271a3a7ea8f96860019848f131d
MD5 9fe218eb06bf42bcf4bfcf2850e533f8
BLAKE2b-256 8dd0c69dbae9309487ff1de83404b35201a71389aeeee8d174cb50a596a448d6

See more details on using hashes here.

Supported by

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