Highlights
Streamlit natively supports more dataframe formats! Use dataframe and series objects from popular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow, Snowpark, Xarray, and more. Use database cursors compliant with the Python Database API Specification 2.0. Use anything that supports the Python dataframe interchange protocol. See the docs.
Notable Changes
- ↔️ You can control the initial expansion state of
st.jsonelements.
You can choose to wrap lines in st.code.
Streamlit supports Kubernetes style secrets so you can use Snowflake Snowpark Container Services secret format (#9078).
Breaking change: We removed a patch that allows custom validators in pydantic<2.0(#9257).
Breaking change: We removed the experimental cache replay feature from caching decorators (#9305).
Other Changes
For better app efficiency, a WebSocket reconnect will not trigger a rerun unless a script run was interrupted (#9083).
We updated our streamlit helloapp to use Google Material icons.
st.number_input,st.selectbox,st.slider,st.select_slider, andst.radioprovide more precise type hinting for their return values (#9048, #9296, #8717). Thanks, Asaurus1!
st.feedbackprovides more precise type hinting for its return value (#9216). Thanks, wyattscarpenter!
We improved theme management for embedded apps via postMessage(#9103).
Bug fix: Within the sidebar, the image for st.logoresizes along with the sidebar width (#9298, #8707).
Bug fix: When a parent fragment updates, Streamlit cleans up child fragments correctly (#9246, #9233, #9267).
Bug fix: Elements unstale within a fragment rerun as they are updated instead of all together at the end of the fragment rerun (#9285).
Bug fix: If a block type changes during a rerun, Streamlit discards the child elements of that block to prevent improper visual artifacts, like st.tabscausing a blank page (#9276, #9259, #8676).
Bug fix: Widget state is preserved when page reruns are interrupted with another rerun (#9187, #9163). Thanks, dannyopts!
Bug fix: optionsinst.selectbox,st.multiselect,st.radio, andst.select_slidercorrectly usedict_items(#9241, #9237, #5377).
Bug fix: A SelectboxColumnindex will show with the correct, grayed-out styling in a dataframe (#9231, #8772).
Bug fix: st.write_streamwill not immediately fail when receiving an empty chunk (#9234, #9227).
Bug fix: Streamlit won’t auto-scroll to an empty anchor, if present (#9206, #9203).
Bug fix: We changed the handling of scriptRunIdto preventst.tabsfrom showing extra, empty tabs in fragments (#9186, #9158, #9215).
Bug fix: Automatically rerunning fragments don’t raise FragmentStorageKeyErrorto prevent a possible race condition (#9183, #9080).
Bug fix: We improved st.plotly_chart’s handling of the pass-through keyword argumentconfig(#9190, #9134).
Bug fix: Markdown in all labelparameters correctly ignores headers (#9189, #9141).
Bug fix: We reverted a change to fragments which caused some widgets to lose state in some circumstances (#9178, #9171).
Bug fix: The deprecation warnings for st.experimental_fragmentandst.experimental_dialogonly show when the commands are called. This prevents custom components which use them from raising premature warnings on import (#9170, #9143).
Bug fix: st.codeshows syntax highlighting for diff code whenlanguage="diff"(#9172, #8687).
Bug fix: Streamlit commands that raise ScriptControlExceptionexecute as expected in try-except blocks (#9167, #9155, #9182).
Bug fix: The valueforst.date_inputhas the correct type for linting (#9149). Thanks, wyattscarpenter!
Bug fix: We updated plotly.jsto supporthoversubplots="axis"(#9144, #9118).
Bug fix: We stabilized the identity of st.mapinstances so the command doesn’t create multiple maps when its parameters are updated (#9092, #8329).
Bug fix: You can now clear the cache for cached class instance methods (#9101, #8638).
Bug fix: Copy buttons work correctly in dialogs (#9130, #9112).
Bug fix: Streamlit magic works consistently in for-else, while-else, try-else, try-except, and match blocks (#9110, #9109). Thanks, whitphx!
Bug fix: When printing an app, the bottom container will always print at the end without overlapping other content (#9129).