Skip to main content

Easy to make progress bars

Project description

Progress Indicators for Python

pypi

demo

Quick-Start Guide

import consloadingbar, time # import time for later use

lb = consloadingbar.Bar()

There are 3 different types of indicators to chose from:

  • progressBar
  • progressCircle
  • progressStack

progressBar()

You params from the Bar() class to customize this. This means you can change what characters to use including the empty chars, see the demo above.

You can also specify taskCount, and eta.

lb = consloadingbar.Bar(useColor=True, taskCount=10)

start = time.time()

for i in range(101):
    currentTime = time.time() - start
    lb.progress(i, time_=currentTime, tasksDone=i//10)
    time.sleep(0.01)

You can call the start() method to show an empty bar, and the end() method to show a full bar:

Finished
        |████████████████████| 100%

progressCircle()

This is used to show a spinner go round in a circle pattern. See demo above. To call just tell it when to stop using time, or stop() param.

lb.progressCircle(time_=2) # Will run for 2 seconds

progressStack()

This is used to show 1 character change in any fashion. The default is a stack, but you can change it using the phases param from Bar().

lb.progressStack(0) # That number is the phase index of the phase list. 0 In the default case is ' ' a space

Installation

Install via pip using pip install ConsLoadingBar.

pip install ConsLoadingBar

To make sure you have the current version you can use this command instead:

pip install --upgrade ConsLoadingBar

You can also directly call the module from python:

python3 -m pip install ConsLoadingBar

License

ConsLoadingBar is licensed under the MIT License


Documentation Version 3.0 - Module Version 2.0.0 - PyPi Release 8

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

ConsLoadingBar-2.0.0.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

ConsLoadingBar-2.0.0-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

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