Is there a way / planned way to load secrets?
Hi @Ian_Calvert, we’ve highlighted your message internally, so one of our engineers will hopefully get back to you shortly with our plans.
This feature is on our roadmap, but we’re still not sure exactly when we’re planning on releasing this. A couple of users have asked already, so rest assured it’s high on our priorities.
It would help us to know how you’re planning to use secrets / environment variables across your streamlit app – would really appreciate anything you can share here.
I’ve often got a variety of API keys, database passwords and credential files that are required to access various services. A way of having files that get copies into some location would solve the issues for me, and that would be required for some use cases.
Edit - being able to specify locations would mean I can copy a credentials file to the standard one for aws
This is probably my biggest request as well.
Right now I only have a single secret that I need to manage: my Weights and Biases API key. I currently have a text_input in the app where I can post the API key, but that limits the application usage to people who have knowledge of my API key (me).
I would love to be able to go into the s4a.streamlit.io UI and add a list of key value pairs for a given app that get loaded in as environment variables at container runtime.
a way to put in env variables, would be great.
I use them for was keys, to access dynamodb etc.
A hint could be to look at Heroku, how they do it.
it just a simple table, where you can add env variables, that get’s picked up by the container.
btw. other than that, it looks really great. So keep up the great work
I use Google Earth Engine, which requires creating a credentials file by loading the environment variable. Heroku supports this. It would be nice if streamlit can support this as well.
I need to access the Github API from my streamlit app, so need to store the API token.
Locally, I have a .env file with the credentials, which I load via python-dotenv. As others noted, Heroku has a nice way of handling secrets (see here), but it’s all through the terminal, so not sure if applicable to streamlit sharing at the moment. Github Actions offers a web interface where you can input secrets and access them from within config files (see here).
+1. This would be amazing
@randyzwitch are there any updates on the secret management feature? Asking to decide whether to test streamlit sharing or to go for a self-hosted solution.
It is expected to be released one week from today, but like any other estimate, that’s subject to change.
Hi everyone -
Secrets management is now available in Streamlit sharing! You need to upgrade to version 0.80 of Streamlit, the temporary documentation location is linked below.