Deeplinks for specific tab/pages

I have been looking for a way to send a user to a given tab/page of the app by providing them a custom url, just like a deeplink.

I saw this discussion but as far as I understand it would only keep in memory text
or checkbox status. Deep Links In Streamlit?

I also tried using anchor link but without sucess.

Any lead or help would be very much appreciated!

Here is what I use

Most essential lines are

   query_params = st.experimental_get_query_params() # reading  the choice from the URL..

    choice = int(query_params["choice"][0]) if "choice" in query_params else 0 # .. and make it the default value

Kind regards
Rene Smit

Hi @rcsmit @ssap, I use a similar module loading technique as @rcsmit. Logic works fine to load/select different code modules. But there are 2 issues. (1) Page reloads each time, so flickers a lot. (2) Each page is a new instance, so session variables don’t work. I’m look into new MultiPage (don’t like the sidebar page list), or Tabs (for fast reload). If you have better luck, please share.
-AndyW

1 Like

I’ve created a package that can help with creating deep links easily.

@ssap Feel free to let me know if you have any questions related to this.

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