Set the query parameters that are shown in the browser's URL bar.
Function signature

st.experimental_set_query_params(**query_params)

Parameters

**query_params (dict)

The query parameters to set, as key-value pairs.

Example

To point the user's web browser to something like "http://localhost:8501/?show_map=True&selected=asia&selected=america", you would do the following:

st.experimental_set_query_params(
     show_map=True,
     selected=["asia", "america"],
 )

Was this page helpful?

editSuggest edits
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.