Hello there đź‘‹

Thanks for stopping by! We use cookies to help us understand how you interact with our website.

By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.

delete

Deprecation notice

st.experimental_set_query_params was deprecated in version 1.30.0. Use st.query_params instead.

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

Warning

Query param embed cannot be set using this method.

Function signature[source]

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:

import streamlit as st

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

Still have questions?

Our forums are full of helpful information and Streamlit experts.