A tiny IO wrapper for tqdm.
Project description
tqdmio
tqdmio is a tiny IO wrapper for tqdm.
Use it to wrap any IO object tqdmio(open(path)) to display a progress bar
while reading or writing files.
Use the convenience function tqdmio.open(path) to open a file with a progress bar.
When reading files, it will automatically detect the file size using
pathlib.Path.stat().st_size.
By default, the progress will be shown in kb/s, Mb/s, Gb/s, etc.
You can customize the progress bar by passing tqdm arguments to the tqdmio constructor.
When wrapping compressed files, use tqdmio.open(file, "rb") or wrap the raw IO[bytes] using tqdmio(open(file, "rb")) and pass it to the reader, e.g.:
import gzip
from tqdmio import tqdmio
with tqdmio.open("file.txt", "rt") as fp:
for line in fp:
pass
with tqdmio.open("file.gz", "rb") as fgz:
for line in gzip.open(fgz, "rt"):
pass
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 tqdmio-0.1.0.tar.gz.
File metadata
- Download URL: tqdmio-0.1.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea0fa0e5b374e86cd735893a5d7ac5cacb3ae7f27807975f4c91faee04b9434
|
|
| MD5 |
5948ed32feec9fba1f4d139c3209ecb2
|
|
| BLAKE2b-256 |
0b6df0fd09c6a6b9e00c91ef996ff187c88c641f57a8df909f4292df879a1e8e
|
File details
Details for the file tqdmio-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tqdmio-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c7d12d2fd321c0277903e4d268a24084805205fac33694fa36e6f494f1e2cb4
|
|
| MD5 |
f74f7e921232abd89d06ea61ae186eab
|
|
| BLAKE2b-256 |
1973a824e60cfa99d670408232af59328a291d99126f8b575a4cef6b324177c3
|