skillfed

tqdm-loggable

TQDM progress bar helpers for logging and other headless application

tqdm-loggable v0.4.1 1.4M downloads/30d#3,968 on PyPI42
Permissive license MIT Active released

What it is and what it does

tqdm-loggable is a wrapper around tqdm that automatically detects non-interactive environments (Docker containers, background workers, log aggregation systems) and redirects progress bar output to Python's logging subsystem instead of the terminal. In interactive sessions, it behaves identically to standard tqdm; in headless environments, it emits structured log messages at configurable intervals so that progress updates appear in log files and monitoring tools like Sentry, Logstash, and Datadog rather than disappearing silently.

The package is designed as a drop-in replacement requiring only an import change to tqdm_loggable.auto. It preserves all tqdm functionality including progress descriptions, postfix data, and rate calculations, but formats them as log records that work with structured logging backends. You can override auto-detection via the TQDM_LOGGABLE_FORCE environment variable to force terminal or logging mode, and it includes special handling for Jupyter-like notebook environments.

Use it for:

  • Monitor long-running ML training tasks in Docker containers where terminal output is unavailable.
  • Track background worker progress in log aggregation systems like Logstash or Datadog without silent gaps.
  • Report progress from edge computing or serverless functions that have no interactive terminal.
  • Integrate tqdm progress into Sentry error tracking with structured logging for better visibility.
  • Maintain progress visibility in CI/CD environments like GitHub Actions where stdout is captured.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts tqdm progress bars to logging-friendly messages in headless environments, automatically switching from interactive terminal output to structured log lines when stdout is unavailable.

Yes. The package solves a real problem—silent progress bars in headless environments—with minimal friction (one dependency, low install cost, active maintenance). It is a true drop-in replacement that requires only an import change and is safe to deploy in production. MIT licensing and zero known vulnerabilities make it a low-risk addition to any Python project using tqdm in non-interactive contexts.

Install

tqdm-loggable on PyPI

pip

pip install tqdm-loggable

uv

uv add tqdm-loggable

poetry

poetry add tqdm-loggable

Installing tqdm-loggable

Before you install

Low friction: pure Python wheel with a single runtime dependency on tqdm. Actively maintained as of 2026-03-16 with recent activity.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

import logging
from tqdm_loggable.auto import tqdm
from tqdm_loggable.tqdm_logging import tqdm_logging

logging.basicConfig(level=logging.INFO)
tqdm_logging.set_log_rate(__import__('datetime').timedelta(seconds=10))

with tqdm(total=1000, desc="Task") as pbar:
    for i in range(1000):
        pbar.update(1)

Requires Python 3.10 or later; logging must be configured before use.

Verify before relying

  • Performance overhead of logging-based progress reporting compared to terminal output in high-frequency update scenarios.
  • Compatibility with all tqdm extensions and third-party integrations beyond tqdm.auto.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — tqdm
Maintenance actively maintained — 151 days since the last release
Last repo commit
First released
Downloads 1,389,189/month — #3,968 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tqdm_loggable-0.4.1-py3-none-any.whl

Keywords: logging, tqdm, sentry, logstash, progress bar, datadog, new relic

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

tqdm logging headlessprogress bar loggingnon-interactive progress reportingtqdm structured loggingbackground worker progress trackingdocker container progress loggingheadless progress bar
logging-integrationprogress-trackingheadless-environments

More Monitoring packages