Connect to MotherDuck from your Streamlit app. Powered by st.experimental_connection()
First, install the requirements pip install
.
- Add a folder
.streamlit
in the root directory. - Add a file
secrets.toml
. - Paste your service token from Motherduck.
MOTHERDUCK_SERVICE_TOKEN="ey********"
- streamlit run app.py
- Create a new app at https://share.streamlit.io/.
- Set the Main file path to
app.py
- Deploy.
- You should get an error that MOTHERDUCK_SERVICE_TOKEN is undefined.
- Go to your Streamlit app settings secrets and paste the contents of your local
secrets.toml
file.
MOTHERDUCK_SERVICE_TOKEN="ey********"