stqdm

0.0.5 · active · verified Wed Apr 15

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.

Warnings

Install

Imports

Quickstart

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!")

view raw JSON →