Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to share the apps settings, preferable via a custom URL? #3292

Closed
Yannik1337 opened this issue May 19, 2021 · 4 comments
Closed

How to share the apps settings, preferable via a custom URL? #3292

Yannik1337 opened this issue May 19, 2021 · 4 comments

Comments

@Yannik1337
Copy link

I am looking for a way to share the state of the app. In the most simple form, this is what I am after:

A user sets some sliders, ticks some boxes.

He then can create an URL or something else that he can share. When somebody receives this link, once he opens the app he gets the same settings as the user who shared his settings.

As a URL solution I am thinking about generating a random id (caching it when needed), and all settings are connected to this ID and can be shared after clicking on a button that says save and generate share link.

Is there some solution implemented to handle this case? Where can find further help in case such a feature is yet to come?

Thanks for your replies!

@Yannik1337 Yannik1337 added type:docs Requests for changes to docs (will be rerouted to docs repo) status:needs-triage Has not been triaged by the Streamlit team labels May 19, 2021
@okld
Copy link

okld commented May 23, 2021

Hello @Yannik1337, I think #1169 would work in your case. This is an experimental feature that allows you to get and set URL query parameters.

Here's some code using it: https://github.com/streamlit/release-demos/blob/master/0.65/demos/query_params.py

@kmcgrady
Copy link
Collaborator

Hey @Yannik1337 ! Thanks for the report! I would agree with @okld above. Let us know if you are needing something different.

@kmcgrady kmcgrady added support and removed type:docs Requests for changes to docs (will be rerouted to docs repo) status:needs-triage Has not been triaged by the Streamlit team labels May 23, 2021
@Yannik1337
Copy link
Author

Hey there, the solution you have proposed solved my problems. I am looking forward to Streamlit's upcoming releases.

@franekp
Copy link

franekp commented Jun 21, 2022

Hi @Yannik1337 @kmcgrady @okld,

I made a library with url-aware versions of input controls that automatically sync their state to the url query string: streamlit-permalink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants