Registry / observability / proglog

proglog

JSON →
library0.1.12pypypi✓ verified 26d ago

Proglog is a progress logging system for Python (current version 0.1.12). It enables developers to build complex libraries while offering users fine-grained control over logs, callbacks, and progress bars. It is actively maintained with releases focusing on build system improvements and documentation.

pip install proglog
INSTALL
IMPORT
SIG · PROGLOG
P
proglog
observabilitypythonv0.1.12
Install
1.7s avg
Import
153ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.158s · 18.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.148s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default_bar_logger
from proglog import default_bar_logger
Common entry point for obtaining a logger configured for console, notebook, or silent operation.
TqdmProgressBarLogger
from proglog import TqdmProgressBarLogger
Used for integrating with the popular tqdm library for progress bars.
notebook
import proglog proglog.notebook()
Globally configures proglog to use HTML progress bars in Jupyter/IPython notebooks.

This quickstart demonstrates how to integrate `proglog` into a function to manage progress bars. It shows usage with the default console bar, an explicit `TqdmProgressBarLogger`, and disabling the bar. For Jupyter notebooks, `proglog.notebook()` should be called once to activate HTML bars.

import time from proglog import default_bar_logger, TqdmProgressBarLogger def my_processing_function(data_items=10, logger='bar'): """A function that simulates work and uses proglog for progress.""" logger = default_bar_logger(logger) # Initialize logger based on input string or object results = [] for i in logger.iter_bar(iterable=range(data_items), message="Processing data"): # Use 'iterable' for cleaner iteration # Simulate some computational work time.sleep(0.05) results.append(i * 2) return results print("--- Running with default console progress bar ---") my_processing_function(data_items=5) print("\n--- Running with TQDM progress bar (explicitly passed) ---") tqdm_logger_instance = TqdmProgressBarLogger() # Create an instance of a specific logger my_processing_function(data_items=7, logger=tqdm_logger_instance) print("\n--- Running with no progress bar ---") my_processing_function(data_items=3, logger=None) # To enable notebook specific bars, one would typically call proglog.notebook() once # at the start of a Jupyter notebook session, before calling functions that use proglog. # For example: # import proglog # proglog.notebook() # my_processing_function(data_items=5)
Debug
Known issues
gotchaWhen using `proglog.notebook()` to enable HTML progress bars, this setting applies globally to the current Python process. If different parts of an application (e.g., a script vs. an interactive session within the same process) require different progress bar behaviors (console vs. HTML), this global state can lead to unexpected display modes.
fix
For fine-grained control, explicitly pass specific logger instances (e.g., `TqdmProgressBarLogger()` or a custom console logger) to functions instead of relying solely on the global `proglog.notebook()` effect or string shortcuts like `logger='bar'`.
affects: All versions
gotchaIn complex applications with nested `iter_bar` calls across multiple libraries, progress bars might interfere with each other if they implicitly use the same internal identifiers. This can lead to incorrect or confusing progress displays, especially if loop variables or names are not unique.
fix
To prevent namespace collisions in nested progress bars, provide a unique `bar_prefix` argument to `logger.iter_bar()` calls within different libraries or components. For example, `logger.iter_bar(..., bar_prefix='my_library_')`.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'proglog'
The `proglog` library has not been installed in the Python environment, or the environment where it's installed is not the one being used.
fix
Install the library using pip: `pip install proglog`
AttributeError: module 'proglog' has no attribute 'default_handler'
This error can occur if you try to access `proglog.default_handler` before `proglog.default_logger` has been initialized, or if an older version of proglog is used where this attribute might not be directly exposed or has a different name.
fix
Ensure `proglog.default_logger` is initialized or accessed first, which implicitly sets up the handler. If the issue persists, explicitly create and add a handler, or check the `proglog` documentation for the correct way to access or configure handlers in your specific version.
TypeError: __init__() got an unexpected keyword argument 'display_progress_bars'
This error suggests that the `Logger` class (or a similar component in `proglog`) was called with an argument `display_progress_bars` that it no longer accepts or never accepted in the current version. This keyword argument was part of an earlier API or a related library.
fix
Remove the `display_progress_bars` argument from the `Logger` initialization. Instead, control progress bar display through other `proglog` configuration methods, such as setting the logger's level or using a specific `proglog` logger type that implicitly handles progress bars (e.g., `proglog.TqdmProgressBarLogger`). Consult the `proglog` documentation for the correct way to manage progress bar display in version 0.1.12.
Upgrade
Version history
0.1.12latest on PyPI · released May 9, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
2
Amazon
1
Resources
proglog — pip install proglog · libregistry