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.
🚀 Features
- ✅ Simple and lightweight (no external dependencies)
- ✅ Customizable progress bar length and characters
- ✅ Supports named tasks
- ✅ Works with any iterable
📦 Installation
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
🛠 Usage
Basic Progress Bar
from tinyprogress import progress
import time
for i in progress(range(100)):
time.sleep(0.05) # Simulating work
Custom Progress Bar Length
for i in progress(range(100), bar_length=50):
time.sleep(0.05)
Named Task Progress Bar
for i in progress(range(100), task_name="Downloading"):
time.sleep(0.05)
Using Custom Characters
for i in progress(range(100), fill_char='#', empty_char='-'):
time.sleep(0.05)
Using Custom Colors
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
#...
🤝 Contributing
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.
📜 License
GNU General Public License v3, see LICENSE file.
Metadata
Release files for tinyprogress 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinyprogress-1.2.0.tar.gz | 17.2 kB | Without provenance | Details for tinyprogress-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinyprogress-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for tinyprogress-1.2.0-py3-none-any.whl |
Total release size: 33.4 kB
Release files / tinyprogress-1.2.0.tar.gz
| Download URL | tinyprogress-1.2.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bd61e540f50b8c6ddc441088bfbd824acaeee6f7ed0dfdb07a8c50370a10b5c
|
|
BLAKE2b-256 checksum How to use checksums |
0e0c0b55de0e0e3764cfbce6ccba845cccaddcb09eb45989c1d57c8a1ec90d1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / tinyprogress-1.2.0-py3-none-any.whl
| Download URL | tinyprogress-1.2.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d45c6682385be5157f90d7e8f7d8fc6c467b6bd2103ff23a934ce5d49bbf1a8
|
|
BLAKE2b-256 checksum How to use checksums |
06c741d45507af451b797ae952f757c38e837d9764644c54b503f5e1fc467e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for tinyprogress 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.