Skip to main content

A Python library for displaying progress indicators and progress bars in the console with customizable messages and colors.

Project description

Progress Indicator Library

A Python library providing two classes for displaying progress indicators in the console: ProgressIndicator and ProgressBar. These classes help visualize ongoing tasks by displaying an animated spinner or a progress bar, respectively.

Publish PyPI version

Python Versions

Installation

To install the library, you can use pip:

pip install progress_basic

Usage

ProgressIndicator

The ProgressIndicator class displays an animated spinner with a customizable message and color.

Example

from progress_basic.format.color_text import AnsiColors
from progress_indicator import ProgressIndicator

with ProgressIndicator("Processing", color=AnsiColors.OKBLUE) as pi:
    # Simulate a long-running task
    time.sleep(5)

ProgressBar

The ProgressBar class displays a progress bar that updates as tasks progress, with customizable total steps, message, interval, bar length, and color.

Example

from progress_basic.format.color_text import AnsiColors
from progress_bar import ProgressBar

total_steps = 100

with ProgressBar(total_steps, message="Loading", color=AnsiColors.OKBLUE) as pb:
    for i in range(total_steps):
        pb.update(i + 1)
        time.sleep(0.1)  # Simulate work

Classes

ProgressIndicator

A class for displaying an animated spinner with a customizable message and color.

ProgressBar

A class for displaying a progress bar that updates as tasks progress, with customizable total steps, message, interval, bar length, and color.

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

progress_basic-0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

progress_basic-0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file progress_basic-0.2.tar.gz.

File metadata

  • Download URL: progress_basic-0.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for progress_basic-0.2.tar.gz
Algorithm Hash digest
SHA256 9d34c78647d78ee74265252ce76d52954ff3467e2b73dc2fe15f335c54585abc
MD5 fbd0d1778fcce639426d1139f1e8bbef
BLAKE2b-256 1dce004f9cfe26e1b588835a78a7833761d3ca8967200c27b779cc64daa1a452

See more details on using hashes here.

File details

Details for the file progress_basic-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for progress_basic-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c6cb802be2e9965935ac9e7f81e6f3cbe5147fb0850bc4ea3151052b28ea91e
MD5 37766f480d9a969a40c4cb86c161e427
BLAKE2b-256 ddcba3e32e8d72c034036fbd69b01179570fa2986e62cab45ef3abd9c135852f

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