Giter Site home page Giter Site logo

mauricelambert / pyprogressterm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 36 KB

This package implement a customizable progress bar and rotating animation.

License: GNU General Public License v3.0

Python 100.00%
pypi-package python3 progress-bar terminal console animation

pyprogressterm's Introduction

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.

pyprogressterm's People

Contributors

mauricelambert avatar

Stargazers

5l1v3r1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.