Minimal progress bar
Project description
barre
Install
pip install barre
Usage
Simple and intuitive:
from barre import b
from time import sleep
# Simple iteration
for x in b(range(100)):
sleep(0.1) # your work here
# With any iterable
items = ["item1", "item2", "item3"]
for x in b(items):
process(x)
Output:
[|||||||||||||||||||| ] 50/100
Real-world Examples
Processing Files
from barre import b
import os
# Process all images in a directory
image_files = [f for f in os.listdir("images/") if f.endswith((".jpg", ".png"))]
for file in b(image_files):
with open(f"images/{file}", "rb") as img:
# Your image processing here
pass
API Requests
from barre import b
import requests
# Download multiple URLs with progress
urls = [
"https://api.example.com/data1",
"https://api.example.com/data2",
"https://api.example.com/data3",
]
responses = []
for url in b(urls):
response = requests.get(url)
responses.append(response.json())
Data Processing
from barre import b
import pandas as pd
# Process chunks of a large DataFrame
df = pd.read_csv("large_file.csv")
chunk_size = 1000
chunks = [df[i:i+chunk_size] for i in range(0, len(df), chunk_size)]
results = []
for chunk in b(chunks):
result = chunk.groupby('category').sum()
results.append(result)
Long Computations
from barre import b
import numpy as np
# Heavy computations with visual feedback
matrices = []
for i in b(range(100)):
matrix = np.random.rand(100, 100)
result = np.linalg.eig(matrix)
matrices.append(result)
Training ML Models
from barre import b
# Training epochs with progress
epochs = 100
for epoch in b(range(epochs)):
model.train_epoch()
loss = model.evaluate()
Features
- Minimal: Single file (<1KB)
- Fast: Zero dependencies
- Simple: No configuration needed
- Clean: Professional ASCII output
- Universal: Works with any iterable
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file barre-1.0.13.tar.gz.
File metadata
- Download URL: barre-1.0.13.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05847f30ae0c050ed1ddbdf855b9c206f3911eb7e9615c19b1513183d3554300
|
|
| MD5 |
6ce3157f1822961c58fdbdf6cc1ac6e2
|
|
| BLAKE2b-256 |
949cf526d4a0499a4c4a21d8d76d7359614075c5b9004c6fa337428b5c7d9039
|
Provenance
The following attestation bundles were made for barre-1.0.13.tar.gz:
Publisher:
release.yml on FeelTheFonk/barre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barre-1.0.13.tar.gz -
Subject digest:
05847f30ae0c050ed1ddbdf855b9c206f3911eb7e9615c19b1513183d3554300 - Sigstore transparency entry: 173493893
- Sigstore integration time:
-
Permalink:
FeelTheFonk/barre@b445539edd7cda4f2c8aef31b2dff86a17b9ede8 -
Branch / Tag:
refs/tags/v1.0.13 - Owner: https://github.com/FeelTheFonk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b445539edd7cda4f2c8aef31b2dff86a17b9ede8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file barre-1.0.13-py3-none-any.whl.
File metadata
- Download URL: barre-1.0.13-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb28db84dcde59317970efd1f5c25e7b7c23fe3ec14d7b4165080ed1b2d71b8
|
|
| MD5 |
2cde5251fba266b9fe2c3048f2c00a02
|
|
| BLAKE2b-256 |
ac9428b349e55f304f71e6898f14dc7ecfd2b59670ee19253fc63730b64a8778
|
Provenance
The following attestation bundles were made for barre-1.0.13-py3-none-any.whl:
Publisher:
release.yml on FeelTheFonk/barre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barre-1.0.13-py3-none-any.whl -
Subject digest:
fcb28db84dcde59317970efd1f5c25e7b7c23fe3ec14d7b4165080ed1b2d71b8 - Sigstore transparency entry: 173493895
- Sigstore integration time:
-
Permalink:
FeelTheFonk/barre@b445539edd7cda4f2c8aef31b2dff86a17b9ede8 -
Branch / Tag:
refs/tags/v1.0.13 - Owner: https://github.com/FeelTheFonk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b445539edd7cda4f2c8aef31b2dff86a17b9ede8 -
Trigger Event:
push
-
Statement type: