Overview
Streamlit 1.0, released on October 6, 2021, is the first stable release with secrets management, custom theming, and a stabilized API.
Main Features
Secrets management
Streamlit 1.0 introduces st.secrets for securely managing API keys and passwords via a .streamlit/secrets.toml file.
python
import streamlit as st
# File .streamlit/secrets.toml:
# [database]
# host = "localhost"
# password = "secret123"
# Access secrets
# db_host = st.secrets['database']['host']
# db_pass = st.secrets['database']['password']
st.title('My Application')
st.write('Secrets managed securely')
# st.write(f'Connecting to {db_host}')
Theming
The theming system customizes colors, fonts, and styles of the application through configuration or programmatically.
python
import streamlit as st
# File .streamlit/config.toml:
# [theme]
# primaryColor = "#FF4B4B"
# backgroundColor = "#0E1117"
# textColor = "#FAFAFA"
st.title('Themed Application')
value = st.slider('Select', 0, 100, 50)
st.metric('Value', value, delta=value - 50)
st.balloons() # celebration animation
