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.0.6.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for tqdm_thread-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b602e03038b5f413fc73f79c3f0e02b69deb3b0dc72ebafbc09c91a0868d4a44 |
|
MD5 | bea703d696cd8f524fc4aa7e91a4661a |
|
BLAKE2b-256 | e9a07d513308260bd517fbc3e92a38691abf8adb777473b5d72804f94da9e882 |