Version 1.38.0

Highlights

  • :chart_with_upwards_trend: 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.json elements.
  • :technologist: You can choose to wrap lines in st.code.
  • :male_detective: Streamlit supports Kubernetes style secrets so you can use Snowflake Snowpark Container Services secret format (#9078).
  • :arrow_heading_up: Breaking change: We removed a patch that allows custom validators in pydantic<2.0 (#9257).
  • :broken_heart: Breaking change: We removed the experimental cache replay feature from caching decorators (#9305).

Other Changes

  • :globe_with_meridians: For better app efficiency, a WebSocket reconnect will not trigger a rerun unless a script run was interrupted (#9083).
  • :wave: We updated our streamlit hello app to use Google Material icons.
  • :keyboard: st.number_input, st.selectbox, st.slider, st.select_slider, and st.radio provide more precise type hinting for their return values (#9048, #9296, #8717). Thanks, Asaurus1!
  • :star: st.feedback provides more precise type hinting for its return value (#9216). Thanks, wyattscarpenter!
  • :nail_care: We improved theme management for embedded apps via postMessage (#9103).
  • :seedling: Bug fix: Within the sidebar, the image for st.logo resizes along with the sidebar width (#9298, #8707).
  • :empty_nest: Bug fix: When a parent fragment updates, Streamlit cleans up child fragments correctly (#9246, #9233, #9267).
  • :poop: Bug fix: Elements unstale within a fragment rerun as they are updated instead of all together at the end of the fragment rerun (#9285).
  • :worm: 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.tabs causing a blank page (#9276, #9259, #8676).
  • :skull_and_crossbones: Bug fix: Widget state is preserved when page reruns are interrupted with another rerun (#9187, #9163). Thanks, dannyopts!
  • :alien: Bug fix: options in st.selectbox, st.multiselect, st.radio, and st.select_slider correctly use dict_items (#9241, #9237, #5377).
  • :ghost: Bug fix: A SelectboxColumn index will show with the correct, grayed-out styling in a dataframe (#9231, #8772).
  • :crab: Bug fix: st.write_stream will not immediately fail when receiving an empty chunk (#9234, #9227).
  • :butterfly: Bug fix: Streamlit won’t auto-scroll to an empty anchor, if present (#9206, #9203).
  • :lizard: Bug fix: We changed the handling of scriptRunId to prevent st.tabs from showing extra, empty tabs in fragments (#9186, #9158, #9215).
  • :snail: Bug fix: Automatically rerunning fragments don’t raise FragmentStorageKeyError to prevent a possible race condition (#9183, #9080).
  • :spider_web: Bug fix: We improved st.plotly_chart’s handling of the pass-through keyword argument config (#9190, #9134).
  • :cricket: Bug fix: Markdown in all label parameters correctly ignores headers (#9189, #9141).
  • :scorpion: Bug fix: We reverted a change to fragments which caused some widgets to lose state in some circumstances (#9178, #9171).
  • :mosquito: Bug fix: The deprecation warnings for st.experimental_fragment and st.experimental_dialog only show when the commands are called. This prevents custom components which use them from raising premature warnings on import (#9170, #9143).
  • :microbe: Bug fix: st.code shows syntax highlighting for diff code when language="diff" (#9172, #8687).
  • :fly: Bug fix: Streamlit commands that raise ScriptControlException execute as expected in try-except blocks (#9167, #9155, #9182).
  • :cockroach: Bug fix: The value for st.date_input has the correct type for linting (#9149). Thanks, wyattscarpenter!
  • :spider: Bug fix: We updated plotly.js to support hoversubplots="axis" (#9144, #9118).
  • :lady_beetle: Bug fix: We stabilized the identity of st.map instances so the command doesn’t create multiple maps when its parameters are updated (#9092, #8329).
  • :honeybee: Bug fix: You can now clear the cache for cached class instance methods (#9101, #8638).
  • :ant: Bug fix: Copy buttons work correctly in dialogs (#9130, #9112).
  • :beetle: Bug fix: Streamlit magic works consistently in for-else, while-else, try-else, try-except, and match blocks (#9110, #9109). Thanks, whitphx!
  • :bug: Bug fix: When printing an app, the bottom container will always print at the end without overlapping other content (#9129).
8 Likes
  • :globe_with_meridians: For better app efficiency, a WebSocket reconnect will not trigger a rerun unless a script run was interrupted (#9083).

This is great! Thank you. My mobile app is not rerunning when someone comes back to the web page now!

4 Likes

Great news!
Kudos to the team for hard work :clap:

Thank you for the update!

Please allow customization of row height in the dataframe to accommodate larger images. I need a column for images and another for their descriptions, but the current cell height makes the images too small to view properly.

@Vladyslav Make sure to upvote related GitHub issues so the devs can track interest!

1 Like