Conceal URI for external data fetching

Hi All,
I’m running a small project that pulls data from an API on load, which I’d like to switch to a Postgres db via Heroku + Scheduler so I can reduce requests to the API to once per day and pull from the DB as often as I’d like.

I’d like to know how I can access the db with the login URI, without pushing the .env to github publicly as the Streamlit hosting appears to require.

Is there a way to upload an .env file to the Streamlit server for the project so that it can operate without being publicly exposed?

Thanks in advance.

Hi @bfgdigital, welcome to the Streamlit community!

Just to clarify, are you asking whether Heroku has the ability for secrets management or Streamlit sharing? In the case of Streamlit sharing, this functionality is currently being worked on and hopefully will be released shortly.


Hi Randy,
Cheers, really enjoying Streamlit.
Apologies, I’m looking to see if Streamlit Sharing has the ability for secrets management.
Thanks for clarifying.

1 Like