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_basic.progress_basic 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_basic.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.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

progress_basic-0.5-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: progress_basic-0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 8bb4e97261735015eb8d68395564227e2c0353c2fff054d9cef099ad95cc3126
MD5 204404a12c9af2cd76c3574294037dce
BLAKE2b-256 59e368d23f5e917cfc5046155f71072400f65c2a985f023e6088721fea84524f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for progress_basic-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 703e2c51724b957aacb9717b636ae45b0fcd1b343ccbb2d4ec1f919220bf9332
MD5 b0519d291c79d15008c5ea3aaf46d7ad
BLAKE2b-256 89de628b29c19a432f4888cacca87abd8bafcac4799a10f10f8beb03808db841

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