stqdm
stqdm is the simplest way to handle a progress bar in streamlit app.
How to install
pip install stqdm
How to use
You can find some examples in examples/
Use stqdm in main
from time import sleep
from stqdm import stqdm
for _ in stqdm(range(50)):
sleep(0.5)
Use stqdm in sidebar
from time import sleep
import streamlit as st
from stqdm import stqdm
for _ in stqdm(range(50), st_container=st.sidebar):
sleep(0.5)
Customize the bar with tqdm parameters
from time import sleep
from stqdm import stqdm
for _ 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.
from time import sleep
import pandas as pd
from stqdm import stqdm
stqdm.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
from time import sleep
from 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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stqdm-0.0.4.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
stqdm-0.0.4-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file stqdm-0.0.4.tar.gz.
File metadata
- Download URL: stqdm-0.0.4.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.5 CPython/3.7.5 Linux/4.19.128-microsoft-standard
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f83e0d2cd441a4f24ecd1fdaaea437626387b4aa45218af1cde558f8e6746c0
|
|
| MD5 |
f33a159060e839870324d9629922a86e
|
|
| BLAKE2b-256 |
b3d67929d3d81824eae5511986a730ca20c7d2fba654623a3b035876a99a194d
|
File details
Details for the file stqdm-0.0.4-py3-none-any.whl.
File metadata
- Download URL: stqdm-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.5 CPython/3.7.5 Linux/4.19.128-microsoft-standard
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e369d38abdc0a8f14b577fd1ae7a45aa047a4ee5afc8fa102845498b8ceb868
|
|
| MD5 |
a6e82fb8c7d173041edf1f36ae32e162
|
|
| BLAKE2b-256 |
ed4b2505f8d5c2ff3a7bb9cc461605383f1fd86fa5782752901f38a160e3c232
|