Code Monkey home page Code Monkey logo

patsuckow / spb Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 76 KB

spb - Simple Progress Bar. This module allows you to display, in the console, a progress indicator and other indicators of any process you need.

Home Page: https://pypi.org/project/spb/

License: GNU General Public License v3.0

Python 100.00%
progress progress-bar progressbar progress-indicator percent-indicator timer-indicator data-rate-indicator transmitted-data-indicator console-progress bar

spb's Introduction

spb - Simple Progress Bar

This module allows you to display, in the console, a progress indicator and other indicators of any process you need.

Indicators that can be displayed:

  • progress indicator
  • percent indicator
  • timer indicator
  • data rate indicator
  • transmitted data indicator

Any indicator, if desired, can be either turned on or off or displayed with default settings, or you yourself can configure multiple parameters for any indicator you need.

Support: Donate via PayPal or Buy us a Cofee

How to install:

From PyPI and in the inside of your virtual environment:

pip3 install spb

From sources:

Alternatively you can install spb from sources directory:

git clone https://github.com/patsuckow/spb
cd spb
pip3 install -r requirements.txt
pip3 install . --user
cd ..
rm -rf spb

How to import in your project:

from spb import SimpleProgressBar as spb

Requirements:

See in file requirements.txt

spb works with version or higher.

What are the required modules inside spb:

  • import sys
  • import time
  • import shutil
  • from typing import Union
  • from collections import deque

Examples:

Base examples:

Basic use cases. We display the progress bar itself and the percentage indicator with different settings. All possible options for setting parameters, see the documentation.

Here is not show the display of file transfer rate indicators and the number of transmitted data.

Other configuration options (variant_brackets, variant_arrow and variant_space) can be found here.

Examples of using:

How uses a load file indicator and progress bar indicator (the type of indicator will depend on the settings that you set)

Documentation:

All english documentation can be found in - wiki

All possible settings (parameters) can be found in the this page - parameters.

Русская документация - wiki

Все возможные настройки (параметры) можно найти на этой странице - parameters.

Tests:

Unit-tests - test_spb.py

Run tests:

python3 -m unittest discover

Notes:

  1. Unicode-symbols values that can be used for parameters, can be taken from the Unicode table. You can copy Unicode characters, for example, from this site: https://unicode-table.com/en/

  2. By default, the width of the console window is different on different systems, but on average 80 columns. If you do not expand the console window to full screen, then this will not be enough to display all the possible indicators and inscriptions in the progress bar line. But thanks to the settings, you can display those indicators, icons and exchanges of indicators that you need and hide what you do not need.

  3. For recording gifs, was used the console utility peek - Simple animated GIF screen recorder with an easy to use interface https://github.com/phw/peek

Licence:

GNU GPL v 3 0

Authors:

Alexey Patsukov 🇷🇺 - GitHub profile

Submit issues

If you spotted something weird in application behavior or want to propose a feature you are welcome.

Write code

If you are eager to participate in application development and to work on an existing issue (whether it should be a bugfix or a feature implementation), fork, write code, and make a pull request right from the forked project page.

Spread the word

If you have some tips and tricks or any other words that you think might be of interest for the others — publish it wherever you find convenient.

spb's People

Contributors

patsuckow avatar

Stargazers

 avatar

Watchers

 avatar  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.