
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
TinyProgress is a minimal and lightweight progress bar module for Python. It provides an easy way to track progress in loops and iterables without requiring external dependencies.
Since TinyProgress is a single-file module, you can simply copy tinyprogress.py
into your project.
Alternatively, install it via pip (once published to PyPI):
pip install tinyprogress
from tinyprogress import progress
import time
for i in progress(range(100)):
time.sleep(0.05) # Simulating work
for i in progress(range(100), bar_length=50):
time.sleep(0.05)
for i in progress(range(100), task_name="Downloading"):
time.sleep(0.05)
for i in progress(range(100), fill_char='#', empty_char='-'):
time.sleep(0.05)
def bar_color(progress: float) -> str:
if progress < 0.7: # 70%
return '\033[31m'
return '\033[32m'
def text_color(progress: float) -> str:
return '\033[35m'
for i in progress(
range(100),
task_name='Colored bar',
fill_char='—',
start_char=' ',
end_char=' ',
bar_color=bar_color,
text_color=text_color
):
time.sleep(0.05)
You can also use the Colorama module to set the colors.
from colorama import Fore
def bar_color(progress: float) -> str:
if progress < 0.7: # 70%
return Fore.RED
return Fore.GREEN
#...
First of all, thank you if you are interested in contributing to this project. To contribute, please carefully read the CONTRIBUTING file and follow its guidelines.
GNU General Public License v3, see LICENSE file.
FAQs
A lightweight progress bar for Python without dependencies.
We found that tinyprogress demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.