streamlit.config
configの確認:get_option
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L131-L147
ref: https://nikkie-ftnext.hatenablog.com/entry/streamlit-config-get-option
get_config_options
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L1129-L1204
configの読み込み処理
優先順位
1. default values defined in this file
2. the global ~/.streamlit/config.toml file
3. per-project $CWD/.streamlit/config.toml files
4. environment variables such as STREAMLIT_SERVER_PORT
5. command line flags passed to streamlit run
environment variableの読み込みは_update_config_with_sensitive_env_var関数による
優先順位の1(default values defined in this file)は_create_option関数による
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L184
例:browser.gatherUsageStats
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L764-L771
_update_config_with_sensitive_env_var
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L1035-L1046
This should only be called from get_config_options.
sensitiveなoptionについて環境変数から値を読み込む
Streamlitで環境変数から値を読み込める仕組み
is_manually_set
https://github.com/streamlit/streamlit/blob/1.22.0/lib/streamlit/config.py#L970-L988
Check if a given option was actually defined by the user.