https://github.com/splch/py-basic-bar
A simple and efficient progress bar in Python
https://github.com/splch/py-basic-bar
progress-bar
Last synced: 2 months ago
JSON representation
A simple and efficient progress bar in Python
- Host: GitHub
- URL: https://github.com/splch/py-basic-bar
- Owner: splch
- License: mit
- Created: 2023-06-02T07:46:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-21T22:43:43.000Z (about 2 years ago)
- Last Synced: 2026-03-02T10:23:48.346Z (4 months ago)
- Topics: progress-bar
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Basic Bar
Basic Bar is a simple and effective text-based progress bar for Python applications. It's lightweight and easy to integrate, making it perfect for monitoring the progress of iterable operations with visual feedback and estimated completion times.
## Installation
You can install Basic Bar directly from PyPI:
```bash
pip install basic-bar
```
## Usage
To use Basic Bar, simply wrap any iterable in the `bar()` function. This function will yield from the iterable and display a progress bar in the terminal.
### Example
Here's a basic example of how to use Basic Bar:
```python
from basic_bar import bar
import time
# Example iterable
data = range(100)
# Wrapping the iterable with the bar function
for item in bar(data):
time.sleep(0.01) # Simulate some work
```
This will display a progress bar in your terminal, updating with each iteration.
### Customization
You can customize the length of the progress bar by providing a `length` parameter:
```python
for item in bar(data, length=50):
time.sleep(0.01) # Simulate some work
```
## Features
- **Simple Integration**: Just wrap your iterable with `bar()`.
- **Customizable Bar Length**: Adjust the length of the progress bar to fit your needs.
- **Real-Time Updates**: Provides real-time feedback on progress with percentage completion and estimated time remaining.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.