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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.158s · 18.4MB
glibcpy 3.10–3.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)
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.
fixInstall 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.
fixEnsure `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.
fixRemove 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.