This section gives you background on how different parts of Streamlit work.

Command-line options

When you install Streamlit, a command-line (CLI) tool gets installed as well. The purpose of this tool is to run Streamlit apps, change Streamlit configuration options, and help you diagnose and fix issues.

Streamlit configuration

Streamlit provides four different ways to set configuration options. Learn how to use each of them to change the behavior of Streamlit.

Theming

This section provides examples of how Streamlit page elements are affected by the various theme config options.

Optimize performance with st.cache

Streamlit provides a caching mechanism that allows your app to stay performant even when loading data from the web, manipulating large datasets, or performing expensive computations. This is done with the @st.cache decorator.

Experimental cache primitives

Streamlit provides two experimental primitives to memoize function executions and store singleton objects.

@st.experimental_memo is used to store expensive computation which can be "cached" or "memoized" in the traditional sense.

@st.experimental_singleton is a key-value store that's shared across all sessions of a Streamlit app. It's great for storing heavyweight singleton objects across sessions (like TensorFlow/Torch/Keras sessions and/or database connections).

Add statefulness to apps

Session State is a way to share variables between reruns, for each user session. In addition to the ability to store and persist state, Streamlit also exposes the ability to manipulate state using Callbacks.

Pre-release features

At Streamlit, we like to move quick while keeping things stable. In our latest effort to move even faster without sacrificing stability, we're offering our bold and fearless users two ways to try out Streamlit's bleeding-edge features.

Advanced notes on widget behavior

Widgets are magical and often work how you want. But they can have surprising behavior in some situations. This section provides is a high-level, abstract description of widget behavior, including some common edge-cases.

Working with timezones

Working with timezones can be tricky. This section provides a high-level description of how to handle timezones in Streamlit to avoid unexpected behavior.

Was this page helpful?

editSuggest edits
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.