{"id":3488,"library":"fastprogress","title":"Fastprogress","description":"Fastprogress is a Python library providing fast and simple progress bars for Jupyter Notebooks and console applications. It features nested progress bars and plotting options, often used within the fastai ecosystem. The library is actively maintained with frequent minor releases, most recently v1.1.5, and has a cadence of several updates per year.","status":"active","version":"1.1.5","language":"en","source_language":"en","source_url":"https://github.com/answerdotai/fastprogress","tags":["progress bar","jupyter","console","fastai","ui","developer tools"],"install":[{"cmd":"pip install fastprogress","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for versions 1.1.0+ due to a modernization effort; can introduce platform-specific install issues (e.g., SQLite C bindings).","package":"python-fasthtml","optional":false},{"reason":"Internal dependency for utility functions.","package":"fastcore.utils","optional":false},{"reason":"Required for full Jupyter Notebook integration and features like `IPython.display`. Progress bars may fall back to console behavior without it.","package":"IPython","optional":true}],"imports":[{"symbol":"master_bar","correct":"from fastprogress.fastprogress import master_bar"},{"symbol":"progress_bar","correct":"from fastprogress.fastprogress import progress_bar"},{"note":"Use for explicit console-only progress bars, bypassing notebook detection.","symbol":"ConsoleMasterBar","correct":"from fastprogress.fastprogress import ConsoleMasterBar"},{"note":"Use for explicit console-only progress bars, bypassing notebook detection.","symbol":"ConsoleProgressBar","correct":"from fastprogress.fastprogress import ConsoleProgressBar"}],"quickstart":{"code":"from fastprogress.fastprogress import master_bar, progress_bar\nimport time\n\nmb = master_bar(range(10))\nmb.write('Starting main loop...')\nfor i in mb:\n    mb.main_bar.comment = f'Processing outer item {i+1}/10'\n    for j in progress_bar(range(100), parent=mb):\n        time.sleep(0.01) # Simulate some work\n    mb.child.comment = f'Inner loop for item {i+1} complete'\n    mb.write(f'Finished outer loop iteration {i+1}.')\nmb.write('All loops complete.')","lang":"python","description":"This example demonstrates a nested progress bar. `master_bar` handles the outer loop, and `progress_bar` handles the inner loop, linked via the `parent` argument. Comments can be updated, and `mb.write()` adds persistent messages."},"warnings":[{"fix":"Ensure `python-fasthtml` (and its underlying dependencies like SQLite development headers if building from source) can be installed in your environment. Consider pinning to a version <1.1.0 if `fasthtml` integration causes issues.","message":"Version 1.1.0 introduced a breaking change by converting to `fasthtml` for modernization. This change may affect internal behavior and can introduce a dependency on `python-fasthtml` which has been reported to cause installation issues on some platforms due to SQLite C bindings.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Always provide the `total` argument if the length of your iterable is known (e.g., `range(N)` or `len(my_list)`). For truly unknown lengths, you might explicitly pass `total='noinfer'` (supported since 1.0.3) or handle the display logic manually.","message":"If `total` is not explicitly passed to `progress_bar` or `master_bar` for an iterator of unknown length, the progress bar may not display correctly, or it might warn if the generator is empty. `fastprogress` does not auto-infer `total` for all iterables.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Design your scripts to rely on `mb.write()` for critical logging messages that need to be captured in non-interactive contexts. For debugging, ensure you run in a true TTY or Jupyter environment.","message":"In non-interactive environments (e.g., CI/CD pipelines, scripts with redirected `stdout`), the progress bars will not render visually. Only output generated by `mb.write()` will be captured.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `IPython` and `ipywidgets` are correctly installed and configured in your environment (`pip install ipython ipywidgets`). For problematic environments, try explicitly using `ConsoleMasterBar` and `ConsoleProgressBar` or investigate `ipywidgets` installation troubleshooting steps.","message":"Users have reported `ModuleNotFoundError: No module named 'IPython'` or issues with progress bars not displaying correctly in certain Jupyter environments (e.g., VS Code Jupyter notebooks, specific `ipywidgets` configurations). This can lead to progress bars falling back to console behavior.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}