Streamlit Multi-page and share database connection

I am new to Streamlit and working on develop a multi-page dashboard.

  1. How can I share the database connection among all the pages ?
  2. any example codes ?


Hi ! we would like to know more about your project example your primary database source (S3,mongoDB…) aside for now you can refer this docs

and if you want example and explanation related to your preference plz feel free to ask

Just connect to PostgreSQL

Currently, I just put the conn to session state, but didn’t handle the time-out or user reload the page then lost the database connection issue yet.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.