🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

shadowbar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shadowbar

A simple to use process based progress bar

0.1.3
PyPI
Maintainers
1

Shadowbar, a simple process based progress bar

Getting started

from shadowbar import ProgressBar

progress, pbar = ProgressBar.new(length, total, refresh_rate=0.5)

Parameters

  • Length specifies the amount of characters the progress bar will span in the console
  • Total specifies the amount of tasks that will be executed
  • Refresh rate is the delay between updates. To short delays will lead to flickering in the console. The recommended and default value is 0.5

Returns

  • Progress is an integer shared value from multiprocessing import Value
  • Pbar is the ProgressBar object instantiated through ProgressBar.new()

Examples

from shadowbar import ProgressBar
from time import sleep

progress, pbar = ProgressBar.new(50, 100)

for _ in range(100):
	progress.value += 1
	sleep(0.5)

pbar.wait_complete()
print("Task is done!")

pbar.wait_complete() ensures that the process is done before continuing

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts