Download sqlite .db file

Hello,
Is there a way to download a sqlite3 .db file through the st.download_button widget ?
Thanks.

Welcome to streamlit community.
You can do like this:

import streamlit as st
with open("Applet.db", "rb") as fp:
    btn = st.download_button(
        label="Download db file",
        data=fp,
        file_name="Applet.db",
        mime="application/octet-stream"
    )
1 Like

It’s working, thank you !