How to Hide Password and API keys in Streamlit Share

How to Hide Password and API keys in Streamlit Share

Mısra Turp

1 год назад

14,344 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Hash
Hash - 19.09.2023 06:56

Very useful for my hackathon

Ответить
schwab
schwab - 16.09.2023 06:24

thanks for such clear instructions

Ответить
Daksh Bhatnagar
Daksh Bhatnagar - 04.08.2023 06:58

Helpful but what if I have to commit a bunch of variables like keys that you get from Google Cloud in the form of a JSON?

Ответить
A Bagatelle
A Bagatelle - 28.07.2023 10:54

Very helpful! Thanks very much.

Ответить
Ariel Jumba
Ariel Jumba - 13.05.2023 18:32

you used auth_key and not auth_token. How comes?

Ответить
Rafay Khattak
Rafay Khattak - 13.05.2023 14:51

I still get this problem:

Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass `openai_api_key` as a named parameter. (type=value_error)

My code:

# Get API key
OPENAI_API_KEY = st.secrets['API']
# Set OpenAI API key
openai.api_key = OPENAI_API_KEY


Streamlit secrets option:

API = "mykeyhere"

Ответить
Juan Wea
Juan Wea - 16.02.2023 02:11

This is what I was looking for, thanks! Just one question, it says to use TOML format. So if for example I have many config elements that I got from Firebase Realtime Database to connect, can I just put them in JSON dictionary form?
Like config = {'APIkey': 'blablabal', 'projectid': 'blablabal', 'authdomain': 'blablabal', etc}
Or do I have to change it?

Ответить
Kaan Korkmaz
Kaan Korkmaz - 14.01.2023 19:10

Thanks Misra, I think you meant to call the secret "auth_token" instead of "auth_key".

Ответить
Phillip Kim
Phillip Kim - 09.01.2023 22:11

how to when using local environment?

Ответить
Gunawan Wibisono
Gunawan Wibisono - 01.09.2022 13:07

Thanks you..

Ответить
Rushikesh N
Rushikesh N - 30.08.2022 17:57

Thanks 🙏 Mam.

Ответить
eric broun
eric broun - 30.08.2022 15:19

Ответить