TQDM context manager thread
Project description
tqdm-thread
When you want to show that something is working, but don't have an iterable. For example, if you're loading a large Pickle file and want to show progress. All kwargs work as expected with tqdm with a couple exceptions:
step_sec
-- this is new. how many seconds to sleep between steps. default:1.0
total
-- since we don't actually know the total, this create a new progress bar everytotal
steps. default:None
- default
bar_format
is different; iftotal
then '{desc} {bar} {elapsed}' else '{desc} {elapsed}'
import time
from tqdm_thread import tqdm_thread
with tqdm_thread(desc="doing serious work"):
# no total; no pogress bar; just a counter
time.sleep(10)
with tqdm_thread(desc="doing serious work", total=10):
# adding 'total' means that you will get a bar
time.sleep(10)
with tqdm_thread(desc="doing serious work", total=5):
# here, two progress bars will be created
time.sleep(10)
Tests
# pip install pytest
pytest -vs .
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
tqdm-thread-0.1.1.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file tqdm-thread-0.1.1.tar.gz
.
File metadata
- Download URL: tqdm-thread-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68be0f2ef7ce1fa0f444f1748795d80e3c4912739092993ced8e2caa6571e66b |
|
MD5 | 80d0c6e5965f844fd026aa91ac470618 |
|
BLAKE2b-256 | d0b57f3c6816597868eb585f85fad9e0052b297add78b8dfb8f7d4f71c80713c |
File details
Details for the file tqdm_thread-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: tqdm_thread-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d19805dab829bdcbb6eaef66183f1be04961bdeeb1c19da874563cf995f8f3c |
|
MD5 | 92402d8c6418715ce0ae0d9e16886547 |
|
BLAKE2b-256 | c00da34b2e77794a17280d89833b540d17b886459cf44c7517cbe9722fa88370 |