Version 0.88.0

Release date: Sep 2, 2021

Highlights

  • :arrow_down: Introducing st.download_button, a new button widget for easily downloading files

Notable Changes

  • :stop_sign: We made changes to improve the redacted exception experience on Streamlit Cloud. When client.showErrorDetails=true exceptions display the Error Type and the Traceback, but redact the actual error text to prevent data leaks.
10 Likes

if there have a backgroud color and hover effect will be better.

1 Like

Hello @BeyondMyself,

There is a .stDownloadButton class attached to the parent div, so you should be able to changer the BG color and hover effect of those buttons through the CSS Hack with st.markdown Creating a nicely formatted search field? - #2 by andfanilo

import streamlit as st

css = """<style>
.stDownloadButton>button {
    background-color: #4F8BF9;
}

.stDownloadButton>button:hover {
    background-color: black;
</style>
}"""
st.markdown(css, unsafe_allow_html=True)

text_contents = """
Foo, Bar
123, 456
789, 000
"""

st.download_button(
    label="Download CSV",
    data=text_contents,
    mime="text/csv",
    file_name="CSV.csv",
)

Have a nice day :balloon:
Fanilo

5 Likes

:star_struck: awesome! Testing it right away

Great new widget, i was waiting a long time for this!

1 Like