You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
st.experimental_get_query_params has been updated to get_query_params. There are some minor code updates. Please use:
import streamlit as st
st.title('st.query_params')
with st.expander('About this app'):
st.write("`st.query_params` allows the retrieval of query parameters directly from the URL of the user's browser.")
# 1. Instructions
st.header('1. Instructions')
st.markdown('''
In the above URL bar of your internet browser, append the following:
`?firstname=Jack&surname=Beanstalk`
after the base URL `http://share.streamlit.io/dataprofessor/st.query_params/`
such that it becomes
`http://share.streamlit.io/dataprofessor/st.query_params/?firstname=Jack&surname=Beanstalk`
''')
# 2. Contents of st.query_params
st.header('2. Contents of st.query_params')
st.write(st.query_params.to_dict())
# 3. Retrieving and displaying information from the URL
st.header('3. Retrieving and displaying information from the URL')
firstname = st.query_params.get_all('firstname')[0]
surname = st.query_params.get_all('surname')[0]
st.write(f'Hello **{firstname} {surname}**, how are you?')
The text was updated successfully, but these errors were encountered:
st.experimental_get_query_params has been updated to get_query_params. There are some minor code updates. Please use:
The text was updated successfully, but these errors were encountered: