import streamlit as st from urllib.parse import urlencode, parse_qs, parse_qsl, quote_plus, unquote_plus # query_params = st.session_state.get("initial_query_params", {}) query_params = st.experimental_get_query_params() query_params = {k: v[0] for k, v in query_params.items()} # st.experimental_set_query_params(parse_qs('a=b&c=d')) # parse_qs st.write("Initial query params of the session:", query_params) if query_params.get('appid') == '1': st.markdown("# App1") elif query_params.get('appid') == '2': st.markdown("# App2") import time st.session_state.file = time.time() st.write(st.session_state.file)