--- id: tqdm-loggable version: "0.4.1" license: MIT license_treatment: permissive maintenance: active --- # tqdm-loggable — TQDM progress bar helpers for logging and other headless application License: permissive · Maintenance: active · Downloads: 1.4M/mo ## 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 above — 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 pip install tqdm-loggable uv add tqdm-loggable 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_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags tqdm logging headless, progress bar logging, non-interactive progress reporting, tqdm structured logging, background worker progress tracking, docker container progress logging, headless progress bar, logging-integration, progress-tracking, headless-environments [View on SkillFed](https://skillfed.io/packages/tqdm-loggable) · [View on PyPI](https://pypi.org/project/tqdm-loggable/)