Streamlit: Make it easy to save the app state as a URL

Created on 16 Sep 2020  路  1Comment  路  Source: streamlit/streamlit

Problem

Let's say I create a dashboard and a user navigates to it and customizes the input controls to show what they want to see. Now they want to share that view with someone else. Right now, as far as I know, they have to give someone else the URL and then tell them what input values to set. That is, they cannot share the app and its current configuration with a single URL.

Solution

MVP: As the input controls change, update the URL in the address bar to have a query string containing the values of all parameters that aren't at their default values, and the new values that they've been assigned. Then a user can just share that URL at any time and always be sharing the full state of the app.

Possible additions: The above solution would work only for apps below a certain size; if you get to the point where you're uploading large files or having large text input boxes, then a query string is not large enough. In such a case, the app could cache the inputs on disk and create hashes, which go in the query string, and live for up to X days.

Note

While I realize that it's possible for streamlit users to add functionality akin to this, it's much better to simply add it to streamlit itself once, in generality, and then all users get it without having to code it once each.

enhancement spec_needed state

Most helpful comment

Thanks for stopping by @nathancarter, definitely agree this would be a great feature to have. We're working on improving the whole user story around state management, both from a caching perspective and being able to pass an app to someone externally in a specific state. I don't know the specific timing on that, but I believe its something we're hoping to tackle in the remainder of this year.

>All comments

Thanks for stopping by @nathancarter, definitely agree this would be a great feature to have. We're working on improving the whole user story around state management, both from a caching perspective and being able to pass an app to someone externally in a specific state. I don't know the specific timing on that, but I believe its something we're hoping to tackle in the remainder of this year.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MarcSkovMadsen picture MarcSkovMadsen  路  3Comments

ShivamBhirud picture ShivamBhirud  路  3Comments

aagnone3 picture aagnone3  路  3Comments

kurt-rhee picture kurt-rhee  路  3Comments

matthew-trava picture matthew-trava  路  3Comments