How to access the URL and the hash fragments from within the streamlit app?

I am hoping to use streamlit to display drill down data and charts based on an user selection of an air quality monitor from Google Maps application: https://aircare.mapshalli.org

For example, the users will be directed to:
http://dashboard-aircare.mapshalli.org?selected_monitor=20#tab=latest_values

This means that the streamlit app should be able to read the query parameters. It should be able to read and write the url fragment to reflect the current state (for example: dashboard page or a tab).

Could not find any reference in the streamlit documentation for this.

3 Likes

Hi @Shiv_Shankar,
we don’t expose query params to the app right now. I filed a feature request, since it seems there might be enough demand for this.

Here is some related discussion (about headers, but it could be generalized): https://github.com/streamlit/streamlit/issues/1083

Matteo