Is there way to save the result of a streamlit application to an html page? For example, in altair there is a save function that allows for saving the resulting chart(s) to a webpage which can then be opened by a user. If there is no such feature, I am interested in possibly working on a feature that allows people to save their work to an html page.
Can you add a more detailed view of how you would imagine this, and eventually signal your interest to contribute on whichever issue is the closest to you ? Thanks !
What I mean by more detailed is some behaviors you’d like to keep in the standalone HTML. For example, do you only need exporting all Markdown/sidebar/Altair/Plotly/Matplotlib widgets as HTML/images, or also would need for example handling every interactive Streamlit widget (example, text input and using its value to rebuild a new Altair chart, which my 2 cents doesn’t look immediately possible because we lose the Python processing in the pure standalone HTML process) ?
Hi, Thank you for the response. I am interested in the second post titled: export to standalone HTML. I’m currently trying to find a way to take a streamlit application that I have made and save the output charts created with altair with the streamlit functionality and design. By save function, I was wondering if streamlit has something to altair’s save function: https://altair-viz.github.io/user_guide/saving_charts.html. For example, I would like to build a textbox that allows users to specify stuff and generate charts that can be saved to the browser using a save function.
AFAIK this is not currently supported, I propose you draft your thoughts on the Github issue then and then we’ll see what this implies on the implementation side
Is there any progress in this function (i.e saving streamlit app to a static webpage to create interactive report)?
One solution would be using Datapane inside your streamlit app’s code (app.py) to output your desired page(s) to a interactive report - see example below:
m = folium.Map(width=340,height=580,location=[lat, lon], tiles='cartodbpositron', zoom_start=8)
import datapane as dp
from datetime import date
dp.login(token="your token from datapane")
dp.Report(
f"""
_Analysis built {date.today()}_
""",
dp.Group(
dp.Plot(m, caption='Geographical interest'),
columns=1
),
).publish(name="map3", open=True)
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.