Set a configuration option.

Currently, only client configuration options can be set within the script itself:

  • client.showErrorDetails
  • client.showSidebarNavigation
  • client.toolbarMode

Calling st.set_option with any other option will raise a StreamlitAPIException. When changing a configuration option in a running app, you may need to trigger a rerun after changing the option to see the effects.

Run streamlit config show in a terminal to see all available options.

Function signature[source]

st.set_option(key, value)

Parameters

key (str)

The config option key of the form "section.optionName". To see all available options, run streamlit config show in a terminal.

value (null)

The new value to assign to this config option.

Example

import streamlit as st

st.set_option("client.showErrorDetails", True)
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.