Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stqdm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stqdm

Easy progress bar for streamlit based on the awesome streamlit.progress and tqdm

  • 0.0.5
  • PyPI
  • Socket score

Maintainers
1

stqdm

Tests codecov CodeQL

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

demo gif

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

demo gif

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)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc