Skip to main content

Small handy widgets for streamlit, e.g. download button which won't cause rerun, set page width

Project description

streamlit-ext

A small handy extension for streamlit

installation

pip install streamlit-ext

Usage

sync widgets' value with urls

When widgets value changes, the url synced and if you open the url in new tab, every value keeped.

Just import widgets from streamlit_ext, and give a specific key argument to it!

import streamlit as st
import streamlit_ext as ste

from datetime import time, datetime, date

option = ste.selectbox(
    "How would you like to be contacted?",
    range(100),
    key="selectbox",
)

st.write("You selected:", option)

d = ste.date_input("When's your birthday", date(2019, 7, 6), key="date_input")
st.write("Your birthday is:", d)

t = ste.time_input("Set an alarm for", time(8, 45), key="time_input")
st.write("Alarm is set for", t)

Download button which won't cause rerun

import streamlit as st
import streamlit_ext as ste

st.title('streamlit-ext')

ste.set_page_width("60em")

ste.download_button("Download", "Hello World".encode(), "hello.txt")

Set page width

import streamlit as st
import streamlit_ext as ste

st.title('streamlit-ext')

ste.set_page_width("60em")

st.write("a quick fox jump..."*100)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-ext-0.1.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_ext-0.1.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-ext-0.1.3.tar.gz.

File metadata

  • Download URL: streamlit-ext-0.1.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for streamlit-ext-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6fb87bd55809f82be1749fe3dcf1a84e995edf135ee87588082a026ed3ba62a9
MD5 9eef32df2b2f97b66c8799e1d2779dfa
BLAKE2b-256 9cd59c5f1be20bd8330bce8278caa331d2a5c824aef57e3c3664b31742ef05fa

See more details on using hashes here.

File details

Details for the file streamlit_ext-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: streamlit_ext-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for streamlit_ext-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 22c0bc0343177e14c0ef887a16a8771959dde2f683c05bf62605fc4b8d32ff6c
MD5 812749aa39711e98010cc85d4b96e665
BLAKE2b-256 929d10cb2dc888b4c14cf212875712bd4fd71ff40d282fc51fc9f67069a6cdea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page