Skip to main content

A simple example of a Python library

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.

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.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for progress_basic-0.1.tar.gz
Algorithm Hash digest
SHA256 bc0375d7bf2d28df3f3e5689f40f6136846b1805880fb9e2b9e178846f643359
MD5 51df5a015bf9b28a2f6b7600721a6d17
BLAKE2b-256 0768a4ea767ab1a5bc06dd7b98a9f4d28cdc7e9ea650886ee82e3979aa9dc09d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for progress_basic-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b29c6ae4efc5ded8866cdcdef41142f791c734ecd843b91bf13e5f2a4175cb6
MD5 232f8fc9bf0117f11deeca32f45f1efc
BLAKE2b-256 32f94a589e60d7ec4e2068e719085bc418691443ce0694102db0d4207d726168

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