File size: 532 Bytes
63eae55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63f793a
 
63eae55
63f793a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st

st.title('Links & Query Strings')




with st.container():
    st.subheader('Current page info:')
    st.write(st.query_params)
    st.link_button("Link to main page", "/")
    st.link_button("Link to main page with query params", "/?key=val")
    st.link_button("Link to this page", "page1")
    st.link_button("Link to this page with query params", "page1?key=val")


def from_dict():
    st.query_params.from_dict({"key123": "val123"})

with st.container():
    st.button("from dict", on_click=from_dict)