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 ?

Thanks

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.