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
Metadata
Release files for barre 1.1.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 | |
|---|---|---|---|
| barre-1.1.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| barre-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / barre-1.1.0.tar.gz
| Download URL | barre-1.1.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1577a851bab017c2a4f4e1fc647288f0dfb1e4c6193312a0d769d9549afb43af
|
|
BLAKE2b-256 checksum How to use checksums |
361b6ec8330f3c0c231616636a96789fdcfc4dea2a79735dc0a37d876ad4e97b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 22, 2025.
Transparency logRelease files / barre-1.1.0-py3-none-any.whl
| Download URL | barre-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc4238ebaa9ad0be922a13462bdd2e7a4fa8603c3491ad2b970b9f2e6720e0a0
|
|
BLAKE2b-256 checksum How to use checksums |
89716622c4c64ce5463171adf288b2d662ba49c376a99fac711c1e085b5fa295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 22, 2025.
Transparency log