Wrap standard-library logging to support TQDM progress-bars.
Project description
TQDM logging wrapper
Wrap standard-library logging to support TQDM progress-bars.
Installation
pip install tqdm-logging-wrapper
Usage
import logging
import tqdm
import tqdm_logging_wrapper
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
items = [1, 2, 3]
items_iter = tqdm.tqdm(items)
logger.info(f"Items: {items}")
with tqdm_logging_wrapper.wrap_logging_for_tqdm(items_iter), items_iter:
for item in items_iter:
logger.info(f"Item: {item}")
logger.info(f"Items: {items}")
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
File details
Details for the file tqdm-logging-wrapper-1.0.1.tar.gz
.
File metadata
- Download URL: tqdm-logging-wrapper-1.0.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072d00d3fc915af1191e65af8840039cefa623e17c119dba485206dfa41dd440 |
|
MD5 | a186030275befcd20a0a26638c1ff6a4 |
|
BLAKE2b-256 | 06a1debf3b48ee1aacc19f160592fca3cbd4b4ca5efc86f9f21e0e1d4be555d2 |
File details
Details for the file tqdm_logging_wrapper-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: tqdm_logging_wrapper-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa77a881ce49d56a6f3530bd64d19204b32163430983fe33aa745b18263f6222 |
|
MD5 | 1cdd9f7ab3c108f7257742b5f596a8d0 |
|
BLAKE2b-256 | 0514c34693db4831832e1a4ac1d8ff41971b0894ce70d9ba5baa035500ff782b |