How do I use st.query_params?

If you’re creating a debugging post, please include the following info:

  1. I’m running the app locally.
  2. I’m getting the following error:
2024-02-24 09:28:57.352 Please replace st.experimental_set_query_params with st.query_params.

st.experimental_set_query_params will be removed after 2024-04-11.

Refer to our docs page for more information.

I understand the error, but I don’t get how to use st.query_params().
Right now I have the following line:


How do I do this with st.query_params()?
5. Streamlit version 1.31.1
Python version 3.10.11

I figured it out.

st.query_params['user_data'] = user_data


user_data = st.query_params['user_data']
1 Like

Nice, thanks for sharing the solution!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.