https://github.com/wirg/stqdm
stqdm is the simplest way to handle a progress bar in streamlit app.
https://github.com/wirg/stqdm
eta progress progressbar progressmeter streamlit tqdm
Last synced: 17 days ago
JSON representation
stqdm is the simplest way to handle a progress bar in streamlit app.
- Host: GitHub
- URL: https://github.com/wirg/stqdm
- Owner: Wirg
- License: apache-2.0
- Created: 2020-11-29T11:29:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T01:18:44.000Z (4 months ago)
- Last Synced: 2025-04-03T03:58:51.850Z (24 days ago)
- Topics: eta, progress, progressbar, progressmeter, streamlit, tqdm
- Language: Python
- Homepage: https://github.com/Wirg/stqdm
- Size: 702 KB
- Stars: 266
- Watchers: 2
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stqdm

[](https://codecov.io/gh/Wirg/stqdm)
[](https://github.com/Wirg/stqdm/actions/workflows/codeql-analysis.yml)
[](https://pepy.tech/project/stqdm)

stqdm is the simplest way to handle a progress bar in streamlit app.

## How to install
```sh
pip install stqdm
```## How to use
You can find some examples in `examples/`
### Use stqdm in main
```python
from time import sleep
from stqdm import stqdmfor _ in stqdm(range(50)):
sleep(0.5)
```### Use stqdm in sidebar
```python
from time import sleep
import streamlit as st
from stqdm import stqdmfor _ in stqdm(range(50), st_container=st.sidebar):
sleep(0.5)
```### Customize the bar with tqdm parameters

```python
from time import sleep
from stqdm import stqdmfor _ in stqdm(range(50), desc="This is a slow task", mininterval=1):
sleep(0.5)
```### Display a progress bar during pandas Dataframe & Series operations
STqdm inherits from tqdm, you can call stqdm.pandas() in a similar way. See [tqdm docs](https://github.com/tqdm/tqdm#pandas-integration).
```python
from time import sleepimport pandas as pd
from stqdm import stqdmstqdm.pandas()
pd.Series(range(50)).progress_map(lambda x: sleep(1))
pd.Dataframe({"a": range(50)}).progress_apply(lambda x: sleep(1), axis=1)
```### Display the progress bar only in the frontend or the backend
```python
from time import sleepfrom stqdm import stqdm
# Default to frontend only
for i in stqdm(range(50), backend=False, frontend=True):
sleep(0.5)for i in stqdm(range(50), backend=True, frontend=False):
sleep(0.5)
```