Python 3.10
Streamlit 1.20
Just wondering if I could get some help from the community here.
I’m trying to deploy a Streamlit app in the community cloud.
Q1) How do I call credentials list from app.py?
Q2) How do I put credentials list in Secrets.toml?
I do know that I’ll need to add that info list in secrets.toml, and I want to do this after deployment.
And this is where my issue is as Secrets said “Invalid format”.
- Below is the snippet of the code that will be in the app which will be uploaded to Github.
def main_log_cre():
valid_credentials = [
{'user': 'us1', 'pin': 'pin123'},
{'user': 'us2', 'pin': 'pin456'},
]
main_log_cre()
I’ll have a loop code here after the list that will look for
user input and pin in valid_credentials list which I want to keep in secrets.toml in
the App setting, Secrets
Many thanks