Skip to main content

ProgressBars

A python package to display progress of loops to the user.

Installation

This package can be installed using pip.

pip install progressbars

Usage

The class you'll be using is called the ProgressBar class, here is an example of how to use it.

from progressbars import ProgressBar, widgets

def isPrime(n: int) -> bool:
    "A very slow algorithm to calculate if a given number is prime."

    for i in range(2, n):
        if n % i == 0:
            return False
    return n > 1

# Create an empty list to store the primes we find
primes = []

# Create a colorless progress bar that uses all the default widgets
bar = ProgressBar([
    widgets.Percentage,
    widgets.IterationSpeed,
    widgets.Counter,
    widgets.ElapsedTime,
    widgets.RemainingTime
], color=None)

# Loop through all numbers from 0-30_000
for i in bar(range(30_000)):
    if isPrime(i): # If the current number is prime, append it to the primes list
        primes.append(i)

# Print how many primes we found
print("\nFound", len(primes), "primes!")

Metadata

Release files for progressbars 1.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for progressbars 1.1.10
File Size Uploaded
progressbars-1.1.10.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for progressbars 1.1.10
File Interpreter ABI Platform
progressbars-1.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / progressbars-1.1.10.tar.gz

Download URL progressbars-1.1.10.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d3290e881f35e0c6972e9f5dd725aa78e740ffa62328035c9cb4fe164c665274
BLAKE2b-256 checksum
How to use checksums
76848d90932c9266eb9723cab707e51ccb2a120c1023ad4c6f3583bd36ea060f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / progressbars-1.1.10-py3-none-any.whl

Download URL progressbars-1.1.10-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
494625e243213fc4d7487e5b003833d78ae04cadf1067bdec074bc9dfc5643ca
BLAKE2b-256 checksum
How to use checksums
50b0a1e081da74afa7be4c7d385d03ba53a2d543c0cb36d5a96967507e881c0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.1.10 This release

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page