Arbitrary option

Is it possible to recover an arbitrary option set in the .streamlit/config.toml file?

[teste]
myspecialoption="XXXXX"
st.write(st.get_option("teste.myspecialoption"))

I’ve tried it and it is now working.

afaik st.get_option is limited to the settings that streamlit actually recognizes. Alternatively, you could parse the toml file using the tomllib module.

import streamlit as st
import tomllib

with open(".streamlit/config.toml", "rb") as f:
    st.write(tomllib.load(f)["teste"]["myspecialoption"])