Skip to main content

TQDM Logger

A utility to log tqdm progress bars into a file instead of stdout.

Description

Well we all use tqdm progress bars to track the progress of a running code. Sometimes we would like to log those progress bars in a log file instead of stdout. Using tqdm as is has a problem. It write each update in a newline. This utility is to solve this problem and be able to update progress bars inplace.

General Usage

Use the TqdmLogger class to declare a log stream handler with a log file, and pass that to tqdm's file argument. Thats it!!!

Example Usage

import time
from tqdm_logger import TqdmLogger

log_file = 'temp_log.log'
tqdm_stream = TqdmLogger(log_file)

tqdm_stream.reset()

for x in tqdm(range(100), file = tqdm_stream):
    time.sleep(.5)

Metadata

Release files for tqdm-logger 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tqdm-logger 1.0.1
File Size Uploaded
tqdm_logger-1.0.1.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tqdm-logger 1.0.1
File Interpreter ABI Platform
tqdm_logger-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / tqdm_logger-1.0.1.tar.gz

Download URL tqdm_logger-1.0.1.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e8cb19b5c4b64aa8c4d281eec7905bc50ee63bd6d0592af081e692ad2bf9ff76
BLAKE2b-256 checksum
How to use checksums
26ca5b642bb2d3dffa3bf3e54c69410c6aa6d504a5d408ae0927e87796f565ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13

Release files / tqdm_logger-1.0.1-py3-none-any.whl

Download URL tqdm_logger-1.0.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83555ca8b73463cedb889ecd6ed124c83bf1764de8162f560c5add8ff0297e52
BLAKE2b-256 checksum
How to use checksums
d50393311a3bb79ce14faa34a894c3f0d246d1ba942268de70a2bdebcc434302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page