-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample_app_simple.py
39 lines (36 loc) · 1.57 KB
/
example_app_simple.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import streamlit as st
from datetime import date, datetime, time
import streamlit_permalink as stp
is_checked = stp.checkbox('checkbox', url_key='checkbox')
is_checked_default = stp.checkbox('checkbox default', value=True, url_key='checkbox_default')
radio = stp.radio('radio', ['Option A', 'Option B', 'Option C'], url_key='radio')
selectbox = stp.selectbox('selectbox', ['Option A', 'Option B', 'Option C'], url_key='selectbox')
multiselect = stp.multiselect('multiselect', ['Zażółć gęślą jaźń', 'A', 'Grzegżółka', 'B', 'Brzęczyszczykiewicz', '/%^&+$#@!~`\"\'[]{}'], default=['A', 'B'], url_key='multiselect')
slider = stp.slider('slider', min_value=1, max_value=100, value=[42, 67], url_key='slider')
select_slider = stp.select_slider('select_slider', list(range(10)), value='5', url_key='select_slider')
text_input = stp.text_input('text_input', value='xxx', url_key='text_input')
number_input = stp.number_input('number_input', min_value=1, max_value=100, value=42, url_key='number_input')
text_area = stp.text_area('text_area', url_key='text_area')
date_input = stp.date_input('date_input', url_key='date_input')
time_input = stp.time_input('time_input', url_key='time_input')
color_picker = stp.color_picker('color_picker', value='#00EEFF', url_key='color_picker')
loc = locals().copy()
irrelevant = [
"__name__",
"__doc__",
"__package__",
"__loader__",
"__spec__",
"__file__",
"__builtins__",
"st",
"__streamlitmagic__",
"stp",
"datetime",
"date",
"time",
]
for i in irrelevant:
if i in loc:
del loc[i]
st.write(loc)