Registry / observability / stqdm
library0.2.0pypypi✓ verified 84d ago

stqdm provides an easy-to-use progress bar for Streamlit applications, integrating the functionality of the popular `tqdm` library with Streamlit's `st.progress`. The current version is 0.0.5, released in January 2023, and the library is actively maintained for compatibility with newer Python, Streamlit, and tqdm versions, though with an irregular release cadence.

pip install stqdm
INSTALL
IMPORT
SIG · STQDM
S
stqdm
observabilitypythonv0.2.0
Install
15.6s avg
Import
1267ms
Disk
433MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.5 · 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.920 runs
installs and imports cleanly · install 0.0s · import 1.647s · 445.4MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 15.6s · import 0.887s · 414MB
433MB installed
● package 433MB
Code
Verified usage

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

stqdm
from stqdm import stqdm
from tqdm import tqdm
While stqdm inherits from tqdm, directly importing tqdm.tqdm will not provide Streamlit integration.
stqdm.pandas
from stqdm import stqdm stqdm.pandas()
Enables progress bars for pandas DataFrame and Series operations, similar to tqdm.pandas().

This example demonstrates how to use `stqdm` for a loop in the main Streamlit area and within the sidebar. Run this with `streamlit run your_script.py`.

import streamlit as st import time from stqdm import stqdm st.title('stqdm Demo') if st.button('Start Progress Bar'): for i in stqdm(range(50), desc="Processing items"): time.sleep(0.1) st.success("Processing complete!") if st.button('Start Progress Bar in Sidebar'): with st.sidebar: for i in stqdm(range(20), desc="Sidebar progress"): time.sleep(0.2) st.success("Sidebar processing complete!")
Debug
Known issues
gotchaStopping a Streamlit app (e.g., via the 'Stop' button in the UI) while an `stqdm` loop is active can cause the app to freeze or the progress bar to become unresponsive on subsequent reruns. A full console restart is often required to recover.
fix
As a workaround, you can explicitly set a lock for stqdm, especially when using `stqdm.pandas()`. Add `from threading import RLock; stqdm.set_lock(RLock())` at the top of your script. This helps prevent the app from entering an infinite loop.
affects: All versions, particularly when using `progress_apply` with `stqdm.pandas()`
deprecatedIn versions prior to 0.0.5, `stqdm` had issues with iterators that did not provide a predefined length or total, such as generators. The progress bar might not display correctly or update as expected.
fix
Update to `stqdm` version 0.0.5 or newer, which properly provides time updates even for iterators without a length.
affects: <0.0.5
gotchaUsing multiple `stqdm` instances in an application, particularly across reruns, might lead to issues where Streamlit fails to reload. This has been reported as an issue related to a `last_print_t` attribute.
fix
Monitor GitHub issues for official fixes. Consider refactoring to use a single `stqdm` instance where possible, or explore alternative Streamlit native progress handling if encountering this specific issue until a resolution is provided.
affects: 0.0.5 (as reported in April 2024), possibly earlier versions.
gotchaThere are reported limitations and 'weird interactions' when using `stqdm` in conjunction with multithreading within a Streamlit application. Direct `tqdm` (and by extension `stqdm`) updates from non-Streamlit threads might not propagate correctly.
fix
Ensure that `stqdm` updates happen within the main Streamlit script context. If using background threads, you might need to manually manage `streamlit.scriptrunner.add_script_run_ctx` or similar context propagation, or consider alternative methods for updating the Streamlit UI from threads.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'stqdm'
The `stqdm` library has not been installed in your current Python environment.
fix
pip install stqdm
ImportError: cannot import name 'stqdm' from 'tqdm'
The `stqdm` progress bar component is a separate library for Streamlit integration and is not part of the standard `tqdm` package.
fix
Change your import statement from `from tqdm import stqdm` to `from stqdm import stqdm`.
TypeError: 'int' object is not iterable
The `stqdm` function expects an iterable object (like a list, tuple, string, or `range` object) as its input, but a non-iterable type (such as an integer) was provided.
fix
Ensure the argument passed to `stqdm` is an iterable, for example, use `stqdm(range(10))` to iterate 10 times.
NameError: name 'stqdm' is not defined
The `stqdm` function was used in the code without being properly imported from the `stqdm` library.
fix
Add `from stqdm import stqdm` at the top of your Python script before using the function.
ERROR: Could not find a version that satisfies the requirement streamlit-tqdm (from versions: none)
You attempted to install the library using an incorrect package name; the correct package name for the library is `stqdm`, not `streamlit-tqdm`.
fix
Install the library using the correct package name: `pip install stqdm`.
Upgrade
Version history
0.2.0latest on PyPI · released May 31, 2026
Audit
Dependencies
streamlitrequiredCore dependency for Streamlit integration.
tqdmrequiredCore dependency for tqdm functionality and API.
Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
stqdm — pip install stqdm · libregistry