I am trying to connect to BigQuery I have the service account json, but when I copy and past the values in the secret it gave me errors later when I deploy the app, is there a documentation how to do that
I checked in with our team and they know that we are a bit light on examples for this! They are actually making up an app example for just this application of secrets (connecting to BigQuery) and that will be ready soon.
In the root of your Streamlit app, create a file .streamlit/secrets.toml
That would mean that this file with the secrets ends up in the public github repo?
Unless you exclude it in the .gitignore - but then it has no use for streamlit sharing anymore.
Iām confused - or did I miss something?
@Franky1 Oh yes, this step wasnāt very clear! You have to put the secrets.toml file into .gitignore, so it isnāt available on Github. Then you add the same file content to your app secrets on the Streamlit Sharing dashboard. Thatās how the deployed app knows the secrets. I just updated the document to make this step a bit more obvious. Let me know if this is better!
However, I am still missing the clear information that the file .streamlit/secrets.toml is needed for the local execution of Streamlit to be read by the function st.secrets and on streamlit sharing this file is replaced by the content entered in the secrets form.
This becomes indirectly clear in the course of the article, but I think the basic principle should be explained right at the beginning.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking āAccept allā, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.