Step 1: Add the password to your local app secrets
Your local Streamlit app will read secrets from a file .streamlit/secrets.toml in your app's root dir. Create this file if it doesn't exist yet and add your password to it as shown below:
```toml
.streamlit/secrets.toml
password = "streamlit123"
```
Be sure to add this file to your .gitignore so you don't commit your secrets!
Step 2: Copy your app secrets to the cloud
As the secrets.toml file above is not committed to Github, you need to pass its content to your deployed app (on Streamlit Cloud) separately. Go to the app dashboard and in the app's dropdown menu, click on Edit Secrets. Copy the content of secrets.toml into the text area. More information is available at secrets management.
Step 3: Ask for the password in your Streamlit app
Copy the code below to your Streamlit app, insert your normal app code in the if statement at the bottom, and run it:
