Skip to main content

This package implement customizable progress bar and rotating animations.

Project description

PyProgressTerm

Description

This package implement a customizable progress bar and rotating animation.

  • timed progress bar
  • colored progress bar
  • rotating animation in progress bar

Requirements

This package require:

  • python3
  • python3 Standard Library

Installation

pip install PyProgressTerm

Usages

Command line

ProgressTerm -h                                # Help message
ProgressTerm -r                                # Rotating animation
ProgressTerm -m rotating                       # Progress bar with rotating animation
ProgressTerm -m timed                          # Timed progress bar
ProgressTerm -m colored -C magenta             # Colored progress bar (background magenta)
ProgressTerm -m colored -c blue                # Colored progress bar (foreground blue)
ProgressTerm -s 75                             # The progress bar size is 75 characters
ProgressTerm -p "#"                            # The progress characters of the progress bar
ProgressTerm -e " "                            # Empty characters of the progress bar
ProgressTerm -l "|"                            # Last delimiter of the progress bar
ProgressTerm -f "|"                            # First delimiter of the progress bar
ProgressTerm -i 0.2                            # Step time is 0.2 seconds
ProgressTerm -T "Progress bar"                 # Text (action description)
ProgressTerm -L 10                             # Text max length
ProgressTerm -P "..."                          # Text placeholder
ProgressTerm -t 50                             # Number of steps

ProgressTerm                                   # Basic progress bar
python3 -m PyProgressTerm                      # Basic progress bar
python3 PyProgressTerm.pyz                     # Basic progress bar

Python script

from PyProgressTerm import Progress

progress = Progress()
progress.thread_infinity_run()
import PyProgressTerm
import asyncio

progress = PyProgressTerm.Progress()
asyncio.run(progress.async_infinity_run())
from PyProgressTerm import Progress
from time import sleep

progress = Progress()

for step in range(256):
    progress.colored_progress_bar(
        step, 
        total=255, 
        first_delimiter="Progress... |", 
        function_name="timed_progress_bar", 
        background="default", 
        foreground="green",
    )
    sleep(0.2)

print()
progress.colored_progress_bar(
    50, 
    function_name="timed_progress_bar", 
    background="green", 
    foreground="default",
)

for step in range(51):
    progress.colored_progress_bar(
        step, 
        total=50, 
        function_name="rotating_progress_bar", 
        background="default", 
        foreground="green",
    )
    sleep(0.2)

progress.thread_infinity_run(function_name="rotating_animation")

Links

Pictures

Basic progress bar Timed progress bar Colored progress bar

License

Licensed under the GPL, version 3.

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

PyProgressTerm-0.0.2.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file PyProgressTerm-0.0.2.tar.gz.

File metadata

  • Download URL: PyProgressTerm-0.0.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2

File hashes

Hashes for PyProgressTerm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f8e1052c04f06ae3860c30b47ff9df9641812a924ef24be93612fa89d7c6fb1f
MD5 306371dbab2795234160a2c4f82c9241
BLAKE2b-256 d0bb120238fd36fa83f9f0f437eb38be5c3a41dbc191a76048d3960358b36c08

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