diff --git a/content/develop/api-reference/_index.md b/content/develop/api-reference/_index.md index 34837b557..3e2202018 100644 --- a/content/develop/api-reference/_index.md +++ b/content/develop/api-reference/_index.md @@ -286,7 +286,7 @@ st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero' Apply text mining on a dataframe. Created by [@JohnSnowLabs](https://github.com/JohnSnowLabs/). ```python -nlu.load('sentiment').predict('I love NLU! <3') +nlu.load("sentiment").predict("I love NLU! <3") ``` @@ -1323,6 +1323,19 @@ Display a logo in the upper-left corner of your app and its sidebar. st.logo("logo.jpg") ``` + + + +screenshot + +

PDF

+ +Display a PDF file. + +```python +st.pdf("my_document.pdf") +``` +
diff --git a/content/develop/api-reference/charts/bokeh_chart.md b/content/develop/api-reference/charts/bokeh_chart.md index 1195e4dea..95c9f166b 100644 --- a/content/develop/api-reference/charts/bokeh_chart.md +++ b/content/develop/api-reference/charts/bokeh_chart.md @@ -4,4 +4,4 @@ slug: /develop/api-reference/charts/st.bokeh_chart description: st.bokeh_chart displays an interactive Bokeh chart. --- - + diff --git a/content/develop/api-reference/media/_index.md b/content/develop/api-reference/media/_index.md index dd14ac2b4..30c9277eb 100644 --- a/content/develop/api-reference/media/_index.md +++ b/content/develop/api-reference/media/_index.md @@ -36,6 +36,19 @@ Display a logo in the upper-left corner of your app and its sidebar. st.logo("logo.jpg") ``` + + + +screenshot + +

PDF

+ +Display a PDF file. + +```python +st.pdf("my_document.pdf") +``` +
diff --git a/content/develop/api-reference/media/pdf.md b/content/develop/api-reference/media/pdf.md new file mode 100644 index 000000000..b64a2e07c --- /dev/null +++ b/content/develop/api-reference/media/pdf.md @@ -0,0 +1,7 @@ +--- +title: st.pdf +slug: /develop/api-reference/media/st.pdf +description: st.pdf displays a PDF viewer +--- + + diff --git a/content/develop/api-reference/status/toast.md b/content/develop/api-reference/status/toast.md index ef1291271..b363be017 100644 --- a/content/develop/api-reference/status/toast.md +++ b/content/develop/api-reference/status/toast.md @@ -5,42 +5,3 @@ description: st.toast briefly displays a toast message in the bottom-right corne --- - -When multiple toasts are generated, they will stack. Hovering over a toast will -stop it from disappearing. When hovering ends, the toast will disappear after -four more seconds. - -```python -import streamlit as st -import time - -if st.button('Three cheers'): - st.toast('Hip!') - time.sleep(.5) - st.toast('Hip!') - time.sleep(.5) - st.toast('Hooray!', icon='🎉') -``` - - - -Toast messages can also be updated. Assign `st.toast(my_message)` to a variable -and use the `.toast()` method to update it. Note: if a toast has already disappeared -or been dismissed, the update will not be seen. - -```python -import streamlit as st -import time - -def cook_breakfast(): - msg = st.toast('Gathering ingredients...') - time.sleep(1) - msg.toast('Cooking...') - time.sleep(1) - msg.toast('Ready!', icon = "🥞") - -if st.button('Cook breakfast'): - cook_breakfast() -``` - - diff --git a/content/develop/quick-references/api-cheat-sheet.md b/content/develop/quick-references/api-cheat-sheet.md index 60fd57ada..77f2c15eb 100644 --- a/content/develop/quick-references/api-cheat-sheet.md +++ b/content/develop/quick-references/api-cheat-sheet.md @@ -5,7 +5,7 @@ slug: /develop/quick-reference/cheat-sheet # Streamlit API cheat sheet -This is a summary of the docs for the latest version of Streamlit, [v1.48.0](https://pypi.org/project/streamlit/1.48.0/). +This is a summary of the docs for the latest version of Streamlit, [v1.49.0](https://pypi.org/project/streamlit/1.49.0/). @@ -116,10 +116,11 @@ st.metric("My metric", 42, 2) ```python st.image("./header.png") +st.logo("logo.jpg") +st.pdf("my_document.pdf") st.audio(data) st.video(data) st.video(data, subtitles="./subs.vtt") -st.logo("logo.jpg") ``` @@ -137,7 +138,6 @@ st.map(df) st.scatter_chart(df) st.altair_chart(chart) -st.bokeh_chart(fig) st.graphviz_chart(fig) st.plotly_chart(fig) st.pydeck_chart(chart) @@ -160,7 +160,7 @@ event = st.vega_lite_chart( ) ``` -To use newer versions of Bokeh, see our custom component [`streamlit-bokeh`](https://github.com/streamlit/streamlit-bokeh). +To use Bokeh, see our custom component [`streamlit-bokeh`](https://github.com/streamlit/streamlit-bokeh). diff --git a/content/develop/quick-references/release-notes/2025.md b/content/develop/quick-references/release-notes/2025.md index e0ec2e43a..75298b72c 100644 --- a/content/develop/quick-references/release-notes/2025.md +++ b/content/develop/quick-references/release-notes/2025.md @@ -9,6 +9,59 @@ keywords: changelog, release notes, version history This page contains release notes for Streamlit versions released in 2025. For the latest version of Streamlit, see [Release notes](/develop/quick-reference/release-notes). +## **Version 1.49.0** + +_Release date: August 26, 2025_ + +**Highlights** + +- 📄 Introducing [`st.pdf`](/develop/api-reference/media/st.pdf) to beautifully render PDF documents in your app! +- ⛏️ Dataframes support [cell selections](/develop/api-reference/data/st.dataframe#dataframeselectionstate)! +- ✨ You can add sparklines to [`st.metric`](/develop/api-reference/data/st.metric)! +- ✏️ [`ListColumn`](/develop/api-reference/data/st.column_config/st.column_config.listcolumn) is now editable! +- 📂 Users can upload a directory of files with [`st.file_uploader`](/develop/api-reference/widgets/st.file_uploader) or [`st.chat_input`](/develop/api-reference/chat/st.chat_input). + +**Notable Changes** + +- 🏷️ You can configure the labels of options in [`SelectboxColumn`](/develop/api-reference/data/st.column_config/st.column_config.selectboxcolumn) with a new `format_func` parameter ([#12232](https://github.com/streamlit/streamlit/pull/12232), [#6795](https://github.com/streamlit/streamlit/issues/6795)). +- 🍞 You can configure the duration of [`st.toast`](/develop/api-reference/status/st.toast) messages ([#11872](https://github.com/streamlit/streamlit/pull/11872), [#7047](https://github.com/streamlit/streamlit/issues/7047)). +- 🔑 [`st.form_submit_button`](/develop/api-reference/execution-flow/st.form_submit_button) has a `key` parameter ([#12190](https://github.com/streamlit/streamlit/pull/12190), [#12121](https://github.com/streamlit/streamlit/issues/12121)). +- 🌻 [Markdown](/develop/api-reference/text/st.markdown) and heading dividers can be yellow ([#12201](https://github.com/streamlit/streamlit/pull/12201)). +- 💬 [`st.dialog`](/develop/api-reference/execution-flow/st.dialog) widths have a larger option ([#12040](https://github.com/streamlit/streamlit/pull/12040), [#8904](https://github.com/streamlit/streamlit/issues/8904)). +- 💻 `st.dataframe` and `st.data_editor` have `width` and `height` to use with flex layouts ([#11930](https://github.com/streamlit/streamlit/pull/11930)). +- 🖼️ `st.image`, `st.pyplot`, and `st.graphviz_chart` have a `width` parameter to use them with flex layouts ([#11952](https://github.com/streamlit/streamlit/pull/11952), [#12212](https://github.com/streamlit/streamlit/pull/12212)). +- 📈 Users can access the underlying data of a Vega chart through the toolbar. This includes all data passed to the chart, even if it's not displayed ([#10311](https://github.com/streamlit/streamlit/pull/10311)). +- ☠️ `st.bokeh_chart` is deprecated. Use the [`streamlit-bokeh`](https://github.com/streamlit/streamlit-bokeh) custom component instead. +- 🧹 We removed deprecated commands and parameters: `st.experimental_dialog`, `st.experimental_fragment`, and caching's `experimental_allow_widgets` ([#12167](https://github.com/streamlit/streamlit/pull/12167)). + +**Other Changes** + +- 🏃‍♂️ For better performance, `st.slider` will not rerun the app until the user releases the slider thumb ([#11879](https://github.com/streamlit/streamlit/pull/11879), [#4541](https://github.com/streamlit/streamlit/issues/4541)). +- 💅 For improved custom theming, single mark charts use the first categorical chart color ([#12162](https://github.com/streamlit/streamlit/pull/12162)). +- 🌐 For `st.logo`, the `crossorigin` property can be configured by hosts ([#12226](https://github.com/streamlit/streamlit/pull/12226)). +- 🎨 The colored decoration line at the top of Streamlit apps was removed ([#12155](https://github.com/streamlit/streamlit/pull/12155)). +- 👻 The copy-to-clipboard function of multiple elements gives a checkmark feedback to users when they copy something ([#12141](https://github.com/streamlit/streamlit/pull/12141), [#12172](https://github.com/streamlit/streamlit/pull/12172)). +- 🫥 Users can quickly hide or unhide all columns in a dataframe ([#12164](https://github.com/streamlit/streamlit/pull/12164), [#12082](https://github.com/streamlit/streamlit/issues/12082)). Thanks, [plumol](https://github.com/plumol)! +- ℹ️ Material icons were updated ([#12264](https://github.com/streamlit/streamlit/pull/12264)). +- 👽 Bug fix: `CheckboxColumn` uses the radii from the theming configuration options ([#12263](https://github.com/streamlit/streamlit/pull/12263)). +- 🦀 Bug fix: A column's menu is not accessible when the column is hidden ([#12233](https://github.com/streamlit/streamlit/pull/12233), [#12230](https://github.com/streamlit/streamlit/issues/12230)). Thanks, [plumol](https://github.com/plumol)! +- 🦋 Bug fix: Streamlit correctly caches Pydantic models ([#12137](https://github.com/streamlit/streamlit/pull/12137), [#10348](https://github.com/streamlit/streamlit/issues/10348)). +- 🦎 Bug fix: `st.plotly_chart` correctly handles null selections ([#12222](https://github.com/streamlit/streamlit/pull/12222), [#12191](https://github.com/streamlit/streamlit/issues/12191)). +- 🐌 Bug fix: When using `accept_new_options=True` with `st.selectbox`, mobile users can access their keyboards ([#12219](https://github.com/streamlit/streamlit/pull/12219), [#12205](https://github.com/streamlit/streamlit/issues/12205)). +- 🕸️ Bug fix: Streamlit does not raise an error when the user's email is empty and `server.showEmailPrompt` is false ([#12202](https://github.com/streamlit/streamlit/pull/12202), [#12166](https://github.com/streamlit/streamlit/issues/12166)). Thanks, [wyattscarpenter](https://github.com/wyattscarpenter)! +- 🦗 Bug fix: The drop area of `st.file_uploader` correctly truncates a long list of file types ([#12192](https://github.com/streamlit/streamlit/pull/12192), [#12189](https://github.com/streamlit/streamlit/issues/12189)). +- 🦂 Bug fix: The corner radius of `st.page_link` matches the navigation widget instead of the border radius configured for buttons ([#12181](https://github.com/streamlit/streamlit/pull/12181)). +- 🦟 Bug fix: Cached replay correctly handles element height and width for flex layouts ([#12183](https://github.com/streamlit/streamlit/pull/12183)). +- 🦠 Bug fix: When a client disconnects from a Streamlit server and the user dismisses the warning, the client will re-raise the warning while the app remains disconnected ([#12178](https://github.com/streamlit/streamlit/pull/12178), [#12113](https://github.com/streamlit/streamlit/issues/12113)). +- 🪰 Bug fix: Identity provider logout was reverted to prevent redirect failures in `st.logout()` ([#12179](https://github.com/streamlit/streamlit/pull/12179)). +- 🪳 Bug fix: Currency symbols in column configuration are narrowly formatted ([#11895](https://github.com/streamlit/streamlit/pull/11895)). +- 🕷️ Bug fix: Users can't remove files from `st.file_uploader` while the widget is disabled ([#12180](https://github.com/streamlit/streamlit/pull/12180), [#12146](https://github.com/streamlit/streamlit/issues/12146)). +- 🐞 Bug fix: `pip install` works correctly in Windows ([#8952](https://github.com/streamlit/streamlit/pull/8952)). Thanks, [Dev-iL](https://github.com/Dev-iL)! +- 🐝 Bug fix: The drop-down menu for `st.time_input` uses theme colors consistently with other elements ([#12157](https://github.com/streamlit/streamlit/pull/12157)). +- 🐜 Bug fix: `st.toast` uses custom theme colors ([#12160](https://github.com/streamlit/streamlit/pull/12160), [#11951](https://github.com/streamlit/streamlit/issues/11951)). +- 🪲 Bug fix: The width handling of custom components was updated to work with horizontal containers ([#12148](https://github.com/streamlit/streamlit/pull/12148)). +- 🐛 Bug fix: `st.chat_input` correctly resizes itself after the user submits a long message ([#12132](https://github.com/streamlit/streamlit/pull/12132), [#12079](https://github.com/streamlit/streamlit/issues/12079)). + ## **Version 1.48.0** _Release date: August 5, 2025_ diff --git a/content/develop/quick-references/release-notes/_index.md b/content/develop/quick-references/release-notes/_index.md index 0a78ff10c..29398bc8b 100644 --- a/content/develop/quick-references/release-notes/_index.md +++ b/content/develop/quick-references/release-notes/_index.md @@ -21,44 +21,58 @@ pip install --upgrade streamlit -## **Version 1.48.0 (latest)** +## **Version 1.49.0 (latest)** -_Release date: August 5, 2025_ +_Release date: August 26, 2025_ **Highlights** -- 💪 Announcing horizontal flex [containers](/develop/api-reference/layout/st.container)! Configure the alignment, direction, and gap of containers to create dynamic layouts. +- 📄 Introducing [`st.pdf`](/develop/api-reference/media/st.pdf) to beautifully render PDF documents in your app! +- ⛏️ Dataframes support [cell selections](/develop/api-reference/data/st.dataframe#dataframeselectionstate)! +- ✨ You can add sparklines to [`st.metric`](/develop/api-reference/data/st.metric)! +- ✏️ [`ListColumn`](/develop/api-reference/data/st.column_config/st.column_config.listcolumn) is now editable! +- 📂 Users can upload a directory of files with [`st.file_uploader`](/develop/api-reference/widgets/st.file_uploader) or [`st.chat_input`](/develop/api-reference/chat/st.chat_input). **Notable Changes** -- 🪵 [`st.logout`](/develop/api-reference/user/st.logout) will log the user out of their identity provider if the server metadata includes `end_session_endpoint` ([#11901](https://github.com/streamlit/streamlit/pull/11901), [#11900](https://github.com/streamlit/streamlit/issues/11900)). Thanks, [velochy](https://github.com/velochy)! -- 💬 You can configure the dismissibility of [`st.dialog`](/develop/api-reference/execution-flow/st.dialog) and set callback functions ([#9504](https://github.com/streamlit/streamlit/pull/9504), [#12034](https://github.com/streamlit/streamlit/pull/12034)). Thanks, [souvikmaji](https://github.com/souvikmaji)! -- ↔️ You can set a `width` parameter for [buttons](/develop/api-reference/widgets/st.button) and [popovers](/develop/api-reference/layout/st.popover). -- 🧑‍💻 [`codeFontWeight`](/develop/api-reference/configuration/config.toml#sidebar-theme) can be configured separately in the sidebar. -- 📶 You can configure the WebSocket ping interval with the [`server.websocketPingInterval`](/develop/api-reference/configuration/config.toml#server) configuration option ([#12117](https://github.com/streamlit/streamlit/pull/12117), [#12108](https://github.com/streamlit/streamlit/issues/12108)). +- 🏷️ You can configure the labels of options in [`SelectboxColumn`](/develop/api-reference/data/st.column_config/st.column_config.selectboxcolumn) with a new `format_func` parameter ([#12232](https://github.com/streamlit/streamlit/pull/12232), [#6795](https://github.com/streamlit/streamlit/issues/6795)). +- 🍞 You can configure the duration of [`st.toast`](/develop/api-reference/status/st.toast) messages ([#11872](https://github.com/streamlit/streamlit/pull/11872), [#7047](https://github.com/streamlit/streamlit/issues/7047)). +- 🔑 [`st.form_submit_button`](/develop/api-reference/execution-flow/st.form_submit_button) has a `key` parameter ([#12190](https://github.com/streamlit/streamlit/pull/12190), [#12121](https://github.com/streamlit/streamlit/issues/12121)). +- 🌻 [Markdown](/develop/api-reference/text/st.markdown) and heading dividers can be yellow ([#12201](https://github.com/streamlit/streamlit/pull/12201)). +- 💬 [`st.dialog`](/develop/api-reference/execution-flow/st.dialog) widths have a larger option ([#12040](https://github.com/streamlit/streamlit/pull/12040), [#8904](https://github.com/streamlit/streamlit/issues/8904)). +- 💻 `st.dataframe` and `st.data_editor` have `width` and `height` to use with flex layouts ([#11930](https://github.com/streamlit/streamlit/pull/11930)). +- 🖼️ `st.image`, `st.pyplot`, and `st.graphviz_chart` have a `width` parameter to use them with flex layouts ([#11952](https://github.com/streamlit/streamlit/pull/11952), [#12212](https://github.com/streamlit/streamlit/pull/12212)). +- 📈 Users can access the underlying data of a Vega chart through the toolbar. This includes all data passed to the chart, even if it's not displayed ([#10311](https://github.com/streamlit/streamlit/pull/10311)). +- ☠️ `st.bokeh_chart` is deprecated. Use the [`streamlit-bokeh`](https://github.com/streamlit/streamlit-bokeh) custom component instead. +- 🧹 We removed deprecated commands and parameters: `st.experimental_dialog`, `st.experimental_fragment`, and caching's `experimental_allow_widgets` ([#12167](https://github.com/streamlit/streamlit/pull/12167)). **Other Changes** -- 🌀 The spinner design was unified across Streamlit commands ([#12031](https://github.com/streamlit/streamlit/pull/12031)). -- 💅 Design and style tweaks ([#12032](https://github.com/streamlit/streamlit/pull/12032), [#11989](https://github.com/streamlit/streamlit/pull/11989), [#11986](https://github.com/streamlit/streamlit/pull/11986), [#11999](https://github.com/streamlit/streamlit/pull/11999), [#12015](https://github.com/streamlit/streamlit/pull/12015), [#11995](https://github.com/streamlit/streamlit/pull/11995), [#11981](https://github.com/streamlit/streamlit/pull/11981), [#11964](https://github.com/streamlit/streamlit/pull/11964)). -- 🔄 Error logic and logging was improved to reduce confusion from `asyncio` runtime errors when unrelated errors are raised ([#12008](https://github.com/streamlit/streamlit/pull/12008)). -- 🪧 Dataframe column menus include an icon to show the column type and a button to copy the column name ([#11303](https://github.com/streamlit/streamlit/pull/11303)). -- 💽 For convenience, there are additional "extras" installation options ([#11760](https://github.com/streamlit/streamlit/pull/11760), [#8233](https://github.com/streamlit/streamlit/issues/8233)). -- 📁 Additional checks are performed to validate the extension of uploaded files, but app developers are still responsible for checking and handling the security of uploaded files ([#11884](https://github.com/streamlit/streamlit/pull/11884), [#11883](https://github.com/streamlit/streamlit/issues/11883)). -- 🔘 Button group widgets are identified by their command name in error messages ([#11769](https://github.com/streamlit/streamlit/pull/11769), [#11753](https://github.com/streamlit/streamlit/issues/11753)). Thanks, [bajajku](https://github.com/bajajku)! -- ⚔️ For `st.snow`, `st.balloons`, chat avatars, and media elements, the `crossorigin` property can be configured by hosts ([#12087](https://github.com/streamlit/streamlit/pull/12087), [#11948](https://github.com/streamlit/streamlit/pull/11948)). -- 🦗 Bug fix: Ctrl+C will stop a Streamlit server in Windows, even if there is no active session ([#12049](https://github.com/streamlit/streamlit/pull/12049), [#6855](https://github.com/streamlit/streamlit/issues/6855)). -- 🦂 Bug fix: `st.line_chart` uses the column order in the chart data instead of reordering them alphabetically ([#12092](https://github.com/streamlit/streamlit/pull/12092), [#12071](https://github.com/streamlit/streamlit/issues/12071)). -- 🦟 Bug fix: Menu items set in `st.set_page_config` are not hidden when `client.toolbarMode` is set to `"minimal"` ([#12091](https://github.com/streamlit/streamlit/pull/12091), [#12083](https://github.com/streamlit/streamlit/issues/12083)). -- 🦠 Bug fix: `theme.codeFontWeight` does not interfere with bold inline code ([#12074](https://github.com/streamlit/streamlit/pull/12074), [#11976](https://github.com/streamlit/streamlit/issues/11976)). -- 🪰 Bug fix: To allow fractional pixel values, heading font sizes in theming configuration aren't rounded ([#12077](https://github.com/streamlit/streamlit/pull/12077), [#11963](https://github.com/streamlit/streamlit/issues/11963)). -- 🪳 Bug fix: Altair 5.4.0 and 5.4.1 have been excluded to prevent an upstream bug with reading dataframes ([#12066](https://github.com/streamlit/streamlit/pull/12066), [#12064](https://github.com/streamlit/streamlit/issues/12064)). -- 🕷️ Bug fix: Dataframe scrollbars have been tweaked to avoid sizing problems ([#11936](https://github.com/streamlit/streamlit/pull/11936), [#11921](https://github.com/streamlit/streamlit/issues/11921), [#12053](https://github.com/streamlit/streamlit/issues/12053), [#11985](https://github.com/streamlit/streamlit/issues/11985)). -- 🐞 Bug fix: Linting accepts lists in addition to tuples for callback arguments in widgets ([#12039](https://github.com/streamlit/streamlit/pull/12039)). -- 🐝 Bug fix: To fix a deprecation warning, Altair theme syntax was updated ([#12050](https://github.com/streamlit/streamlit/pull/12050)). -- 🐜 Bug fix: `st.navigation` does not hide the menu when a single section is used with `position="top"` ([#12025](https://github.com/streamlit/streamlit/pull/12025), [#12029](https://github.com/streamlit/streamlit/issues/12029)). -- 🪲 Bug fix: The sidebar state does not reset when the window is resized ([#12024](https://github.com/streamlit/streamlit/pull/12024), [#12016](https://github.com/streamlit/streamlit/issues/12016)). -- 🐛 Bug fix: `st.pills` and `st.segmented_control` don't raise unintended `StreamlitDuplicateElementId` errors ([#11982](https://github.com/streamlit/streamlit/pull/11982), [#11975](https://github.com/streamlit/streamlit/issues/11975)). +- 🏃‍♂️ For better performance, `st.slider` will not rerun the app until the user releases the slider thumb ([#11879](https://github.com/streamlit/streamlit/pull/11879), [#4541](https://github.com/streamlit/streamlit/issues/4541)). +- 💅 For improved custom theming, single mark charts use the first categorical chart color ([#12162](https://github.com/streamlit/streamlit/pull/12162)). +- 🌐 For `st.logo`, the `crossorigin` property can be configured by hosts ([#12226](https://github.com/streamlit/streamlit/pull/12226)). +- 🎨 The colored decoration line at the top of Streamlit apps was removed ([#12155](https://github.com/streamlit/streamlit/pull/12155)). +- 👻 The copy-to-clipboard function of multiple elements gives a checkmark feedback to users when they copy something ([#12141](https://github.com/streamlit/streamlit/pull/12141), [#12172](https://github.com/streamlit/streamlit/pull/12172)). +- 🫥 Users can quickly hide or unhide all columns in a dataframe ([#12164](https://github.com/streamlit/streamlit/pull/12164), [#12082](https://github.com/streamlit/streamlit/issues/12082)). Thanks, [plumol](https://github.com/plumol)! +- ℹ️ Material icons were updated ([#12264](https://github.com/streamlit/streamlit/pull/12264)). +- 👽 Bug fix: `CheckboxColumn` uses the radii from the theming configuration options ([#12263](https://github.com/streamlit/streamlit/pull/12263)). +- 🦀 Bug fix: A column's menu is not accessible when the column is hidden ([#12233](https://github.com/streamlit/streamlit/pull/12233), [#12230](https://github.com/streamlit/streamlit/issues/12230)). Thanks, [plumol](https://github.com/plumol)! +- 🦋 Bug fix: Streamlit correctly caches Pydantic models ([#12137](https://github.com/streamlit/streamlit/pull/12137), [#10348](https://github.com/streamlit/streamlit/issues/10348)). +- 🦎 Bug fix: `st.plotly_chart` correctly handles null selections ([#12222](https://github.com/streamlit/streamlit/pull/12222), [#12191](https://github.com/streamlit/streamlit/issues/12191)). +- 🐌 Bug fix: When using `accept_new_options=True` with `st.selectbox`, mobile users can access their keyboards ([#12219](https://github.com/streamlit/streamlit/pull/12219), [#12205](https://github.com/streamlit/streamlit/issues/12205)). +- 🕸️ Bug fix: Streamlit does not raise an error when the user's email is empty and `server.showEmailPrompt` is false ([#12202](https://github.com/streamlit/streamlit/pull/12202), [#12166](https://github.com/streamlit/streamlit/issues/12166)). Thanks, [wyattscarpenter](https://github.com/wyattscarpenter)! +- 🦗 Bug fix: The drop area of `st.file_uploader` correctly truncates a long list of file types ([#12192](https://github.com/streamlit/streamlit/pull/12192), [#12189](https://github.com/streamlit/streamlit/issues/12189)). +- 🦂 Bug fix: The corner radius of `st.page_link` matches the navigation widget instead of the border radius configured for buttons ([#12181](https://github.com/streamlit/streamlit/pull/12181)). +- 🦟 Bug fix: Cached replay correctly handles element height and width for flex layouts ([#12183](https://github.com/streamlit/streamlit/pull/12183)). +- 🦠 Bug fix: When a client disconnects from a Streamlit server and the user dismisses the warning, the client will re-raise the warning while the app remains disconnected ([#12178](https://github.com/streamlit/streamlit/pull/12178), [#12113](https://github.com/streamlit/streamlit/issues/12113)). +- 🪰 Bug fix: Identity provider logout was reverted to prevent redirect failures in `st.logout()` ([#12179](https://github.com/streamlit/streamlit/pull/12179)). +- 🪳 Bug fix: Currency symbols in column configuration are narrowly formatted ([#11895](https://github.com/streamlit/streamlit/pull/11895)). +- 🕷️ Bug fix: Users can't remove files from `st.file_uploader` while the widget is disabled ([#12180](https://github.com/streamlit/streamlit/pull/12180), [#12146](https://github.com/streamlit/streamlit/issues/12146)). +- 🐞 Bug fix: `pip install` works correctly in Windows ([#8952](https://github.com/streamlit/streamlit/pull/8952)). Thanks, [Dev-iL](https://github.com/Dev-iL)! +- 🐝 Bug fix: The drop-down menu for `st.time_input` uses theme colors consistently with other elements ([#12157](https://github.com/streamlit/streamlit/pull/12157)). +- 🐜 Bug fix: `st.toast` uses custom theme colors ([#12160](https://github.com/streamlit/streamlit/pull/12160), [#11951](https://github.com/streamlit/streamlit/issues/11951)). +- 🪲 Bug fix: The width handling of custom components was updated to work with horizontal containers ([#12148](https://github.com/streamlit/streamlit/pull/12148)). +- 🐛 Bug fix: `st.chat_input` correctly resizes itself after the user submits a long message ([#12132](https://github.com/streamlit/streamlit/pull/12132), [#12079](https://github.com/streamlit/streamlit/issues/12079)). ## Older versions of Streamlit diff --git a/content/menu.md b/content/menu.md index 36bec911c..2ab7bff88 100644 --- a/content/menu.md +++ b/content/menu.md @@ -398,6 +398,9 @@ site_menu: - category: Develop / API reference / Media elements / st.logo url: /develop/api-reference/media/st.logo isVersioned: true + - category: Develop / API reference / Media elements / st.pdf + url: /develop/api-reference/media/st.pdf + isVersioned: true - category: Develop / API reference / Media elements / st.video url: /develop/api-reference/media/st.video isVersioned: true diff --git a/pages/index.js b/pages/index.js index 3daf8d355..d7e46a0b1 100644 --- a/pages/index.js +++ b/pages/index.js @@ -192,72 +192,66 @@ export default function Home({ window, menu }) { - dashboard -

Flex containers

+ description +

PDF viewer

- You can set the direction, alignment, and gap of elements in{" "} - st.container. + You can display a PDF file with st.pdf.

- close -

Dialog dismissibility

+ ads_click +

Dataframe cell selection

- You can control the dismissibility of modal dialogs. You can - also configure dismissal reruns and callbacks. + st.dataframe supports single and multiple cell + selections.

- network_ping -

WebSocket ping interval

+ show_chart +

Metric sparklines

- Streamlit now allows you to configure the WebSocket ping - interval with server.websocketPingInterval. + You can add sparklines to st.metric.

settings

- Theme configuration + Editable ListColumn

- Try out even more theme configuration options in{" "} - config.toml, including new color, font, and style - settings. + ListColumn supports editing.

- signpost -

Top navigation

+ folder +

Directory upload

- Use st.navigation with{" "} - position="top" - to create a navigation menu across the top of your app. + Users can upload all files in a directory with{" "} + st.file_uploader and st.chat_input.

- light_mode -

Detect theme base

+ timer +

Toast duration

- You can detect if the viewer is in light mode or dark mode at - runtime with st.context.theme. + You can configure the duration of st.toast.

diff --git a/public/images/api/pdf.jpg b/public/images/api/pdf.jpg new file mode 100644 index 000000000..b32fe583f Binary files /dev/null and b/public/images/api/pdf.jpg differ diff --git a/python/api-examples-source/charts.video3/requirements.txt b/python/api-examples-source/charts.video3/requirements.txt index a8ee71bca..8c0e231a1 100644 --- a/python/api-examples-source/charts.video3/requirements.txt +++ b/python/api-examples-source/charts.video3/requirements.txt @@ -1,2 +1,2 @@ -streamlit-nightly +streamlit>=1.49.0 webvtt-py \ No newline at end of file diff --git a/python/api-examples-source/data.dataframe_event_state_selections.py b/python/api-examples-source/data.dataframe_event_state_selections.py index 3f9215c96..3d006ec72 100644 --- a/python/api-examples-source/data.dataframe_event_state_selections.py +++ b/python/api-examples-source/data.dataframe_event_state_selections.py @@ -10,6 +10,6 @@ df, key="data", on_select="rerun", - selection_mode=["multi-row", "multi-column"], + selection_mode=["multi-row", "multi-column", "multi-cell"], ) event.selection diff --git a/python/api-examples-source/data.list_column.py b/python/api-examples-source/data.list_column.py index 97e0800af..fee8da2aa 100644 --- a/python/api-examples-source/data.list_column.py +++ b/python/api-examples-source/data.list_column.py @@ -7,10 +7,10 @@ def load_data(): return pd.DataFrame( { "sales": [ - [0, 4, 26, 80, 100, 40], - [80, 20, 80, 35, 40, 100], - [10, 20, 80, 80, 70, 0], - [10, 100, 20, 100, 30, 100], + ["0", "4", "26", "80", "100", "40"], + ["80", "20", "80", "35", "40", "100"], + ["10", "20", "80", "80", "70", "0"], + ["10", "100", "20", "100", "30", "100"], ], } ) diff --git a/python/api-examples-source/guides/requirements.txt b/python/api-examples-source/guides/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/guides/requirements.txt +++ b/python/api-examples-source/guides/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/hello/requirements.txt b/python/api-examples-source/hello/requirements.txt index 46748ba36..930f3a967 100644 --- a/python/api-examples-source/hello/requirements.txt +++ b/python/api-examples-source/hello/requirements.txt @@ -2,4 +2,4 @@ pandas==1.5.3 numpy==1.23.5 altair==4.2.0 pydeck==0.8.0 -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/mpa-hello/requirements.txt b/python/api-examples-source/mpa-hello/requirements.txt index aa4d6800c..6514841c2 100644 --- a/python/api-examples-source/mpa-hello/requirements.txt +++ b/python/api-examples-source/mpa-hello/requirements.txt @@ -3,4 +3,4 @@ numpy==1.23.5 altair==4.2.0 pydeck==0.8.0 opencv-python-headless==4.8.1.78 -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/navigation.example_1/requirements.txt b/python/api-examples-source/navigation.example_1/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/navigation.example_1/requirements.txt +++ b/python/api-examples-source/navigation.example_1/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/navigation.example_2/requirements.txt b/python/api-examples-source/navigation.example_2/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/api-examples-source/navigation.example_2/requirements.txt +++ b/python/api-examples-source/navigation.example_2/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/api-examples-source/navigation.example_top/requirements.txt b/python/api-examples-source/navigation.example_top/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/api-examples-source/navigation.example_top/requirements.txt +++ b/python/api-examples-source/navigation.example_top/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/api-examples-source/requirements.txt b/python/api-examples-source/requirements.txt index 1e2937ca5..cb917b9ce 100644 --- a/python/api-examples-source/requirements.txt +++ b/python/api-examples-source/requirements.txt @@ -11,4 +11,4 @@ pydeck Faker openai vega_datasets -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/st-experimental-connection/1.22/st-experimental-connection/requirements.txt b/python/api-examples-source/st-experimental-connection/1.22/st-experimental-connection/requirements.txt index 5cefc45c1..712386cc4 100644 --- a/python/api-examples-source/st-experimental-connection/1.22/st-experimental-connection/requirements.txt +++ b/python/api-examples-source/st-experimental-connection/1.22/st-experimental-connection/requirements.txt @@ -1,4 +1,4 @@ -streamlit-nightly +streamlit>=1.49.0 toml sqlalchemy==1.4 duckdb diff --git a/python/api-examples-source/status.toast.py b/python/api-examples-source/status.toast.py index 0a2fddd03..5f4c6258c 100644 --- a/python/api-examples-source/status.toast.py +++ b/python/api-examples-source/status.toast.py @@ -1,3 +1,4 @@ import streamlit as st -st.toast("Your edited image was saved!", icon="😍") +if st.button("Toast"): + st.toast("Your edited image was saved!", icon="😍") diff --git a/python/api-examples-source/theming/requirements.txt b/python/api-examples-source/theming/requirements.txt index a93dd41a2..eb6254ecd 100644 --- a/python/api-examples-source/theming/requirements.txt +++ b/python/api-examples-source/theming/requirements.txt @@ -1,4 +1,4 @@ -streamlit-nightly +streamlit>=1.49.0 vega_datasets altair==4.2.0 plotly==5.13.0 \ No newline at end of file diff --git a/python/api-examples-source/tutorials/custom-navigation/requirements.txt b/python/api-examples-source/tutorials/custom-navigation/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/tutorials/custom-navigation/requirements.txt +++ b/python/api-examples-source/tutorials/custom-navigation/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/tutorials/elements/charts/requirements.txt b/python/api-examples-source/tutorials/elements/charts/requirements.txt index f5966bf57..798dbe91e 100644 --- a/python/api-examples-source/tutorials/elements/charts/requirements.txt +++ b/python/api-examples-source/tutorials/elements/charts/requirements.txt @@ -1,2 +1,2 @@ vega_datasets -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/api-examples-source/tutorials/elements/dataframes/requirements.txt b/python/api-examples-source/tutorials/elements/dataframes/requirements.txt index 7319bdccf..0094ba305 100644 --- a/python/api-examples-source/tutorials/elements/dataframes/requirements.txt +++ b/python/api-examples-source/tutorials/elements/dataframes/requirements.txt @@ -1,2 +1,2 @@ Faker -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/api-examples-source/tutorials/requirements.txt b/python/api-examples-source/tutorials/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/tutorials/requirements.txt +++ b/python/api-examples-source/tutorials/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/utilities.switch_page/requirements.txt b/python/api-examples-source/utilities.switch_page/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/utilities.switch_page/requirements.txt +++ b/python/api-examples-source/utilities.switch_page/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/api-examples-source/widget.file_uploader.py b/python/api-examples-source/widget.file_uploader.py index 6ed38bfd1..8d1fa7d6b 100644 --- a/python/api-examples-source/widget.file_uploader.py +++ b/python/api-examples-source/widget.file_uploader.py @@ -1,6 +1,10 @@ +import pandas as pd import streamlit as st -uploaded_files = st.file_uploader("Choose a file", accept_multiple_files=True) +uploaded_files = st.file_uploader( + "Upload data", accept_multiple_files=True, type="csv" +) for uploaded_file in uploaded_files: - st.write("filename:", uploaded_file.name) + df = pd.read_csv(uploaded_file) + st.write(df) diff --git a/python/api-examples-source/widget.page_link/requirements.txt b/python/api-examples-source/widget.page_link/requirements.txt index a4462d862..86cf1a2a4 100644 --- a/python/api-examples-source/widget.page_link/requirements.txt +++ b/python/api-examples-source/widget.page_link/requirements.txt @@ -1 +1 @@ -streamlit-nightly +streamlit>=1.49.0 diff --git a/python/concept-source/requirements.txt b/python/concept-source/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/requirements.txt +++ b/python/concept-source/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-color-backgroundColor/requirements.txt b/python/concept-source/theming-color-backgroundColor/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-color-backgroundColor/requirements.txt +++ b/python/concept-source/theming-color-backgroundColor/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-color-baseRadius/requirements.txt b/python/concept-source/theming-color-baseRadius/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-color-baseRadius/requirements.txt +++ b/python/concept-source/theming-color-baseRadius/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-color-borderColor/requirements.txt b/python/concept-source/theming-color-borderColor/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-color-borderColor/requirements.txt +++ b/python/concept-source/theming-color-borderColor/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-color-primaryColor/requirements.txt b/python/concept-source/theming-color-primaryColor/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-color-primaryColor/requirements.txt +++ b/python/concept-source/theming-color-primaryColor/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-color-textColor/requirements.txt b/python/concept-source/theming-color-textColor/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-color-textColor/requirements.txt +++ b/python/concept-source/theming-color-textColor/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-overview-anthropic-light-inspried/requirements.txt b/python/concept-source/theming-overview-anthropic-light-inspried/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-overview-anthropic-light-inspried/requirements.txt +++ b/python/concept-source/theming-overview-anthropic-light-inspried/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/concept-source/theming-overview-spotify-inspired/requirements.txt b/python/concept-source/theming-overview-spotify-inspired/requirements.txt index 13e4deab9..18f830800 100644 --- a/python/concept-source/theming-overview-spotify-inspired/requirements.txt +++ b/python/concept-source/theming-overview-spotify-inspired/requirements.txt @@ -1 +1 @@ -streamlit-nightly \ No newline at end of file +streamlit>=1.49.0 \ No newline at end of file diff --git a/python/streamlit.json b/python/streamlit.json index c1f0c5311..a3a2b4c95 100644 --- a/python/streamlit.json +++ b/python/streamlit.json @@ -8353,7 +8353,7 @@ "streamlit.column_config.ListColumn": { "name": "ListColumn", "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            ["0", "4", "26", "80", "100", "40"],\n            ["80", "20", "80", "35", "40", "100"],\n            ["10", "20", "80", "80", "70", "0"],\n            ["10", "100", "20", "100", "30", "100"],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", "args": [ { @@ -17510,7 +17510,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -22691,7 +22691,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -28115,7 +28115,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -33591,7 +33591,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -41661,7 +41661,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -49755,7 +49755,7 @@ "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -52345,7 +52345,8824 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L371" + }, + "AppTest.caption": { + "name": "caption", + "signature": "AppTest.caption", + "description": "

Sequence of all st.caption elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Caption", + "is_generator": false, + "description": "

Sequence of all st.caption elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.caption[0] for the first element. Caption is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L386" + }, + "AppTest.chat_input": { + "name": "chat_input", + "signature": "AppTest.chat_input", + "description": "

Sequence of all st.chat_input widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ChatInput", + "is_generator": false, + "description": "

Sequence of all st.chat_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.chat_input[0] for the first widget or\nat.chat_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L400" + }, + "AppTest.chat_message": { + "name": "chat_message", + "signature": "AppTest.chat_message", + "description": "

Sequence of all st.chat_message elements.

\n", + "args": [], + "returns": [ + { + "type_name": "Sequence of ChatMessage", + "is_generator": false, + "description": "

Sequence of all st.chat_message elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.chat_message[0] for the first element. ChatMessage\nis an extension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L414" + }, + "AppTest.checkbox": { + "name": "checkbox", + "signature": "AppTest.checkbox", + "description": "

Sequence of all st.checkbox widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Checkbox", + "is_generator": false, + "description": "

Sequence of all st.checkbox widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.checkbox[0] for the first widget or\nat.checkbox(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L428" + }, + "AppTest.code": { + "name": "code", + "signature": "AppTest.code", + "description": "

Sequence of all st.code elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Code", + "is_generator": false, + "description": "

Sequence of all st.code elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.code[0] for the first element. Code is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L442" + }, + "AppTest.color_picker": { + "name": "color_picker", + "signature": "AppTest.color_picker", + "description": "

Sequence of all st.color_picker widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ColorPicker", + "is_generator": false, + "description": "

Sequence of all st.color_picker widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.color_picker[0] for the first widget or\nat.color_picker(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L456" + }, + "AppTest.columns": { + "name": "columns", + "signature": "AppTest.columns", + "description": "

Sequence of all columns within st.columns elements.

\n

Each column within a single st.columns will be returned as a\nseparate Column in the Sequence.

\n", + "args": [], + "returns": [ + { + "type_name": "Sequence of Column", + "is_generator": false, + "description": "

Sequence of all columns within st.columns elements. Individual\ncolumns can be accessed from an ElementList by index (order on the\npage). For example, at.columns[0] for the first column. Column\nis an extension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L470" + }, + "AppTest.dataframe": { + "name": "dataframe", + "signature": "AppTest.dataframe", + "description": "

Sequence of all st.dataframe elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Dataframe", + "is_generator": false, + "description": "

Sequence of all st.dataframe elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.dataframe[0] for the first element. Dataframe is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L487" + }, + "AppTest.date_input": { + "name": "date_input", + "signature": "AppTest.date_input", + "description": "

Sequence of all st.date_input widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of DateInput", + "is_generator": false, + "description": "

Sequence of all st.date_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.date_input[0] for the first widget or\nat.date_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L501" + }, + "AppTest.divider": { + "name": "divider", + "signature": "AppTest.divider", + "description": "

Sequence of all st.divider elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Divider", + "is_generator": false, + "description": "

Sequence of all st.divider elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.divider[0] for the first element. Divider is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L515" + }, + "AppTest.error": { + "name": "error", + "signature": "AppTest.error", + "description": "

Sequence of all st.error elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Error", + "is_generator": false, + "description": "

Sequence of all st.error elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.error[0] for the first element. Error is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L529" + }, + "AppTest.exception": { + "name": "exception", + "signature": "AppTest.exception", + "description": "

Sequence of all st.exception elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Exception", + "is_generator": false, + "description": "

Sequence of all st.exception elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.exception[0] for the first element. Exception is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L543" + }, + "AppTest.from_file": { + "name": "from_file", + "signature": "AppTest.from_file(cls, script_path, *, default_timeout=3)", + "description": "

Create an instance of AppTest to simulate an app page defined within a file.

\n

This option is most convenient for CI workflows and testing of\npublished apps. The script must be executable on its own and so must\ncontain all necessary imports.

\n", + "args": [ + { + "name": "script_path", + "type_name": "str", + "is_optional": false, + "description": "

Path to a script file. The path should be absolute or relative to\nthe file calling .from_file.

\n", + "default": null + }, + { + "name": "default_timeout", + "type_name": "float", + "is_optional": false, + "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", + "default": "time" + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

A simulated Streamlit app for testing. The simulated app can be\nexecuted via .run().

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L232" + }, + "AppTest.from_function": { + "name": "from_function", + "signature": "AppTest.from_function(cls, script, *, default_timeout=3)", + "description": "

Create an instance of AppTest to simulate an app page defined within a function.

\n

This is similar to AppTest.from_string(), but more convenient to\nwrite with IDE assistance. The script must be executable on its own and\nso must contain all necessary imports.

\n", + "args": [ + { + "name": "script", + "type_name": "Callable", + "is_optional": false, + "description": "

A function whose body will be used as a script. Must be runnable\nin isolation, so it must include any necessary imports.

\n", + "default": null + }, + { + "name": "default_timeout", + "type_name": "float", + "is_optional": false, + "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", + "default": "time" + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

A simulated Streamlit app for testing. The simulated app can be\nexecuted via .run().

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L194" + }, + "AppTest.from_string": { + "name": "from_string", + "signature": "AppTest.from_string(cls, script, *, default_timeout=3)", + "description": "

Create an instance of AppTest to simulate an app page defined within a string.

\n

This is useful for testing short scripts that fit comfortably as an\ninline string in the test itself, without having to create a separate\nfile for it. The script must be executable on its own and so must\ncontain all necessary imports.

\n", + "args": [ + { + "name": "script", + "type_name": "str", + "is_optional": false, + "description": "

The string contents of the script to be run.

\n", + "default": null + }, + { + "name": "default_timeout", + "type_name": "float", + "is_optional": false, + "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", + "default": "time" + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

A simulated Streamlit app for testing. The simulated app can be\nexecuted via .run().

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L159" + }, + "AppTest.get": { + "name": "get", + "signature": "AppTest.get(element_type)", + "description": "

Get elements or widgets of the specified type.

\n

This method returns the collection of all elements or widgets of\nthe specified type on the current page. Retrieve a specific element by\nusing its index (order on page) or key lookup.

\n", + "args": [ + { + "name": "element_type", + "type_name": "str", + "is_optional": false, + "description": "

An element attribute of AppTest. For example, "button",\n"caption", or "chat_input".

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "Sequence of Elements", + "is_generator": false, + "description": "

Sequence of elements of the given type. Individual elements can\nbe accessed from a Sequence by index (order on the page). When\ngetting and element_type that is a widget, individual widgets\ncan be accessed by key. For example, at.get("text")[0] for the\nfirst st.text element or at.get("slider")(key="my_key") for\nthe st.slider widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L908" + }, + "AppTest.header": { + "name": "header", + "signature": "AppTest.header", + "description": "

Sequence of all st.header elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Header", + "is_generator": false, + "description": "

Sequence of all st.header elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.header[0] for the first element. Header is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L557" + }, + "AppTest.info": { + "name": "info", + "signature": "AppTest.info", + "description": "

Sequence of all st.info elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Info", + "is_generator": false, + "description": "

Sequence of all st.info elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.info[0] for the first element. Info is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L571" + }, + "AppTest.json": { + "name": "json", + "signature": "AppTest.json", + "description": "

Sequence of all st.json elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Json", + "is_generator": false, + "description": "

Sequence of all st.json elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.json[0] for the first element. Json is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L585" + }, + "AppTest.latex": { + "name": "latex", + "signature": "AppTest.latex", + "description": "

Sequence of all st.latex elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Latex", + "is_generator": false, + "description": "

Sequence of all st.latex elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.latex[0] for the first element. Latex is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L599" + }, + "AppTest.main": { + "name": "main", + "signature": "AppTest.main", + "description": "

Sequence of elements within the main body of the app.

\n", + "args": [], + "returns": [ + { + "type_name": "Block", + "is_generator": false, + "description": "

A container of elements. Block can be queried for elements in the\nsame manner as AppTest. For example, Block.checkbox will\nreturn all st.checkbox within the associated container.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L345" + }, + "AppTest.markdown": { + "name": "markdown", + "signature": "AppTest.markdown", + "description": "

Sequence of all st.markdown elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Markdown", + "is_generator": false, + "description": "

Sequence of all st.markdown elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.markdown[0] for the first element. Markdown is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L613" + }, + "AppTest.metric": { + "name": "metric", + "signature": "AppTest.metric", + "description": "

Sequence of all st.metric elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Metric", + "is_generator": false, + "description": "

Sequence of all st.metric elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.metric[0] for the first element. Metric is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L627" + }, + "AppTest.multiselect": { + "name": "multiselect", + "signature": "AppTest.multiselect", + "description": "

Sequence of all st.multiselect widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Multiselect", + "is_generator": false, + "description": "

Sequence of all st.multiselect widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.multiselect[0] for the first widget or\nat.multiselect(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L641" + }, + "AppTest.number_input": { + "name": "number_input", + "signature": "AppTest.number_input", + "description": "

Sequence of all st.number_input widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of NumberInput", + "is_generator": false, + "description": "

Sequence of all st.number_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.number_input[0] for the first widget or\nat.number_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L655" + }, + "AppTest.radio": { + "name": "radio", + "signature": "AppTest.radio", + "description": "

Sequence of all st.radio widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Radio", + "is_generator": false, + "description": "

Sequence of all st.radio widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.radio[0] for the first widget or\nat.radio(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L669" + }, + "AppTest.run": { + "name": "run", + "signature": "AppTest.run(*, timeout=None)", + "description": "

Run the script from the current state.

\n

This is equivalent to manually rerunning the app or the rerun that\noccurs upon user interaction. AppTest.run() must be manually called\nafter updating a widget value as script reruns do not occur\nautomatically as they do for live-running Streamlit apps.

\n", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the default timeout set for the instance of AppTest.

\n", + "default": "timeout" + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

self

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L324" + }, + "AppTest.select_slider": { + "name": "select_slider", + "signature": "AppTest.select_slider", + "description": "

Sequence of all st.select_slider widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of SelectSlider", + "is_generator": false, + "description": "

Sequence of all st.select_slider widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.select_slider[0] for the first widget or\nat.select_slider(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L683" + }, + "AppTest.selectbox": { + "name": "selectbox", + "signature": "AppTest.selectbox", + "description": "

Sequence of all st.selectbox widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Selectbox", + "is_generator": false, + "description": "

Sequence of all st.selectbox widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.selectbox[0] for the first widget or\nat.selectbox(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L697" + }, + "AppTest.sidebar": { + "name": "sidebar", + "signature": "AppTest.sidebar", + "description": "

Sequence of all elements within st.sidebar.

\n", + "args": [], + "returns": [ + { + "type_name": "Block", + "is_generator": false, + "description": "

A container of elements. Block can be queried for elements in the\nsame manner as AppTest. For example, Block.checkbox will\nreturn all st.checkbox within the associated container.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L358" + }, + "AppTest.slider": { + "name": "slider", + "signature": "AppTest.slider", + "description": "

Sequence of all st.slider widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Slider", + "is_generator": false, + "description": "

Sequence of all st.slider widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.slider[0] for the first widget or\nat.slider(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L711" + }, + "AppTest.subheader": { + "name": "subheader", + "signature": "AppTest.subheader", + "description": "

Sequence of all st.subheader elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Subheader", + "is_generator": false, + "description": "

Sequence of all st.subheader elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.subheader[0] for the first element. Subheader is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L725" + }, + "AppTest.success": { + "name": "success", + "signature": "AppTest.success", + "description": "

Sequence of all st.success elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Success", + "is_generator": false, + "description": "

Sequence of all st.success elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.success[0] for the first element. Success is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L739" + }, + "AppTest.table": { + "name": "table", + "signature": "AppTest.table", + "description": "

Sequence of all st.table elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Table", + "is_generator": false, + "description": "

Sequence of all st.table elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.table[0] for the first element. Table is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L753" + }, + "AppTest.tabs": { + "name": "tabs", + "signature": "AppTest.tabs", + "description": "

Sequence of all tabs within st.tabs elements.

\n

Each tab within a single st.tabs will be returned as a separate Tab\nin the Sequence. Additionally, the tab labels are forwarded to each\nTab element as a property. For example, st.tabs("A","B") will\nyield two Tab objects, with Tab.label returning "A" and "B",\nrespectively.

\n", + "args": [], + "returns": [ + { + "type_name": "Sequence of Tab", + "is_generator": false, + "description": "

Sequence of all tabs within st.tabs elements. Individual\ntabs can be accessed from an ElementList by index (order on the\npage). For example, at.tabs[0] for the first tab. Tab is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L767" + }, + "AppTest.text": { + "name": "text", + "signature": "AppTest.text", + "description": "

Sequence of all st.text elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Text", + "is_generator": false, + "description": "

Sequence of all st.text elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.text[0] for the first element. Text is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L787" + }, + "AppTest.text_area": { + "name": "text_area", + "signature": "AppTest.text_area", + "description": "

Sequence of all st.text_area widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TextArea", + "is_generator": false, + "description": "

Sequence of all st.text_area widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.text_area[0] for the first widget or\nat.text_area(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L801" + }, + "AppTest.text_input": { + "name": "text_input", + "signature": "AppTest.text_input", + "description": "

Sequence of all st.text_input widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TextInput", + "is_generator": false, + "description": "

Sequence of all st.text_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.text_input[0] for the first widget or\nat.text_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L815" + }, + "AppTest.time_input": { + "name": "time_input", + "signature": "AppTest.time_input", + "description": "

Sequence of all st.time_input widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TimeInput", + "is_generator": false, + "description": "

Sequence of all st.time_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.time_input[0] for the first widget or\nat.time_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L829" + }, + "AppTest.title": { + "name": "title", + "signature": "AppTest.title", + "description": "

Sequence of all st.title elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Title", + "is_generator": false, + "description": "

Sequence of all st.title elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.title[0] for the first element. Title is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L843" + }, + "AppTest.toast": { + "name": "toast", + "signature": "AppTest.toast", + "description": "

Sequence of all st.toast elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Toast", + "is_generator": false, + "description": "

Sequence of all st.toast elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.toast[0] for the first element. Toast is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L857" + }, + "AppTest.toggle": { + "name": "toggle", + "signature": "AppTest.toggle", + "description": "

Sequence of all st.toggle widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Toggle", + "is_generator": false, + "description": "

Sequence of all st.toggle widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.toggle[0] for the first widget or\nat.toggle(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L871" + }, + "AppTest.warning": { + "name": "warning", + "signature": "AppTest.warning", + "description": "

Sequence of all st.warning elements.

\n", + "args": [], + "returns": [ + { + "type_name": "ElementList of Warning", + "is_generator": false, + "description": "

Sequence of all st.warning elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.warning[0] for the first element. Warning is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L885" + }, + "streamlit.testing.v1.element_tree.Button": { + "name": "Button", + "signature": "st.testing.v1.element_tree.Button(proto, root)", + "is_class": true, + "methods": [ + { + "name": "click", + "signature": "st.testing.v1.element_tree.click.click()", + "description": "

Set the value of the button to True.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L342" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the button.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L337" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value of the button. (bool)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L327" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L304", + "description": "

A representation of st.button and st.form_submit_button.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.ChatInput": { + "name": "ChatInput", + "signature": "st.testing.v1.element_tree.ChatInput(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L359" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value of the widget. (str)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L372" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L347", + "description": "

A representation of st.chat_input.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Checkbox": { + "name": "Checkbox", + "signature": "st.testing.v1.element_tree.Checkbox(proto, root)", + "is_class": true, + "methods": [ + { + "name": "check", + "signature": "st.testing.v1.element_tree.check.check()", + "description": "

Set the value of the widget to True.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L420" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L415" + }, + { + "name": "uncheck", + "signature": "st.testing.v1.element_tree.uncheck.uncheck()", + "description": "

Set the value of the widget to False.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L424" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value of the widget. (bool)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L405" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L383", + "description": "

A representation of st.checkbox.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.ColorPicker": { + "name": "ColorPicker", + "signature": "st.testing.v1.element_tree.ColorPicker(proto, root)", + "is_class": true, + "methods": [ + { + "name": "pick", + "signature": "st.testing.v1.element_tree.pick.pick(v)", + "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L492" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget as a hex string.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L487" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected value as a hex string. (str)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L466" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L451", + "description": "

A representation of st.color_picker.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.DateInput": { + "name": "DateInput", + "signature": "st.testing.v1.element_tree.DateInput(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L538" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value of the widget. (date or Tuple of date)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L552" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L518", + "description": "

A representation of st.date_input.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Element": { + "name": "Element", + "signature": "st.testing.v1.element_tree.Element(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value or contents of the element.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L132" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L102", + "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Multiselect": { + "name": "Multiselect", + "signature": "st.testing.v1.element_tree.Multiselect(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "select", + "signature": "st.testing.v1.element_tree.select.select(v)", + "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L754" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the multiselect widget. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L743" + }, + { + "name": "unselect", + "signature": "st.testing.v1.element_tree.unselect.unselect(v)", + "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L769" + } + ], + "properties": [ + { + "name": "indices", + "signature": "st.testing.v1.element_tree.indices.indices", + "description": "

The indices of the currently selected values from the options. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L738" + }, + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected values from the options. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L728" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L699", + "description": "

A representation of st.multiselect.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.NumberInput": { + "name": "NumberInput", + "signature": "st.testing.v1.element_tree.NumberInput(proto, root)", + "is_class": true, + "methods": [ + { + "name": "decrement", + "signature": "st.testing.v1.element_tree.decrement.decrement()", + "description": "

Decrement the st.number_input widget as if the user clicked "-".

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L842" + }, + { + "name": "increment", + "signature": "st.testing.v1.element_tree.increment.increment()", + "description": "

Increment the st.number_input widget as if the user clicked "+".

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L834" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the st.number_input widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L809" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

Get the current value of the st.number_input widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L822" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L789", + "description": "

A representation of st.number_input.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Radio": { + "name": "Radio", + "signature": "st.testing.v1.element_tree.Radio(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the selection by value.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L887" + } + ], + "properties": [ + { + "name": "index", + "signature": "st.testing.v1.element_tree.index.index", + "description": "

The index of the current selection. (int)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L870" + }, + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected value from the options. (Any)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L877" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L851", + "description": "

A representation of st.radio.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.SelectSlider": { + "name": "SelectSlider", + "signature": "st.testing.v1.element_tree.SelectSlider(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_range", + "signature": "st.testing.v1.element_tree.set_range.set_range(lower, upper)", + "description": "

Set the ranged selection by values.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1029" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the (single) selection by value.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L994" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected value or range. (Any or Sequence of Any)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1018" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L976", + "description": "

A representation of st.select_slider.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Selectbox": { + "name": "Selectbox", + "signature": "st.testing.v1.element_tree.Selectbox(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "select", + "signature": "st.testing.v1.element_tree.select.select(v)", + "description": "

Set the selection by value.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L953" + }, + { + "name": "select_index", + "signature": "st.testing.v1.element_tree.select_index.select_index(index)", + "description": "

Set the selection by index.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L957" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the selection by value.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L943" + } + ], + "properties": [ + { + "name": "index", + "signature": "st.testing.v1.element_tree.index.index", + "description": "

The index of the current selection. (int)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L923" + }, + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected value from the options. (Any)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L933" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L905", + "description": "

A representation of st.selectbox.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Slider": { + "name": "Slider", + "signature": "st.testing.v1.element_tree.Slider(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_range", + "signature": "st.testing.v1.element_tree.set_range.set_range(lower, upper)", + "description": "

Set the ranged value of the slider.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1082" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the (single) value of the slider.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1053" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected value or range. (Any or Sequence of Any)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1071" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1034", + "description": "

A representation of st.slider.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.TextArea": { + "name": "TextArea", + "signature": "st.testing.v1.element_tree.TextArea(proto, root)", + "is_class": true, + "methods": [ + { + "name": "input", + "signature": "st.testing.v1.element_tree.input.input(v)", + "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1163" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1139" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The current value of the widget. (str)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1152" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1121", + "description": "

A representation of st.text_area.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.TextInput": { + "name": "TextInput", + "signature": "st.testing.v1.element_tree.TextInput(proto, root)", + "is_class": true, + "methods": [ + { + "name": "input", + "signature": "st.testing.v1.element_tree.input.input(v)", + "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1216" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1192" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The current value of the widget. (str)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1205" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1174", + "description": "

A representation of st.text_input.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.TimeInput": { + "name": "TimeInput", + "signature": "st.testing.v1.element_tree.TimeInput(proto, root)", + "is_class": true, + "methods": [ + { + "name": "decrement", + "signature": "st.testing.v1.element_tree.decrement.decrement()", + "description": "

Select the previous available time.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1281" + }, + { + "name": "increment", + "signature": "st.testing.v1.element_tree.increment.increment()", + "description": "

Select the next available time.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1274" + }, + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1246" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The current value of the widget. (time)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1262" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1230", + "description": "

A representation of st.time_input.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Toggle": { + "name": "Toggle", + "signature": "st.testing.v1.element_tree.Toggle(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1338" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The current value of the widget. (bool)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1328" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1305", + "description": "

A representation of st.toggle.

\n", + "args": [], + "returns": [] + }, + "streamlit.testing.v1.element_tree.Widget": { + "name": "Widget", + "signature": "st.testing.v1.element_tree.Widget(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the widget.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L193" + } + ], + "properties": [ + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The value or contents of the element.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L132" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L178", + "description": "

Widget base class for testing.

\n", + "args": [], + "returns": [] + }, + "streamlit.experimental_user.to_dict": { + "name": "to_dict", + "signature": "st.experimental_user.to_dict()", + "description": "

Get user info as a dictionary.

\n

This method primarily exists for internal use and is not needed for\nmost cases. st.experimental_user returns an object that inherits from\ndict by default.

\n", + "args": [], + "returns": [ + { + "type_name": "Dict[str,str]", + "is_generator": false, + "description": "

A dictionary of the current user's information.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L80" + }, + "streamlit.experimental_user": { + "name": "experimental_user", + "signature": "st.experimental_user()", + "is_class": true, + "methods": [ + { + "name": "to_dict", + "signature": "st.to_dict.to_dict()", + "description": "

Get user info as a dictionary.

", + "args": [], + "returns": [ + { + "type_name": "Dict[str,str]", + "is_generator": false, + "description": "

A dictionary of the current user's information.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L80" + } + ], + "properties": [], + "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L30", + "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", + "args": [ + { + "name": "email", + "type_name": "str", + "is_optional": false, + "description": "

If running locally, this property returns the string literal\n"test@example.com".

\n

If running on Streamlit Community Cloud, this\nproperty returns one of two values:

\n
    \n
  • None if the user is not logged in or not a member of the app's workspace. Such users appear under anonymous pseudonyms in the app's analytics.
  • \n
  • The user's email if the the user is logged in and a member of the app's workspace. Such users are identified by their email in the app's analytics.
  • \n
\n", + "default": null + } + ], + "returns": [] + } + }, + "1.31.0": { + "streamlit.altair_chart": { + "name": "altair_chart", + "signature": "st.altair_chart(altair_chart, use_container_width=False, theme=\"streamlit\")", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c, use_container_width=True)\n
\n\n \n

Examples of Altair charts can be found at\nhttps://altair-viz.github.io/gallery/.

\n
\n", + "description": "

Display a chart using the Altair library.

\n", + "args": [ + { + "name": "altair_chart", + "type_name": "altair.Chart", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The Altair chart object to display.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over Altair's native width value.

\n", + "default": null + }, + { + "name": "theme", + "type_name": "\"streamlit\" or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", + "default": "behavior" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L748" + }, + "streamlit.area_chart": { + "name": "area_chart", + "signature": "st.area_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.area_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", + "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Data to be plotted.

\n", + "default": null + }, + { + "name": "x", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "default": null + }, + { + "name": "y", + "type_name": "str, Sequence of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "default": null + }, + { + "name": "color", + "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color to use for different series in this chart.

\n

For an area chart with just 1 series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "default": "color" + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L255" + }, + "streamlit.audio": { + "name": "audio", + "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None)", + "example": "
\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open('myaudio.ogg', 'rb')\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format='audio/ogg')\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n\n \n
\n", + "description": "

Display an audio player.

\n", + "args": [ + { + "name": "data", + "type_name": "str, bytes, BytesIO, numpy.ndarray, or file", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Raw audio data, filename, or a URL pointing to the file to load.\nRaw data formats must include all necessary file headers to match the file\nformat specified via format.\nIf data is a numpy array, it must either be a 1D array of the waveform\nor a 2D array of shape (num_channels, num_samples) with waveforms\nfor all channels. See the default channel order at\nhttp://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx

\n", + "default": "channel" + }, + { + "name": "format", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The mime type for the audio file. Defaults to 'audio/wav'.\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "default": "s" + }, + { + "name": "start_time", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The time from which this element should start playing.

\n", + "default": null + }, + { + "name": "sample_rate", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The sample rate of the audio data in samples per second. Only required if\ndata is a numpy array.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/media.py#L42" + }, + "streamlit.balloons": { + "name": "balloons", + "signature": "st.balloons()", + "example": "
\n
\nimport streamlit as st\n\nst.balloons()\n
\n

...then watch your app and get ready for a celebration!

\n
\n", + "description": "

Draw celebratory balloons.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/balloons.py#L25" + }, + "streamlit.bar_chart": { + "name": "bar_chart", + "signature": "st.bar_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", + "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Data to be plotted.

\n", + "default": null + }, + { + "name": "x", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "default": null + }, + { + "name": "y", + "type_name": "str, Sequence of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "default": null + }, + { + "name": "color", + "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color to use for different series in this chart.

\n

For a bar chart with just one series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "default": "color" + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L414" + }, + "streamlit.bokeh_chart": { + "name": "bokeh_chart", + "signature": "st.bokeh_chart(figure, use_container_width=False)", + "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(\n    title='simple line example',\n    x_axis_label='x',\n    y_axis_label='y')\n\np.line(x, y, legend_label='Trend', line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n\n \n
\n", + "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n", + "args": [ + { + "name": "figure", + "type_name": "bokeh.plotting.figure.Figure", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A Bokeh figure to plot.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over Bokeh's native width value.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/bokeh_chart.py#L37" + }, + "streamlit.button": { + "name": "button", + "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", + "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button('Say hello'):\n    st.write('Why hello there')\nelse:\n    st.write('Goodbye')\n
\n\n \n
\n", + "description": "

Display a button widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "default": null + }, + { + "name": "on_click", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this button is clicked.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "type", + "type_name": "\"secondary\" or \"primary\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the button if set to True. The\ndefault is False.

\n", + "default": "False" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the button stretch its width to match the parent container.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "bool", + "is_generator": false, + "description": "

True if the button was clicked on the last run of the app,\nFalse otherwise.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L68" + }, + "streamlit.cache": { + "name": "cache", + "signature": "st.cache(func=None, persist=False, allow_output_mutation=False, show_spinner=True, suppress_st_warning=False, hash_funcs=None, max_entries=None, ttl=None)", + "example": "
\n
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to True:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id) like this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n
\n", + "description": "

Function decorator to memoize function executions.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function to cache. Streamlit hashes the function and dependent code.

\n", + "default": null + }, + { + "name": "persist", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Whether to persist the cache on disk.

\n", + "default": null + }, + { + "name": "allow_output_mutation", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Streamlit shows a warning when return values are mutated, as that\ncan have unintended consequences. This is done by hashing the return value internally.

\n

If you know what you're doing and would like to override this warning, set this to True.

\n", + "default": null + }, + { + "name": "show_spinner", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Enable the spinner. Default is True to show a spinner when there is\na cache miss.

\n", + "default": "True" + }, + { + "name": "suppress_st_warning", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Suppress warnings about calling Streamlit commands from within\nthe cached function.

\n", + "default": null + }, + { + "name": "hash_funcs", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Mapping of types or fully qualified names to hash functions. This is used to override\nthe behavior of the hasher inside Streamlit's caching mechanism: when the hasher\nencounters an object, it will first check to see if its type matches a key in this\ndict and, if so, will use the provided function to generate a hash for it. See below\nfor an example of how this can be used.

\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", + "default": "None" + }, + { + "name": "ttl", + "type_name": "float or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of seconds to keep an entry in the cache, or\nNone if cache entries should not expire. The default is None.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/legacy_caching/caching.py#L487" + }, + "streamlit.cache_data": { + "name": "cache_data", + "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function to cache. Streamlit hashes the function's source code.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n

Note that ttl will be ignored if persist="disk" or persist=True.

\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "bool or str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached data is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", + "default": "True" + }, + { + "name": "persist", + "type_name": "\"disk\", bool, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Optional location to persist cached data to. Passing "disk" (or True)\nwill persist the cached data to the local disk. None (or False) will disable\npersistence. The default is None.

\n", + "default": "None" + }, + { + "name": "experimental_allow_widgets", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", + "default": "False" + }, + { + "name": "hash_funcs", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + }, + "streamlit.cache_resource": { + "name": "cache_resource", + "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function that creates the cached resource. Streamlit hashes the\nfunction's source code.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "bool or str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached resource is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", + "default": "True" + }, + { + "name": "validate", + "type_name": "callable or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional validation function for cached data. validate is called\neach time the cached value is accessed. It receives the cached value as\nits only parameter and it must return a boolean. If validate returns\nFalse, the current cached value is discarded, and the decorated function\nis called to compute a new value. This is useful e.g. to check the\nhealth of database connections.

\n", + "default": null + }, + { + "name": "experimental_allow_widgets", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", + "default": "False" + }, + { + "name": "hash_funcs", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L264" + }, + "streamlit.camera_input": { + "name": "camera_input", + "signature": "st.camera_input(label, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "examples": "
\n
\nimport streamlit as st\n\npicture = st.camera_input("Take a picture")\n\nif picture:\n    st.image(picture)\n
\n
\n", + "description": "

Display a widget that returns pictures from the user's webcam.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A tooltip that gets displayed next to the camera input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this camera_input's value\nchanges.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the camera input if set to\nTrue. Default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "None or UploadedFile", + "is_generator": false, + "description": "

The UploadedFile class is a subclass of BytesIO, and therefore\nit is "file-like". This means you can pass them anywhere where\na file is expected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/camera_input.py#L78" + }, + "streamlit.caption": { + "name": "caption", + "signature": "st.caption(body, unsafe_allow_html=False, *, help=None)", + "examples": "
\n
\nimport streamlit as st\n\nst.caption('This is a string that explains something above.')\nst.caption('A caption with _italics_ :blue[colors] and emojis :sunglasses:')\n
\n
\n", + "description": "

Display text in small font.

\n

This should be used for captions, asides, footnotes, sidenotes, and\nother explanatory text.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "unsafe_allow_html", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

By default, any HTML tags found in strings will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write secure\nHTML, so by using this argument you may be compromising your users'\nsecurity. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the caption.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L146" + }, + "streamlit.chat_input": { + "name": "chat_input", + "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, disabled=False, on_submit=None, args=None, kwargs=None)", + "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n\n \n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc). Create chat\ninterfaces embedded next to other content or have multiple chat bots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n\n \n
\n", + "description": "

Display a chat input widget.

\n", + "args": [ + { + "name": "placeholder", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A placeholder text shown when the chat input is empty. Defaults to\n"Your message". For accessibility reasons, you should not use an\nempty string.

\n", + "default": "s" + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget based on\nits content. Multiple widgets of the same type may not share the same key.

\n", + "default": null + }, + { + "name": "max_chars", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of characters that can be entered. If None\n(default), there will be no maximum.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the chat input should be disabled. Defaults to False.

\n", + "default": "s" + }, + { + "name": "on_submit", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when the chat input's value is submitted.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "str or None", + "is_generator": false, + "description": "

The current (non-empty) value of the text input widget on the last\nrun of the app. Otherwise, None.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/chat.py#L211" + }, + "streamlit.chat_message": { + "name": "chat_message", + "signature": "st.chat_message(name, *, avatar=None)", + "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n\n \n
\n", + "description": "

Insert a chat message container.

\n

To add elements to the returned container, you can use with notation\n(preferred) or just call methods directly on the returned object. See the\nexamples below.

\n", + "args": [ + { + "name": "name", + "type_name": "\"user\", \"assistant\", \"ai\", \"human\", or str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The name of the message author. Can be "human"/"user" or\n"ai"/"assistant" to enable preset styling and avatars.

\n

Currently, the name is not shown in the UI but is only set as an\naccessibility label. For accessibility reasons, you should not use\nan empty string.

\n", + "default": null + }, + { + "name": "avatar", + "type_name": "str, numpy.ndarray, or BytesIO", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The avatar shown next to the message. Can be one of:

\n
    \n
  • A single emoji, e.g. "\ud83e\uddd1\u200d\ud83d\udcbb", "\ud83e\udd16", "\ud83e\udd96". Shortcodes are not supported.
  • \n
  • \n
    An image using one of the formats allowed for st.image: path of a local
    \n
    image file; URL to fetch the image from; an SVG image; array of shape\n(w,h) or (w,h,1) for a monochrome image, (w,h,3) for a color image,\nor (w,h,4) for an RGBA image.
    \n
    \n
  • \n
\n

If None (default), uses default icons if name is "user",\n"assistant", "ai", "human" or the first letter of the name value.

\n", + "default": "icons" + } + ], + "returns": [ + { + "type_name": "Container", + "is_generator": false, + "description": "

A single container that can hold multiple elements.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/chat.py#L117" + }, + "streamlit.checkbox": { + "name": "checkbox", + "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox('I agree')\n\nif agree:\n    st.write('Great!')\n
\n\n \n
\n", + "description": "

Display a checkbox widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Preselect the checkbox when it first renders. This will be\ncast to bool internally.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the checkbox.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this checkbox's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the checkbox if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "bool", + "is_generator": false, + "description": "

Whether or not the checkbox is checked.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/checkbox.py#L53" + }, + "streamlit.code": { + "name": "code", + "signature": "st.code(body, language=\"python\", line_numbers=False)", + "example": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language='python')\n
\n
\n", + "description": "

Display a code block with optional syntax highlighting.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The string to display as code.

\n", + "default": null + }, + { + "name": "language", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The language that the code is written in, for syntax highlighting.\nIf None, the code will be unstyled. Defaults to "python".

\n

For a list of available language values, see:

\n

https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD

\n", + "default": "s" + }, + { + "name": "line_numbers", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional boolean indicating whether to show line numbers to the\nleft of the code block. Defaults to False.

\n", + "default": "s" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/code.py#L27" + }, + "streamlit.color_picker": { + "name": "color_picker", + "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker('Pick A Color', '#00f900')\nst.write('The current color is', color)\n
\n\n \n
\n", + "description": "

Display a color picker widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The hex value of this widget when it first renders. If None,\ndefaults to black.

\n", + "default": "black" + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the color picker.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this color_picker's value\nchanges.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the color picker if set to\nTrue. The default is False. This argument can only be supplied by\nkeyword.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "str", + "is_generator": false, + "description": "

The selected color as a hex string.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/color_picker.py#L53" + }, + "streamlit.columns": { + "name": "columns", + "signature": "st.columns(spec, *, gap=\"small\")", + "examples": "
\n

You can use with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", + "args": [ + { + "name": "spec", + "type_name": "int or Iterable of numbers", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Controls the number and width of columns to insert. Can be one of:

\n
    \n
  • An integer that specifies the number of columns. All columns have equal\nwidth in this case.
  • \n
  • An Iterable of numbers (int or float) that specify the relative width of\neach column. E.g. [0.7, 0.3] creates two columns where the first\none takes up 70% of the available with and the second one takes up 30%.\nOr [1, 2, 3] creates three columns where the second one is two times\nthe width of the first one, and the third one is three times that width.
  • \n
\n", + "default": null + }, + { + "name": "gap", + "type_name": "\"small\", \"medium\", or \"large\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The size of the gap between the columns. Defaults to "small".

\n", + "default": "s" + } + ], + "returns": [ + { + "type_name": "list of containers", + "is_generator": false, + "description": "

A list of container objects.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L143" + }, + "streamlit.connection": { + "name": "connection", + "signature": "st.connection(name, type=None, max_entries=None, ttl=None, **kwargs)", + "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql") # Config section defined in [connections.sql] in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection("my_sql_connection", type="sql") # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection("my_other_sql_connection") # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection("my_sql_connection", type="streamlit.connections.SQLConnection")\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", + "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Config options, credentials, secrets, etc. for connections are taken from various\nsources:

\n
    \n
  • Any connection-specific configuration files.
  • \n
  • An app's secrets.toml files.
  • \n
  • The kwargs passed to this function.
  • \n
\n", + "args": [ + { + "name": "name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The connection name used for secrets lookup in [connections.<name>].\nType will be inferred from passing "sql", "snowflake", or "snowpark".

\n", + "default": null + }, + { + "name": "type", + "type_name": "str, connection class, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The type of connection to create. It can be a keyword ("sql", "snowflake",\nor "snowpark"), a path to an importable class, or an imported class reference.\nAll classes must extend st.connections.BaseConnection and implement the\n_connect() method. If the type kwarg is None, a type field must be set in\nthe connection's section in secrets.toml.

\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of connections to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", + "default": "None" + }, + { + "name": "ttl", + "type_name": "float, timedelta, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "**kwargs", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional connection specific kwargs that are passed to the Connection's\n_connect() method. Learn more from the specific Connection's documentation.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "Connection object", + "is_generator": false, + "description": "

An initialized Connection object of the specified type.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/connection_factory.py#L206" + }, + "streamlit.container": { + "name": "container", + "signature": "st.container(*, height=None, border=None)", + "examples": "
\n

Inserting elements using "with" notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n\n \n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n\n \n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n\n \n
\n", + "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", + "args": [ + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the container expressed in pixels. If None (default)\nthe container grows to fit its content. If a fixed height, scrolling is\nenabled for large content and a grey border is shown around the container\nto visually separate its scroll surface from the rest of the app.

\n
\n

Note

\n

Use containers with scroll sparingly. If you do, try to keep\nthe height small (below 500 pixels). Otherwise, the scroll\nsurface of the container might cover the majority of the screen\non mobile devices, which makes it hard to scroll the rest of the app.

\n
\n", + "default": null + }, + { + "name": "border", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show a border around the container. If None (default), a\nborder is shown if the container is set to a fixed height and not\nshown otherwise.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L31" + }, + "streamlit.data_editor": { + "name": "data_editor", + "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", + "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state."

\n
\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.DataFrame, list, set, tuple, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray, memoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and pandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing datetime.timedelta\nand pandas.Timedelta values will default to uneditable but this can be\nchanged through column configuration.
  • \n
\n
\n", + "default": "to" + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired width of the data editor expressed in pixels. If None, the width will\nbe automatically determined.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the data editor expressed in pixels. If None, the height will\nbe automatically determined.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the data editor width to the width of the parent container.\nThis takes precedence over the width argument. Defaults to False.

\n", + "default": "False" + }, + { + "name": "hide_index", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "default": null + }, + { + "name": "column_order", + "type_name": "Iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", + "default": null + }, + { + "name": "column_config", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "default": null + }, + { + "name": "num_rows", + "type_name": "\"fixed\" or \"dynamic\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies if the user can add and delete rows in the data editor.\nIf "fixed", the user cannot add or delete rows. If "dynamic", the user can\nadd and delete rows in the data editor, but column sorting is disabled.\nDefaults to "fixed".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool or Iterable of str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Controls the editing of columns. If True, editing is disabled for all columns.\nIf an Iterable of column names is provided (e.g., disabled=("col1", "col2")),\nonly the specified columns will be disabled for editing. If False (default),\nall columns that support editing are editable.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use as the unique key for this widget. If this\nis omitted, a key will be generated for the widget based on its\ncontent. Multiple widgets of the same type may not share the same\nkey.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this data_editor's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame, pandas.Series, pyarrow.Table, numpy.ndarray, list, set, tuple, or dict.", + "is_generator": false, + "description": "

The edited data. The edited data is returned in its original data type if\nit corresponds to any of the supported return types. All other data types\nare returned as a pandas.DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/data_editor.py#L569" + }, + "streamlit.dataframe": { + "name": "dataframe", + "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n\n \n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n\n \n

Or you can customize the dataframe via column_config, hide_index, or column_order:

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Display a dataframe as an interactive table.

\n

This command works with dataframes from Pandas, PyArrow, Snowpark, and PySpark.\nIt can also display several other types that can be converted to dataframes,\ne.g. numpy arrays, lists, sets and dictionaries.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The data to display.

\n

If 'data' is a pandas.Styler, it will be used to style its\nunderlying DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\npandas styling features, like bar charts, hovering, and captions.

\n", + "default": null + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Desired width of the dataframe expressed in pixels. If None, the width\nwill be automatically calculated based on the column content.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Desired height of the dataframe expressed in pixels. If None, a\ndefault height is used.

\n", + "default": "height" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the dataframe width to the width of the parent container.\nThis takes precedence over the width argument.

\n", + "default": null + }, + { + "name": "hide_index", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "default": null + }, + { + "name": "column_order", + "type_name": "Iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", + "default": null + }, + { + "name": "column_config", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat. This needs to be a dictionary where each key is a column name and\nthe value is one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L56" + }, + "streamlit.date_input": { + "name": "date_input", + "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", + "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write('Your birthday is:', d)\n
\n\n \n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n\n \n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write('Your birthday is:', d)\n
\n\n \n
\n", + "description": "

Display a date input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "datetime.date or datetime.datetime or list/tuple of datetime.date or datetime.datetime, \"today\", or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The value of this widget when it first renders. If a list/tuple with\n0 to 2 date/datetime values is provided, the datepicker will allow\nusers to provide a range. If None, will initialize empty and\nreturn None until the user provides input. If "today" (default),\nwill initialize with today as a single-date picker.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "datetime.date or datetime.datetime", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The minimum selectable date. If value is a date, defaults to value - 10 years.\nIf value is the interval [start, end], defaults to start - 10 years.

\n", + "default": "value" + }, + { + "name": "max_value", + "type_name": "datetime.date or datetime.datetime", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum selectable date. If value is a date, defaults to value + 10 years.\nIf value is the interval [start, end], defaults to end + 10 years.

\n", + "default": "value" + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this date_input's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "format", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A format string controlling how the interface should display dates.\nSupports \u201cYYYY/MM/DD\u201d (default), \u201cDD/MM/YYYY\u201d, or \u201cMM/DD/YYYY\u201d.\nYou may also use a period (.) or hyphen (-) as separators.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the date input if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "datetime.date or a tuple with 0-2 dates or None", + "is_generator": false, + "description": "

The current value of the date input widget or None if no date has been\nselected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/time_widgets.py#L493" + }, + "streamlit.divider": { + "name": "divider", + "signature": "st.divider()", + "example": "
\n
\nimport streamlit as st\n\nst.divider()\n
\n
\n", + "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L258" + }, + "streamlit.download_button": { + "name": "download_button", + "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", + "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode('utf-8')\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name='large_df.csv',\n    mime='text/csv',\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button('Download some text', text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b'example content'\n# Defaults to 'application/octet-stream'\nst.download_button('Download binary file', binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", + "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "data", + "type_name": "str or bytes or file", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The contents of the file to be downloaded. See example below for\ncaching techniques to avoid recomputing this data unnecessarily.

\n", + "default": null + }, + { + "name": "file_name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string to use as the name of the file to be downloaded,\nsuch as 'my_file.csv'. If not specified, the name will be\nautomatically generated.

\n", + "default": null + }, + { + "name": "mime", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The MIME type of the data. If None, defaults to "text/plain"\n(if data is of type str or is a textual file) or\n"application/octet-stream" (if data is of type bytes or is a\nbinary file).

\n", + "default": "s" + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "default": null + }, + { + "name": "on_click", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this button is clicked.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "type", + "type_name": "\"secondary\" or \"primary\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the download button if set to\nTrue. The default is False.

\n", + "default": "False" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the button stretch its width to match the\nparent container.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "bool", + "is_generator": false, + "description": "

True if the button was clicked on the last run of the app,\nFalse otherwise.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L177" + }, + "streamlit.echo": { + "name": "echo", + "signature": "st.echo(code_location=\"above\")", + "example": "
\n
\nimport streamlit as st\n\nwith st.echo():\n    st.write('This code will be printed')\n
\n
\n", + "description": "

Use in a with block to draw some code on the app, then execute it.

\n", + "args": [ + { + "name": "code_location", + "type_name": "\"above\" or \"below\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Whether to show the echoed code before or after the results of the\nexecuted code block.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/echo.py#L28" + }, + "streamlit.empty": { + "name": "empty", + "signature": "st.empty()", + "examples": "
\n

Overwriting elements in-place using "with" notation:

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(60):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write("\u2714\ufe0f 1 minute over!")\n
\n

Replacing several elements, then clearing them:

\n
\nimport streamlit as st\n\nplaceholder = st.empty()\n\n# Replace the placeholder with some text:\nplaceholder.text("Hello")\n\n# Replace the text with a chart:\nplaceholder.line_chart({"data": [1, 5, 2, 6]})\n\n# Replace the chart with several elements:\nwith placeholder.container():\n    st.write("This is one element")\n    st.write("This is another")\n\n# Clear all those elements:\nplaceholder.empty()\n
\n
\n", + "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse "with" notation or just call methods directly on the returned object.\nSee examples below.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/empty.py#L24" + }, + "streamlit.error": { + "name": "error", + "signature": "st.error(body, *, icon=None)", + "example": "
\n
\nimport streamlit as st\n\nst.error('This is an error', icon="\ud83d\udea8")\n
\n
\n", + "description": "

Display error message.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The error text to display.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L27" + }, + "streamlit.exception": { + "name": "exception", + "signature": "st.exception(exception)", + "example": "
\n
\nimport streamlit as st\n\ne = RuntimeError('This is an exception of type RuntimeError')\nst.exception(e)\n
\n
\n", + "description": "

Display an exception.

\n", + "args": [ + { + "name": "exception", + "type_name": "Exception", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The exception to display.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/exception.py#L50" + }, + "streamlit.expander": { + "name": "expander", + "signature": "st.expander(label, expanded=False)", + "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write(\\"\\"\\"\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    \\"\\"\\")\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write(\\"\\"\\"\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n\\"\\"\\")\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", + "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A string to use as the header for the expander. The label can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "expanded", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, initializes the expander in "expanded" state. Defaults to\nFalse (collapsed).

\n", + "default": "s" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L382" + }, + "streamlit.experimental_connection": { + "name": "experimental_connection", + "signature": "st.experimental_connection(name, type=None, max_entries=None, ttl=None, **kwargs)", + "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql") # Config section defined in [connections.sql] in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection("my_sql_connection", type="sql") # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection("my_other_sql_connection") # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection("my_sql_connection", type="streamlit.connections.SQLConnection")\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", + "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Config options, credentials, secrets, etc. for connections are taken from various\nsources:

\n
    \n
  • Any connection-specific configuration files.
  • \n
  • An app's secrets.toml files.
  • \n
  • The kwargs passed to this function.
  • \n
\n", + "args": [ + { + "name": "name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The connection name used for secrets lookup in [connections.<name>].\nType will be inferred from passing "sql", "snowflake", or "snowpark".

\n", + "default": null + }, + { + "name": "type", + "type_name": "str, connection class, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The type of connection to create. It can be a keyword ("sql", "snowflake",\nor "snowpark"), a path to an importable class, or an imported class reference.\nAll classes must extend st.connections.BaseConnection and implement the\n_connect() method. If the type kwarg is None, a type field must be set in\nthe connection's section in secrets.toml.

\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of connections to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", + "default": "None" + }, + { + "name": "ttl", + "type_name": "float, timedelta, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "**kwargs", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional connection specific kwargs that are passed to the Connection's\n_connect() method. Learn more from the specific Connection's documentation.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "Connection object", + "is_generator": false, + "description": "

An initialized Connection object of the specified type.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/connection_factory.py#L206" + }, + "streamlit.experimental_data_editor": { + "name": "experimental_data_editor", + "signature": "st.experimental_data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", + "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state."

\n
\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.DataFrame, list, set, tuple, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray, memoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and pandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing datetime.timedelta\nand pandas.Timedelta values will default to uneditable but this can be\nchanged through column configuration.
  • \n
\n
\n", + "default": "to" + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired width of the data editor expressed in pixels. If None, the width will\nbe automatically determined.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the data editor expressed in pixels. If None, the height will\nbe automatically determined.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the data editor width to the width of the parent container.\nThis takes precedence over the width argument. Defaults to False.

\n", + "default": "False" + }, + { + "name": "hide_index", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "default": null + }, + { + "name": "column_order", + "type_name": "Iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", + "default": null + }, + { + "name": "column_config", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "default": null + }, + { + "name": "num_rows", + "type_name": "\"fixed\" or \"dynamic\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies if the user can add and delete rows in the data editor.\nIf "fixed", the user cannot add or delete rows. If "dynamic", the user can\nadd and delete rows in the data editor, but column sorting is disabled.\nDefaults to "fixed".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool or Iterable of str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Controls the editing of columns. If True, editing is disabled for all columns.\nIf an Iterable of column names is provided (e.g., disabled=("col1", "col2")),\nonly the specified columns will be disabled for editing. If False (default),\nall columns that support editing are editable.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use as the unique key for this widget. If this\nis omitted, a key will be generated for the widget based on its\ncontent. Multiple widgets of the same type may not share the same\nkey.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this data_editor's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame, pandas.Series, pyarrow.Table, numpy.ndarray, list, set, tuple, or dict.", + "is_generator": false, + "description": "

The edited data. The edited data is returned in its original data type if\nit corresponds to any of the supported return types. All other data types\nare returned as a pandas.DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/data_editor.py#L569" + }, + "streamlit.experimental_get_query_params": { + "name": "experimental_get_query_params", + "signature": "st.experimental_get_query_params()", + "example": "
\n

Let's say the user's web browser is at\nhttp://localhost:8501/?show_map=True&selected=asia&selected=america.\nThen, you can get the query parameters using the following:

\n
\nimport streamlit as st\n\nst.experimental_get_query_params()\n{"show_map": ["True"], "selected": ["asia", "america"]}\n
\n

Note that the values in the returned dict are always lists. This is\nbecause we internally use Python's urllib.parse.parse_qs(), which behaves\nthis way. And this behavior makes sense when you consider that every item\nin a query string is potentially a 1-element array.

\n
\n", + "description": "

Return the query parameters that is currently showing in the browser's URL bar.

\n", + "args": [], + "returns": [ + { + "type_name": "dict", + "is_generator": false, + "description": "

The current query parameters as a dict. "Query parameters" are the part of the URL that comes\nafter the first "?".

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/experimental_query_params.py#L30" + }, + "streamlit.experimental_memo": { + "name": "experimental_memo", + "signature": "st.experimental_memo(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function to cache. Streamlit hashes the function's source code.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n

Note that ttl will be ignored if persist="disk" or persist=True.

\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "bool or str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached data is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", + "default": "True" + }, + { + "name": "persist", + "type_name": "\"disk\", bool, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Optional location to persist cached data to. Passing "disk" (or True)\nwill persist the cached data to the local disk. None (or False) will disable\npersistence. The default is None.

\n", + "default": "None" + }, + { + "name": "experimental_allow_widgets", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", + "default": "False" + }, + { + "name": "hash_funcs", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + }, + "streamlit.experimental_rerun": { + "name": "experimental_rerun", + "signature": "st.experimental_rerun()", + "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L80" + }, + "streamlit.experimental_set_query_params": { + "name": "experimental_set_query_params", + "signature": "st.experimental_set_query_params(**query_params)", + "example": "
\n

To point the user's web browser to something like\n"http://localhost:8501/?show_map=True&selected=asia&selected=america",\nyou would do the following:

\n
\nimport streamlit as st\n\nst.experimental_set_query_params(\n    show_map=True,\n    selected=["asia", "america"],\n)\n
\n
\n", + "description": "

Set the query parameters that are shown in the browser's URL bar.

\n
\n

Warning

\n

Query param embed cannot be set using this method.

\n
\n", + "args": [ + { + "name": "**query_params", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The query parameters to set, as key-value pairs.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/experimental_query_params.py#L68" + }, + "streamlit.experimental_singleton": { + "name": "experimental_singleton", + "signature": "st.experimental_singleton(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function that creates the cached resource. Streamlit hashes the\nfunction's source code.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n", + "default": null + }, + { + "name": "max_entries", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "bool or str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached resource is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", + "default": "True" + }, + { + "name": "validate", + "type_name": "callable or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional validation function for cached data. validate is called\neach time the cached value is accessed. It receives the cached value as\nits only parameter and it must return a boolean. If validate returns\nFalse, the current cached value is discarded, and the decorated function\nis called to compute a new value. This is useful e.g. to check the\nhealth of database connections.

\n", + "default": null + }, + { + "name": "experimental_allow_widgets", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", + "default": "False" + }, + { + "name": "hash_funcs", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L264" + }, + "streamlit.file_uploader": { + "name": "file_uploader", + "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n\n \n
\n", + "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration#set-configuration-options

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "type", + "type_name": "str or list of str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Array of allowed extensions. ['png', 'jpg']\nThe default is None, which means all extensions are allowed.

\n", + "default": "None" + }, + { + "name": "accept_multiple_files", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, allows the user to upload multiple files at the same time,\nin which case the return value will be a list of files.\nDefault: False

\n", + "default": "False" + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A tooltip that gets displayed next to the file uploader.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this file_uploader's value\nchanges.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the file uploader if set to\nTrue. The default is False. This argument can only be supplied by\nkeyword.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "None or UploadedFile or list of UploadedFile", + "is_generator": false, + "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True, returns a list with the\nuploaded files as UploadedFile objects. If no files were\nuploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and therefore\nit is "file-like". This means you can pass them anywhere where\na file is expected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/file_uploader.py#L222" + }, + "streamlit.form": { + "name": "form", + "signature": "st.form(key, clear_on_submit=False, *, border=True)", + "examples": "
\n

Inserting elements using "with" notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n\n \n
\n", + "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use "with" notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", + "args": [ + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A string that identifies the form. Each form must have its own\nkey. (This key is not displayed to the user in the interface.)

\n", + "default": null + }, + { + "name": "clear_on_submit", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, all widgets inside the form will be reset to their default\nvalues after the user presses the Submit button. Defaults to False.\n(Note that Custom Components are unaffected by this flag, and\nwill not be reset to their defaults on form submission.)

\n", + "default": "values" + }, + { + "name": "border", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show a border around the form. Defaults to True.

\n
\n

Note

\n

Not showing a border can be confusing to viewers since interacting with a\nwidget in the form will do nothing. You should only remove the border if\nthere's another border (e.g. because of an expander) or the form is small\n(e.g. just a text input and a submit button).

\n
\n", + "default": "True" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/form.py#L115" + }, + "streamlit.form_submit_button": { + "name": "form_submit_button", + "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", + "description": "

Display a form submit button.

\n

When this button is clicked, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

Every form must have a form_submit_button. A form_submit_button\ncannot exist outside a form.

\n

For more information about forms, check out our\nblog post.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this button is for.\nDefaults to "Submit".

\n", + "default": "s" + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A tooltip that gets displayed when the button is hovered over.\nDefaults to None.

\n", + "default": "None" + }, + { + "name": "on_click", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this button is clicked.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "type", + "type_name": "\"secondary\" or \"primary\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the button if set to True. The\ndefault is False.

\n", + "default": "False" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the button stretch its width to match the parent container.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "bool", + "is_generator": false, + "description": "

True if the button was clicked.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/form.py#L226" + }, + "streamlit.get_option": { + "name": "get_option", + "signature": "st.get_option(key)", + "description": "

Return the current value of a given Streamlit config option.

\n

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

\n", + "args": [ + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

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

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/config.py#L131" + }, + "streamlit.graphviz_chart": { + "name": "graphviz_chart", + "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", + "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge('run', 'intr')\ngraph.edge('intr', 'runbl')\ngraph.edge('runbl', 'run')\ngraph.edge('run', 'kernel')\ngraph.edge('kernel', 'zombie')\ngraph.edge('kernel', 'sleep')\ngraph.edge('kernel', 'runmem')\ngraph.edge('sleep', 'swap')\ngraph.edge('swap', 'runswap')\ngraph.edge('runswap', 'new')\ngraph.edge('runswap', 'runmem')\ngraph.edge('new', 'runmem')\ngraph.edge('sleep', 'runmem')\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n\n \n
\n", + "description": "

Display a graph using the dagre-d3 library.

\n", + "args": [ + { + "name": "figure_or_dot", + "type_name": "graphviz.dot.Graph, graphviz.dot.Digraph, str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The Graphlib graph object or dot string to display

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the figure's native width value.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/graphviz_chart.py#L40" + }, + "streamlit.header": { + "name": "header", + "signature": "st.header(body, anchor=None, *, help=None, divider=False)", + "examples": "
\n
\nimport streamlit as st\n\nst.header('This is a header with a divider', divider='rainbow')\nst.header('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "description": "

Display text in header formatting.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "anchor", + "type_name": "str or False", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The anchor name of the header that can be accessed with #anchor\nin the URL. If omitted, it generates an anchor using the body.\nIf False, the anchor is not shown in the UI.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the header.

\n", + "default": null + }, + { + "name": "divider", + "type_name": "bool or \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L41" + }, + "streamlit.help": { + "name": "help", + "signature": "st.help(obj=streamlit)", + "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n\n \n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog('poodle', 'white')\n\nst.help(fido)\n
\n\n \n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n\n \n
\n", + "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", + "args": [ + { + "name": "obj", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The object whose information should be displayed. If left\nunspecified, this call will display help for Streamlit itself.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/doc_string.py#L48" + }, + "streamlit.image": { + "name": "image", + "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\")", + "example": "
\n
\nimport streamlit as st\nst.image('sunrise.jpg', caption='Sunrise by the mountains')\n
\n\n \n
\n", + "description": "

Display an image or list of images.

\n", + "args": [ + { + "name": "image", + "type_name": "numpy.ndarray, [numpy.ndarray], BytesIO, str, or [str]", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Monochrome image of shape (w,h) or (w,h,1)\nOR a color image of shape (w,h,3)\nOR an RGBA image of shape (w,h,4)\nOR a URL to fetch the image from\nOR a path of a local image file\nOR an SVG XML string like <svg xmlns=...</svg>\nOR a list of one of the above, to display multiple images.

\n", + "default": null + }, + { + "name": "caption", + "type_name": "str or list of str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Image caption. If displaying multiple images, caption should be a\nlist of captions (one for each image).

\n", + "default": null + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Image width. None means use the image width,\nbut do not exceed the width of the column.\nShould be set for SVG images, as they have no default image width.

\n", + "default": "image" + }, + { + "name": "use_column_width", + "type_name": "\"auto\", \"always\", \"never\", or bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If "auto", set the image's width to its natural size,\nbut do not exceed the width of the column.\nIf "always" or True, set the image's width to the column width.\nIf "never" or False, set the image's width to its natural size.\nNote: if set, use_column_width takes precedence over the width parameter.

\n", + "default": null + }, + { + "name": "clamp", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Clamp image pixel values to a valid range ([0-255] per channel).\nThis is only meaningful for byte array images; the parameter is\nignored for image URLs. If this is not set, and an image has an\nout-of-range value, an error will be thrown.

\n", + "default": null + }, + { + "name": "channels", + "type_name": "\"RGB\" or \"BGR\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If image is an nd.array, this parameter denotes the format used to\nrepresent color information. Defaults to "RGB", meaning\nimage[:, :, 0] is the red channel, image[:, :, 1] is green, and\nimage[:, :, 2] is blue. For images coming from libraries like\nOpenCV you should set this to "BGR", instead.

\n", + "default": "s" + }, + { + "name": "output_format", + "type_name": "\"JPEG\", \"PNG\", or \"auto\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

This parameter specifies the format to use when transferring the\nimage data. Photos should use the JPEG format for lossy compression\nwhile diagrams should use the PNG format for lossless compression.\nDefaults to "auto" which identifies the compression type based\non the type and format of the image argument.

\n", + "default": "s" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/image.py#L88" + }, + "streamlit.info": { + "name": "info", + "signature": "st.info(body, *, icon=None)", + "example": "
\n
\nimport streamlit as st\n\nst.info('This is a purely informational message', icon="\u2139\ufe0f")\n
\n
\n", + "description": "

Display an informational message.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The info text to display.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L91" + }, + "streamlit.json": { + "name": "json", + "signature": "st.json(body, *, expanded=True)", + "example": "
\n
\nimport streamlit as st\n\nst.json({\n    'foo': 'bar',\n    'baz': 'boz',\n    'stuff': [\n        'stuff 1',\n        'stuff 2',\n        'stuff 3',\n        'stuff 5',\n    ],\n})\n
\n\n \n
\n", + "description": "

Display object or string as a pretty-printed JSON string.

\n", + "args": [ + { + "name": "body", + "type_name": "object or str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The object to print as JSON. All referenced objects should be\nserializable to JSON as well. If object is a string, we assume it\ncontains serialized JSON.

\n", + "default": null + }, + { + "name": "expanded", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean that allows the user to set whether the initial\nstate of this json element should be expanded. Defaults to True.

\n", + "default": "True" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/json.py#L35" + }, + "streamlit.latex": { + "name": "latex", + "signature": "st.latex(body, *, help=None)", + "example": "
\n
\nimport streamlit as st\n\nst.latex(r'''\n    a + ar + a r^2 + a r^3 + \\cdots + a r^{n-1} =\n    \\sum_{k=0}^{n-1} ar^k =\n    a \\left(\\frac{1-r^{n}}{1-r}\\right)\n    ''')\n
\n
\n", + "description": "

Display mathematical expressions formatted as LaTeX.

\n

Supported LaTeX functions are listed at\nhttps://katex.org/docs/supported.html.

\n", + "args": [ + { + "name": "body", + "type_name": "str or SymPy expression", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The string or SymPy expression to display as LaTeX. If str, it's\na good idea to use raw Python strings since LaTeX uses backslashes\na lot.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the LaTeX expression.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L210" + }, + "streamlit.line_chart": { + "name": "line_chart", + "signature": "st.line_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.line_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", + "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Data to be plotted.

\n", + "default": null + }, + { + "name": "x", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "default": null + }, + { + "name": "y", + "type_name": "str, Sequence of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "default": null + }, + { + "name": "color", + "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color to use for different lines in this chart.

\n

For a line chart with just one line, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto lines of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three lines whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into three lines, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe lines in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "default": "color" + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L97" + }, + "streamlit.link_button": { + "name": "link_button", + "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", disabled=False, use_container_width=False)", + "example": "
\n
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n\n \n
\n", + "description": "

Display a link button element.

\n

When clicked, a new tab will be opened to the specified URL. This will\ncreate a new session for the user if directed within the app.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "url", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The url to be opened on user click

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "default": null + }, + { + "name": "type", + "type_name": "\"secondary\" or \"primary\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the link button if set to\nTrue. The default is False.

\n", + "default": "False" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the button stretch its width to match the\nparent container.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L347" + }, + "streamlit.map": { + "name": "map", + "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=['lat', 'lon'])\n\nst.map(df)\n
\n\n \n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color='#0044ff')\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n    "col1": np.random.randn(1000) / 50 + 37.76,\n    "col2": np.random.randn(1000) / 50 + -122.4,\n    "col3": np.random.randn(1000) * 100,\n    "col4": np.random.rand(1000, 4).tolist(),\n})\n\nst.map(df,\n    latitude='col1',\n    longitude='col2',\n    size='col3',\n    color='col4')\n
\n\n \n
\n", + "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The data to be plotted.

\n", + "default": null + }, + { + "name": "latitude", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The name of the column containing the latitude coordinates of\nthe datapoints in the chart.

\n

If None, the latitude data will come from any column named 'lat',\n'latitude', 'LAT', or 'LATITUDE'.

\n", + "default": null + }, + { + "name": "longitude", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The name of the column containing the longitude coordinates of\nthe datapoints in the chart.

\n

If None, the longitude data will come from any column named 'lon',\n'longitude', 'LON', or 'LONGITUDE'.

\n", + "default": null + }, + { + "name": "color", + "type_name": "str or tuple or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color of the circles representing each datapoint.

\n

Can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
  • The name of the column to use for the color. Cells in this column\nshould contain colors represented as a hex string or color tuple,\nas described above.
  • \n
\n", + "default": "color" + }, + { + "name": "size", + "type_name": "str or float or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The size of the circles representing each point, in meters.

\n

This can be:

\n
    \n
  • None, to use the default size.
  • \n
  • A number like 100, to specify a single size to use for all\ndatapoints.
  • \n
  • The name of the column to use for the size. This allows each\ndatapoint to be represented by a circle of a different size.
  • \n
\n", + "default": "size" + }, + { + "name": "zoom", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Zoom level as specified in\nhttps://wiki.openstreetmap.org/wiki/Zoom_levels.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/map.py#L93" + }, + "streamlit.markdown": { + "name": "markdown", + "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None)", + "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors].''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n\n \n
\n", + "description": "

Display string formatted as Markdown.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "unsafe_allow_html", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

By default, any HTML tags found in the body will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write\nsecure HTML, so by using this argument you may be compromising your\nusers' security. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the Markdown.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L31" + }, + "streamlit.metric": { + "name": "metric", + "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n\n \n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n\n \n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5,\n    delta_color="inverse")\n\nst.metric(label="Active developers", value=123, delta=123,\n    delta_color="off")\n
\n\n \n
\n", + "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The header or title for the metric. The label can optionally contain\nMarkdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "value", + "type_name": "int, float, str, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Value of the metric. None is rendered as a long dash.

\n", + "default": null + }, + { + "name": "delta", + "type_name": "int, float, str, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Indicator of how the metric changed, rendered with an arrow below\nthe metric. If delta is negative (int/float) or starts with a minus\nsign (str), the arrow points down and the text is red; else the\narrow points up and the text is green. If None (default), no delta\nindicator is shown.

\n", + "default": null + }, + { + "name": "delta_color", + "type_name": "\"normal\", \"inverse\", or \"off\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If "normal" (default), the delta indicator is shown as described\nabove. If "inverse", it is red when positive and green when\nnegative. This is useful when a negative change is considered\ngood, e.g. if cost decreased. If "off", delta is shown in gray\nregardless of its value.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the metric label.

\n", + "default": null + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/metric.py#L46" + }, + "streamlit.multiselect": { + "name": "multiselect", + "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    'What are your favorite colors',\n    ['Green', 'Yellow', 'Red', 'Blue'],\n    ['Yellow', 'Red'])\n\nst.write('You selected:', options)\n
\n\n \n
\n", + "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "default", + "type_name": "Iterable of V, V, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

List of default values. Can also be a single value.

\n", + "default": "values" + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Function to modify the display of selectbox options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe multiselect.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the multiselect.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this multiselect's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "max_selections", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The max selections that can be selected at a time.

\n", + "default": null + }, + { + "name": "placeholder", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A string to display when no options are selected. Defaults to 'Choose an option'.

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the multiselect widget if set\nto True. The default is False. This argument can only be supplied\nby keyword.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "list", + "is_generator": false, + "description": "

A list with the selected options

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/multiselect.py#L148" + }, + "streamlit.number_input": { + "name": "number_input", + "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input('Insert a number')\nst.write('The current number is ', number)\n
\n\n \n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write('The current number is ', number)\n
\n\n \n
\n", + "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The minimum permitted value.\nIf None, there will be no minimum.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum permitted value.\nIf None, there will be no maximum.

\n", + "default": null + }, + { + "name": "value", + "type_name": "int, float, \"min\" or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The value of this widget when it first renders. If None, will initialize\nempty and return None until the user provides input.\nIf "min" (default), will initialize with min_value, or 0.0 if\nmin_value is None.

\n", + "default": null + }, + { + "name": "step", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The stepping interval.\nDefaults to 1 if the value is an int, 0.01 otherwise.\nIf the value is not specified, the format parameter will be used.

\n", + "default": "1" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. Output must be purely numeric. This does not impact\nthe return value. Valid formatters: %d %e %f %g %i %u

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this number_input's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "placeholder", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string displayed when the number input is empty.\nIf None, no placeholder is displayed.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the number input if set to\nTrue. The default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "int or float or None", + "is_generator": false, + "description": "

The current value of the numeric input widget or None if the widget\nis empty. The return type will match the data type of the value parameter.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/number_input.py#L108" + }, + "streamlit.page_link": { + "name": "page_link", + "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py.py\n\u2502   \u2514\u2500\u2500 page_2.py.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", + "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", + "args": [ + { + "name": "page", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The file path (relative to the main script) of the page to switch to.\nAlternatively, this can be the URL to an external page (must start\nwith "http://" or "https://").

\n", + "default": null + }, + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the page link. Labels are required for external pages.\nLabels can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the link. Shortcodes are not allowed. Please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "s" + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when the link is\nhovered over.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the page link if set to\nTrue. The default is False.

\n", + "default": "is" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the link stretch its width to\nmatch the parent container. The default is True for page links\nin the sidebar, and False for those in the main app.

\n", + "default": "is" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L430" + }, + "streamlit.plotly_chart": { + "name": "plotly_chart", + "signature": "st.plotly_chart(figure_or_data, use_container_width=False, sharing=\"streamlit\", theme=\"streamlit\", **kwargs)", + "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python:

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig, use_container_width=True)\n
\n\n \n
\n", + "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python. The arguments to this function\nclosely follow the ones for Plotly's plot() function. You can find\nmore about Plotly at https://plot.ly/python.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever you\nwould call Plotly's py.plot or py.iplot.

\n", + "args": [ + { + "name": "figure_or_data", + "type_name": "plotly.graph_objs.Figure, plotly.graph_objs.Data, dict/list of plotly.graph_objs.Figure/Data", + "is_optional": false, + "is_kwarg_only": false, + "description": "

See https://plot.ly/python/ for examples of graph descriptions.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the figure's native width value.

\n", + "default": null + }, + { + "name": "sharing", + "type_name": "\"streamlit\", \"private\", \"secret\", or \"public\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Use "streamlit" to insert the plot and all its dependencies\ndirectly in the Streamlit app using plotly's offline mode (default).\nUse any other sharing mode to send the chart to Plotly chart studio, which\nrequires an account. See https://plot.ly/python/chart-studio/ for more information.

\n", + "default": null + }, + { + "name": "theme", + "type_name": "\"streamlit\" or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", + "default": "behavior" + }, + { + "name": "**kwargs", + "type_name": null, + "is_optional": null, + "is_kwarg_only": true, + "description": "

Any argument accepted by Plotly's plot() function.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/plotly_chart.py#L81" + }, + "streamlit.progress": { + "name": "progress", + "signature": "st.progress(value, text=None)", + "example": "
\n

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n\n \n
\n", + "description": "

Display a progress bar.

\n", + "args": [ + { + "name": "value", + "type_name": "int or float", + "is_optional": false, + "is_kwarg_only": false, + "description": "

0 <= value <= 100 for int

\n

0.0 <= value <= 1.0 for float

\n", + "default": null + }, + { + "name": "text", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A message to display above the progress bar. The text can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/progress.py#L93" + }, + "streamlit.pydeck_chart": { + "name": "pydeck_chart", + "signature": "st.pydeck_chart(pydeck_obj=None, use_container_width=False)", + "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n   np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n   columns=['lat', 'lon'])\n\nst.pydeck_chart(pdk.Deck(\n    map_style=None,\n    initial_view_state=pdk.ViewState(\n        latitude=37.76,\n        longitude=-122.4,\n        zoom=11,\n        pitch=50,\n    ),\n    layers=[\n        pdk.Layer(\n           'HexagonLayer',\n           data=chart_data,\n           get_position='[lon, lat]',\n           radius=200,\n           elevation_scale=4,\n           elevation_range=[0, 1000],\n           pickable=True,\n           extruded=True,\n        ),\n        pdk.Layer(\n            'ScatterplotLayer',\n            data=chart_data,\n            get_position='[lon, lat]',\n            get_color='[200, 30, 0, 160]',\n            get_radius=200,\n        ),\n    ],\n))\n
\n\n \n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", + "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", + "args": [ + { + "name": "pydeck_obj", + "type_name": "pydeck.Deck or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Object specifying the PyDeck chart to draw.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + }, + "streamlit.pyplot": { + "name": "pyplot", + "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", + "notes": "
\n
\n

Note

\n

Deprecation warning. After December 1st, 2020, we will remove the ability\nto specify no arguments in st.pyplot(), as that requires the use of\nMatplotlib's global figure object, which is not thread-safe. So\nplease always pass a figure object as shown in the example section\nabove.

\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", + "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n\n \n
\n", + "description": "

Display a matplotlib.pyplot figure.

\n", + "args": [ + { + "name": "fig", + "type_name": "Matplotlib Figure", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The figure to plot. When this argument isn't specified, this\nfunction will render the global figure (but this is deprecated,\nas described below)

\n", + "default": null + }, + { + "name": "clear_figure", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, the figure will be cleared after being rendered.\nIf False, the figure will not be cleared after being rendered.\nIf left unspecified, we pick a default based on the value of fig.

\n
    \n
  • If fig is set, defaults to False.
  • \n
  • If fig is not set, defaults to True. This simulates Jupyter's\napproach to matplotlib rendering.
  • \n
\n", + "default": "based" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. Defaults to True.

\n", + "default": "s" + }, + { + "name": "**kwargs", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Arguments to pass to Matplotlib's savefig function.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/pyplot.py#L38" + }, + "streamlit.radio": { + "name": "radio", + "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ':rainbow[Comedy]':\n    st.write('You selected comedy.')\nelse:\n    st.write("You didn\\'t select comedy.")\n
\n\n \n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n\n \n
\n", + "description": "

Display a radio button widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.

\n

Labels can include markdown as described in the label parameter\nand will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "index", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The index of the preselected option on first render. If None,\nwill initialize empty and return None until the user selects an option.\nDefaults to 0 (the first option).

\n", + "default": "0" + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Function to modify the display of radio options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe radio.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the radio.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this radio's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the radio button if set to\nTrue. The default is False.

\n", + "default": "False" + }, + { + "name": "horizontal", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which orients the radio group horizontally.\nThe default is false (vertical buttons).

\n", + "default": "false" + }, + { + "name": "captions", + "type_name": "iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A list of captions to show below each radio button. If None (default),\nno captions are shown.

\n", + "default": null + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "any", + "is_generator": false, + "description": "

The selected option or None if no option is selected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/radio.py#L83" + }, + "streamlit.rerun": { + "name": "rerun", + "signature": "st.rerun()", + "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L56" + }, + "streamlit.scatter_chart": { + "name": "scatter_chart", + "signature": "st.scatter_chart(data=None, *, x=None, y=None, color=None, size=None, width=0, height=0, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\nchart_data['col4'] = np.random.choice(['A','B','C'], 20)\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y='col2',\n    color='col4',\n    size='col3',\n)\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"])\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y=['col2', 'col3'],\n    size='col4',\n    color=['#FF0000', '#0000FF'],  # Optional\n)\n
\n\n \n
\n", + "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Data to be plotted.

\n", + "default": null + }, + { + "name": "x", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "default": null + }, + { + "name": "y", + "type_name": "str, Sequence of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "default": null + }, + { + "name": "color", + "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color of the circles representing each datapoint.

\n

This can be:

\n
    \n
  • None, to use the default color.

    \n
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".

    \n
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.

    \n
  • \n
  • The name of a column in the dataset where the color of that\ndatapoint will come from.

    \n

    If the values in this column are in one of the color formats\nabove (hex string or color tuple), then that color will be used.

    \n

    Otherwise, the color will be automatically picked from the\ndefault palette.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints be shown using three colors from the default palette.

    \n

    But if this column only contains floats or ints, then those\n1000 datapoints will be shown using a colors from a continuous\ncolor gradient.

    \n

    Finally, if this column only contains the values "#ffaa00",\n"#f0f", "#0000ff", then then each of those 1000 datapoints will\nbe assigned "#ffaa00", "#f0f", or "#0000ff" as appropriate.

    \n
  • \n
\n

If the dataframe is in wide format (that is, y is a Sequence of\ncolumns), this can also be:

\n
    \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three series).
  • \n
\n", + "default": "color" + }, + { + "name": "size", + "type_name": "str, float, int, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The size of the circles representing each point.

\n

This can be:

\n
    \n
  • A number like 100, to specify a single size to use for all\ndatapoints.
  • \n
  • The name of the column to use for the size. This allows each\ndatapoint to be represented by a circle of a different size.
  • \n
\n", + "default": null + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L575" + }, + "streamlit.select_slider": { + "name": "select_slider", + "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    'Select a color of the rainbow',\n    options=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'])\nst.write('My favorite color is', color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    'Select a range of color wavelength',\n    options=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'],\n    value=('red', 'blue'))\nst.write('You selected wavelengths between', start_color, 'and', end_color)\n
\n\n \n ", + "description": "

Display a slider widget to select items from a list.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.select_slider and st.slider is that\nselect_slider accepts any datatype and takes an iterable set of\noptions, while st.slider only accepts numerical or date/time data and\ntakes a range as input.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "value", + "type_name": "a supported type or a tuple/list of supported types or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The value of the slider when it first renders. If a tuple/list\nof two values is passed here, then a range slider with those lower\nand upper bounds is rendered. For example, if set to (1, 10) the\nslider will have a selectable range between 1 and 10.\nDefaults to first option.

\n", + "default": "first" + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Function to modify the display of the labels from the options.\nargument. It receives the option as an argument and its output\nwill be cast to str.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the select slider.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this select_slider's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the select slider if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "any value or tuple of any value", + "is_generator": false, + "description": "

The current value of the slider widget. The return type will match\nthe data type of the value parameter.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/select_slider.py#L110" + }, + "streamlit.selectbox": { + "name": "selectbox", + "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    'How would you like to be contacted?',\n    ('Email', 'Home phone', 'Mobile phone'))\n\nst.write('You selected:', option)\n
\n\n \n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write('You selected:', option)\n
\n\n \n
\n", + "description": "

Display a select widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "index", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The index of the preselected option on first render. If None,\nwill initialize empty and return None until the user selects an option.\nDefaults to 0 (the first option).

\n", + "default": "0" + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Function to modify the display of the labels. It receives the option\nas an argument and its output will be cast to str.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the selectbox.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this selectbox's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "placeholder", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A string to display when no options are selected.\nDefaults to 'Choose an option'.

\n", + "default": "s" + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the selectbox if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "any", + "is_generator": false, + "description": "

The selected option or None if no option is selected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/selectbox.py#L76" + }, + "streamlit.set_option": { + "name": "set_option", + "signature": "st.set_option(key, value)", + "description": "

Set config option.

\n
\n
Currently, only the following config options can be set within the script itself:
\n
    \n
  • client.caching
  • \n
  • client.displayEnabled
  • \n
  • deprecation.*
  • \n
\n
\n
\n

Calling with any other options will raise StreamlitAPIException.

\n

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

\n", + "args": [ + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

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

\n", + "default": null + }, + { + "name": "value", + "type_name": null, + "is_optional": null, + "is_kwarg_only": false, + "description": "

The new value to assign to this config option.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/config.py#L92" + }, + "streamlit.set_page_config": { + "name": "set_page_config", + "signature": "st.set_page_config(page_title=None, page_icon=None, layout=\"centered\", initial_sidebar_state=\"auto\", menu_items=None)", + "example": "
\nimport streamlit as st\n\nst.set_page_config(\n    page_title="Ex-stream-ly Cool App",\n    page_icon="\ud83e\uddca",\n    layout="wide",\n    initial_sidebar_state="expanded",\n    menu_items={\n        'Get Help': 'https://www.extremelycoolapp.com/help',\n        'Report a bug': "https://www.extremelycoolapp.com/bug",\n        'About': "# This is a header. This is an *extremely* cool app!"\n    }\n)\n
\n", + "description": "

Configures the default settings of the page.

\n
\n

Note

\n

This must be the first Streamlit command used on an app page, and must only\nbe set once per page.

\n
\n", + "args": [ + { + "name": "page_title", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The page title, shown in the browser tab. If None, defaults to the\nfilename of the script ("app.py" would show "app \u2022 Streamlit").

\n", + "default": "the" + }, + { + "name": "page_icon", + "type_name": "Anything supported by st.image or str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The page favicon.\nBesides the types supported by st.image (like URLs or numpy arrays),\nyou can pass in an emoji as a string ("\ud83e\udd88") or a shortcode (":shark:").\nIf you're feeling lucky, try "random" for a random emoji!\nEmoji icons are courtesy of Twemoji and loaded from MaxCDN.

\n", + "default": null + }, + { + "name": "layout", + "type_name": "\"centered\" or \"wide\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

How the page content should be laid out. Defaults to "centered",\nwhich constrains the elements into a centered column of fixed width;\n"wide" uses the entire screen.

\n", + "default": "s" + }, + { + "name": "initial_sidebar_state", + "type_name": "\"auto\", \"expanded\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

How the sidebar should start out. Defaults to "auto",\nwhich hides the sidebar on small devices and shows it otherwise.\n"expanded" shows the sidebar initially; "collapsed" hides it.\nIn most cases, you should just use "auto", otherwise the app will\nlook bad when embedded and viewed on mobile.

\n", + "default": "s" + }, + { + "name": "menu_items", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Configure the menu that appears on the top-right side of this app.\nThe keys in this dict denote the menu item you'd like to configure:

\n
    \n
  • \n
    "Get help": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "Report a Bug": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "About": str or None
    \n
    A markdown string to show in the About dialog.\nIf None, only shows Streamlit's default About text.
    \n
    \n
  • \n
\n

The URL may also refer to an email address e.g. mailto:john@example.com.

\n", + "default": "About" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/page_config.py#L114" + }, + "streamlit.slider": { + "name": "slider", + "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "examples": "
\n
\nimport streamlit as st\n\nage = st.slider('How old are you?', 0, 130, 25)\nst.write("I'm ", age, 'years old')\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    'Select a range of values',\n    0.0, 100.0, (25.0, 75.0))\nst.write('Values:', values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n\n \n
\n", + "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "a supported type or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The minimum permitted value.\nDefaults to 0 if the value is an int, 0.0 if a float,\nvalue - timedelta(days=14) if a date/datetime, time.min if a time

\n", + "default": "0" + }, + { + "name": "max_value", + "type_name": "a supported type or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum permitted value.\nDefaults to 100 if the value is an int, 1.0 if a float,\nvalue + timedelta(days=14) if a date/datetime, time.max if a time

\n", + "default": "100" + }, + { + "name": "value", + "type_name": "a supported type or a tuple/list of supported types or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The value of the slider when it first renders. If a tuple/list\nof two values is passed here, then a range slider with those lower\nand upper bounds is rendered. For example, if set to (1, 10) the\nslider will have a selectable range between 1 and 10.\nDefaults to min_value.

\n", + "default": "min_value" + }, + { + "name": "step", + "type_name": "int, float, timedelta, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The stepping interval.\nDefaults to 1 if the value is an int, 0.01 if a float,\ntimedelta(days=1) if a date/datetime, timedelta(minutes=15) if a time\n(or if max_value - min_value < 1 day)

\n", + "default": "1" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. This does not impact the return value.\nFormatter for int/float supports: %d %e %f %g %i\nFormatter for date/time/datetime uses Moment.js notation:\nhttps://momentjs.com/docs/#/displaying/format/

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the slider.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this slider's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the slider if set to True. The\ndefault is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "int/float/date/time/datetime or tuple of int/float/date/time/datetime", + "is_generator": false, + "description": "

The current value of the slider widget. The return type will match\nthe data type of the value parameter.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/slider.py#L173" + }, + "streamlit.snow": { + "name": "snow", + "signature": "st.snow()", + "example": "
\n
\nimport streamlit as st\n\nst.snow()\n
\n

...then watch your app and get ready for a cool celebration!

\n
\n", + "description": "

Draw celebratory snowfall.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/snow.py#L25" + }, + "streamlit.spinner": { + "name": "spinner", + "signature": "st.spinner(text=\"In progress...\")", + "example": "
\n
\nimport time\nimport streamlit as st\n\nwith st.spinner('Wait for it...'):\n    time.sleep(5)\nst.success('Done!')\n
\n
\n", + "description": "

Temporarily displays a message while executing a block of code.

\n", + "args": [ + { + "name": "text", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A message to display while executing that block

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/spinner.py#L23" + }, + "streamlit.status": { + "name": "status", + "signature": "st.status(label, *, expanded=False, state=\"running\")", + "examples": "
\n

You can use with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button('Rerun')\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button('Rerun')\n
\n\n \n
\n", + "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse "with" notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\n"with" notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The initial label of the status container. The label can optionally\ncontain Markdown and supports the following elements: Bold,\nItalics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "expanded", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If True, initializes the status container in "expanded" state. Defaults to\nFalse (collapsed).

\n", + "default": "s" + }, + { + "name": "state", + "type_name": "\"running\", \"complete\", or \"error\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The initial state of the status container which determines which icon is\nshown:

\n
    \n
  • running (default): A spinner icon is shown.
  • \n
  • complete: A checkmark icon is shown.
  • \n
  • error: An error icon is shown.
  • \n
\n", + "default": null + } + ], + "returns": [ + { + "type_name": "StatusContainer", + "is_generator": false, + "description": "

A mutable status container that can hold multiple elements. The label, state,\nand expanded state can be updated after creation via .update().

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L477" + }, + "streamlit.stop": { + "name": "stop", + "signature": "st.stop()", + "example": "
\n
\nimport streamlit as st\n\nname = st.text_input('Name')\nif not name:\n  st.warning('Please input a name.')\n  st.stop()\nst.success('Thank you for inputting a name.')\n
\n
\n", + "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L30" + }, + "streamlit.subheader": { + "name": "subheader", + "signature": "st.subheader(body, anchor=None, *, help=None, divider=False)", + "examples": "
\n
\nimport streamlit as st\n\nst.subheader('This is a subheader with a divider', divider='rainbow')\nst.subheader('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "description": "

Display text in subheader formatting.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "anchor", + "type_name": "str or False", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The anchor name of the header that can be accessed with #anchor\nin the URL. If omitted, it generates an anchor using the body.\nIf False, the anchor is not shown in the UI.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the subheader.

\n", + "default": null + }, + { + "name": "divider", + "type_name": "bool or \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L111" + }, + "streamlit.success": { + "name": "success", + "signature": "st.success(body, *, icon=None)", + "example": "
\n
\nimport streamlit as st\n\nst.success('This is a success message!', icon="\u2705")\n
\n
\n", + "description": "

Display a success message.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The success text to display.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L124" + }, + "streamlit.switch_page": { + "name": "switch_page", + "signature": "st.switch_page(page)", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py.py\n\u2502   \u2514\u2500\u2500 page_2.py.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n\n \n
\n", + "description": "

Programmatically switch the current page in a multipage app.

\n

When st.switch_page is called, the current page execution stops and\nthe specified page runs as if the user clicked on it in the sidebar\nnavigation. The specified page must be recognized by Streamlit's multipage\narchitecture (your main Python file or a Python file in a pages/\nfolder). Arbitrary Python scripts cannot be passed to st.switch_page.

\n", + "args": [ + { + "name": "page", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The file path (relative to the main script) of the page to switch to.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L96" + }, + "streamlit.table": { + "name": "table", + "signature": "st.table(data=None)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5)))\n\nst.table(df)\n
\n\n \n
\n", + "description": "

Display a static table.

\n

This differs from st.dataframe in that the table in this case is\nstatic: its entire contents are laid out directly on the page.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The table data.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L240" + }, + "streamlit.tabs": { + "name": "tabs", + "signature": "st.tabs(tabs)", + "examples": "
\n

You can use with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", + "args": [ + { + "name": "tabs", + "type_name": "list of str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Creates a tab for each string in the list. The first tab is selected by default.\nThe string is used as the name of the tab and can optionally contain Markdown,\nsupporting the following elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "list of containers", + "is_generator": false, + "description": "

A list of container objects.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L270" + }, + "streamlit.text": { + "name": "text", + "signature": "st.text(body, *, help=None)", + "example": "
\n
\nimport streamlit as st\n\nst.text('This is some text.')\n
\n
\n", + "description": "

Write fixed-width and preformatted text.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The string to display.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the text.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/text.py#L27" + }, + "streamlit.text_area": { + "name": "text_area", + "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f'You wrote {len(txt)} characters.')\n
\n\n \n
\n", + "description": "

Display a multi-line text input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "object or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text value of this widget when it first renders. This will be\ncast to str internally. If None, will initialize empty and\nreturn None until the user provides input. Defaults to empty string.

\n", + "default": "empty" + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Desired height of the UI element expressed in pixels. If None, a\ndefault height is used.

\n", + "default": "height" + }, + { + "name": "max_chars", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Maximum number of characters allowed in text area.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the textarea.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this text_area's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "placeholder", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string displayed when the text area is empty. If None,\nno text is displayed.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the text area if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "str or None", + "is_generator": false, + "description": "

The current value of the text area widget or None if no value has been\nprovided by the user.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/text_widgets.py#L376" + }, + "streamlit.text_input": { + "name": "text_input", + "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input('Movie title', 'Life of Brian')\nst.write('The current movie title is', title)\n
\n\n \n
\n", + "description": "

Display a single-line text input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "object or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text value of this widget when it first renders. This will be\ncast to str internally. If None, will initialize empty and\nreturn None until the user provides input. Defaults to empty string.

\n", + "default": "empty" + }, + { + "name": "max_chars", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Max number of characters allowed in text input.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "type", + "type_name": "\"default\" or \"password\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The type of the text input. This can be either "default" (for\na regular text input), or "password" (for a text input that\nmasks the user's typed value). Defaults to "default".

\n", + "default": "s" + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the input.

\n", + "default": null + }, + { + "name": "autocomplete", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional value that will be passed to the <input> element's\nautocomplete property. If unspecified, this value will be set to\n"new-password" for "password" inputs, and the empty string for\n"default" inputs. For more details, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this text input's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "placeholder", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string displayed when the text input is empty. If None,\nno text is displayed.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the text input if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "str or None", + "is_generator": false, + "description": "

The current value of the text input widget or None if no value has been\nprovided by the user.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/text_widgets.py#L114" + }, + "streamlit.time_input": { + "name": "time_input", + "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00)", + "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input('Set an alarm for', datetime.time(8, 45))\nst.write('Alarm is set for', t)\n
\n\n \n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input('Set an alarm for', value=None)\nst.write('Alarm is set for', t)\n
\n\n \n
\n", + "description": "

Display a time input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "datetime.time/datetime.datetime, \"now\" or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The value of this widget when it first renders. This will be\ncast to str internally. If None, will initialize empty and\nreturn None until the user selects a time. If "now" (default),\nwill initialize with the current time.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this time_input's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the time input if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + }, + { + "name": "step", + "type_name": "int or timedelta", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The stepping interval in seconds. Defaults to 900, i.e. 15 minutes.\nYou can also pass a datetime.timedelta object.

\n", + "default": "900" + } + ], + "returns": [ + { + "type_name": "datetime.time or None", + "is_generator": false, + "description": "

The current value of the time input widget or None if no time has been\nselected.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/time_widgets.py#L276" + }, + "streamlit.title": { + "name": "title", + "signature": "st.title(body, anchor=None, *, help=None)", + "examples": "
\n
\nimport streamlit as st\n\nst.title('This is a title')\nst.title('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "description": "

Display text in title formatting.

\n

Each document should have a single st.title(), although this is not\nenforced.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "anchor", + "type_name": "str or False", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The anchor name of the header that can be accessed with #anchor\nin the URL. If omitted, it generates an anchor using the body.\nIf False, the anchor is not shown in the UI.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the title.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L181" + }, + "streamlit.toast": { + "name": "toast", + "signature": "st.toast(body, *, icon=None)", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", + "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the toast. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/toast.py#L37" + }, + "streamlit.toggle": { + "name": "toggle", + "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "example": "
\n
\nimport streamlit as st\n\non = st.toggle('Activate feature')\n\nif on:\n    st.write('Feature activated!')\n
\n\n \n
\n", + "description": "

Display a toggle widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "value", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Preselect the toggle when it first renders. This will be\ncast to bool internally.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tooltip that gets displayed next to the toggle.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional callback invoked when this toggle's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the toggle if set to True.\nThe default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "bool", + "is_generator": false, + "description": "

Whether or not the toggle is checked.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/checkbox.py#L156" + }, + "streamlit.vega_lite_chart": { + "name": "vega_lite_chart", + "signature": "st.vega_lite_chart(data=None, spec=None, use_container_width=False, theme=\"streamlit\", **kwargs)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n\n \n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n
\n", + "description": "

Display a chart using the Vega-Lite library.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Either the data to be plotted or a Vega-Lite spec containing the\ndata (which more closely follows the Vega-Lite API).

\n", + "default": null + }, + { + "name": "spec", + "type_name": "dict or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The Vega-Lite spec for the chart. If the spec was already passed in\nthe previous argument, this must be set to None. See\nhttps://vega.github.io/vega-lite/docs/ for more info.

\n", + "default": null + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, set the chart width to the column width. This takes\nprecedence over Vega-Lite's native width value.

\n", + "default": null + }, + { + "name": "theme", + "type_name": "\"streamlit\" or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", + "default": "behavior" + }, + { + "name": "**kwargs", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Same as spec, but as keywords.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_vega_lite.py#L41" + }, + "streamlit.video": { + "name": "video", + "signature": "st.video(data, format=\"video/mp4\", start_time=0)", + "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", + "description": "

Display a video player.

\n", + "args": [ + { + "name": "data", + "type_name": "str, bytes, BytesIO, numpy.ndarray, or file", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Raw video data, filename, or URL pointing to a video to load.\nIncludes support for YouTube URLs.\nNumpy arrays and raw data formats must include all necessary file\nheaders to match specified file format.

\n", + "default": null + }, + { + "name": "format", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The mime type for the video file. Defaults to 'video/mp4'.\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "default": "s" + }, + { + "name": "start_time", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The time from which this element should start playing.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/media.py#L115" + }, + "streamlit.warning": { + "name": "warning", + "signature": "st.warning(body, *, icon=None)", + "example": "
\n
\nimport streamlit as st\n\nst.warning('This is a warning', icon="\u26a0\ufe0f")\n
\n
\n", + "description": "

Display warning message.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The warning text to display.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", + "default": "None" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L59" + }, + "streamlit.write": { + "name": "write", + "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", + "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write('Hello, *World!* :sunglasses:')\n
\n\n \n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(pd.DataFrame({\n    'first column': [1, 2, 3, 4],\n    'second column': [10, 20, 30, 40],\n}))\n
\n\n \n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write('1 + 1 = ', 2)\nst.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.')\n
\n\n \n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(\n    np.random.randn(200, 3),\n    columns=['a', 'b', 'c'])\n\nc = alt.Chart(df).mark_circle().encode(\n    x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])\n\nst.write(c)\n
\n\n \n
\n", + "description": "

Write arguments to the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit commands,\nwrite() has some unique properties:

\n
    \n
  1. You can pass in multiple arguments, all of which will be written.
  2. \n
  3. Its behavior depends on the input types as follows.
  4. \n
  5. It returns None, so its "slot" in the App cannot be reused.
  6. \n
\n", + "args": [ + { + "name": "*args", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": false, + "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(data_frame) : Displays the DataFrame as a table.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(dict) : Displays dict in an interactive widget.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", + "default": null + }, + { + "name": "unsafe_allow_html", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

This is a keyword-only argument that defaults to False.

\n

By default, any HTML tags found in strings will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write secure\nHTML, so by using this argument you may be compromising your users'\nsecurity. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", + "default": "False" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/write.py#L212" + }, + "streamlit.write_stream": { + "name": "write_stream", + "signature": "st.write_stream(stream)", + "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split():\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split():\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n\n \n
\n", + "description": "

Stream a generator, iterable, or stream-like sequence to the app.

\n

st.write_stream iterates through the given sequences and writes all\nchunks to the app. String chunks will be written using a typewriter effect.\nOther data types will be written using st.write.

\n", + "args": [ + { + "name": "stream", + "type_name": "Callable, Generator, Iterable, OpenAI Stream, or LangChain Stream", + "is_optional": false, + "description": "

The generator or iterable to stream.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "str or list", + "is_generator": false, + "description": "

The full response. If the streamed output only contains text, this\nis a string. Otherwise, this is a list of all the streamed objects.\nThe return value is fully compatible as input for st.write.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/write.py#L69" + }, + "streamlit.experimental_memo.clear": { + "name": "experimental_memo.clear", + "signature": "st.experimental_memo.clear()", + "description": "

Clear all in-memory and on-disk data caches.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + }, + "streamlit.cache_data.clear": { + "name": "cache_data.clear", + "signature": "st.cache_data.clear()", + "description": "

Clear all in-memory and on-disk data caches.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + }, + "streamlit.experimental_singleton.clear": { + "name": "experimental_singleton.clear", + "signature": "st.experimental_singleton.clear()", + "description": "

Clear all cache_resource caches.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L447" + }, + "streamlit.cache_resource.clear": { + "name": "cache_resource.clear", + "signature": "st.cache_resource.clear()", + "description": "

Clear all cache_resource caches.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L447" + }, + "streamlit.query_params.clear": { + "name": "clear", + "signature": "st.query_params.clear()", + "description": "

Clear all query parameters from the URL of the app.

\n", + "args": [], + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L93" + }, + "streamlit.query_params.get_all": { + "name": "get_all", + "signature": "st.query_params.get_all(key)", + "description": "

Get a list of all query parameter values associated to a given key.

\n

When a key is repeated as a query parameter within the URL, this method\nallows all values to be obtained. In contrast, dict-like methods only\nretrieve the last value when a key is repeated in the URL.

\n", + "args": [ + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label of the query parameter in the URL.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "List[str]", + "is_generator": false, + "description": "

A list of values associated to the given key. May return zero, one,\nor multiple values.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L70" + }, + "streamlit.query_params.to_dict": { + "name": "to_dict", + "signature": "st.query_params.to_dict()", + "description": "

Get all query parameters as a dictionary.

\n

This method primarily exists for internal use and is not needed for\nmost cases. st.query_params returns an object that inherits from\ndict by default.

\n

When a key is repeated as a query parameter within the URL, this method\nwill return only the last value of each unique key.

\n", + "args": [], + "returns": [ + { + "type_name": "Dict[str,str]", + "is_generator": false, + "description": "

A dictionary of the current query paramters in the app's URL.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L105" + }, + "streamlit.connections.BaseConnection": { + "name": "BaseConnection", + "signature": "st.connections.BaseConnection(connection_name, **kwargs)", + "is_class": true, + "methods": [ + { + "name": "reset", + "signature": "st.connections.reset.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + } + ], + "properties": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L25", + "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", + "args": [], + "returns": [] + }, + "streamlit.connections.ExperimentalBaseConnection": { + "name": "ExperimentalBaseConnection", + "signature": "st.connections.ExperimentalBaseConnection(connection_name, **kwargs)", + "is_class": true, + "methods": [ + { + "name": "reset", + "signature": "st.connections.reset.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + } + ], + "properties": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L25", + "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", + "args": [], + "returns": [] + }, + "streamlit.connections.SQLConnection": { + "name": "SQLConnection", + "signature": "st.connections.SQLConnection(connection_name, **kwargs)", + "is_class": true, + "methods": [ + { + "name": "connect", + "signature": "st.connections.connect.connect()", + "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L246" + }, + { + "name": "query", + "signature": "st.connections.query.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("select * from pet_owners where owner = :owner", ttl=3600, params={"owner":"barbara"})\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only query.

", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "show_spinner", + "type_name": "boolean or string", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "default": "to" + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "index_col", + "type_name": "str, list of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column(s) to set as index(MultiIndex). Default is None.

\n", + "default": "None" + }, + { + "name": "chunksize", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If specified, return an iterator where chunksize is the number of\nrows to include in each chunk. Default is None.

\n", + "default": "None" + }, + { + "name": "params", + "type_name": "list, tuple, dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

List of parameters to pass to the execute method. The syntax used to pass\nparameters is database driver dependent. Check your database driver\ndocumentation for which of the five syntax styles, described in PEP 249\nparamstyle, is supported.\nDefault is None.

\n", + "default": "None" + }, + { + "name": "**kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional keyword arguments are passed to pandas.read_sql.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L122" + }, + { + "name": "reset", + "signature": "st.connections.reset.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + } + ], + "properties": [ + { + "name": "driver", + "signature": "st.connections.driver.driver", + "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L265" + }, + { + "name": "engine", + "signature": "st.connections.engine.engine", + "description": "

The underlying SQLAlchemy Engine.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L257" + }, + { + "name": "session", + "signature": "st.connections.session.session", + "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", + "description": "

Return a SQLAlchemy Session.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L273" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L47", + "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

A connection to a SQL database using a SQLAlchemy Engine. Initialize using st.connection("<name>", type="sql").

\n

SQLConnection provides the query() convenience method, which can be used to\nrun simple read-only queries with both caching and simple error handling/retries.\nMore complex DB interactions can be performed by using the .session property\nto receive a regular SQLAlchemy Session.

\n

SQLConnections should always be created using st.connection(), not\ninitialized directly. Connection parameters for a SQLConnection can be specified\nusing either st.secrets or **kwargs. Some frequently used parameters include:

\n
    \n
  • url or arguments for sqlalchemy.engine.URL.create().\nMost commonly it includes a dialect, host, database, username and password.
  • \n
  • create_engine_kwargs can be passed via st.secrets, such as for\nsnowflake-sqlalchemy\nor Google BigQuery.\nThese can also be passed directly as **kwargs to connection().
  • \n
  • autocommit=True to run with isolation level AUTOCOMMIT. Default is False.
  • \n
\n", + "args": [], + "returns": [] + }, + "streamlit.connections.SnowflakeConnection": { + "name": "SnowflakeConnection", + "signature": "st.connections.SnowflakeConnection(connection_name, **kwargs)", + "is_class": true, + "methods": [ + { + "name": "cursor", + "signature": "st.connections.cursor.cursor()", + "description": "

Return a PEP 249-compliant cursor object.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L263" + }, + { + "name": "query", + "signature": "st.connections.query.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only SQL query.

", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "boolean or string", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "default": "to" + }, + { + "name": "params", + "type_name": "list, tuple, dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

List of parameters to pass to the execute method. This connector supports\nbinding data to a SQL statement using qmark bindings. For more information\nand examples, see the Snowflake Python Connector documentation.\nDefault is None.

\n", + "default": "None" + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L120" + }, + { + "name": "reset", + "signature": "st.connections.reset.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + { + "name": "session", + "signature": "st.connections.session.session()", + "description": "

Create a new Snowpark Session from this connection.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L280" + }, + { + "name": "write_pandas", + "signature": "st.connections.write_pandas.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", + "description": "

Call snowflake.connector.pandas_tools.write_pandas with this connection.

", + "args": [], + "returns": [ + { + "type_name": "tuple[bool, int, int]", + "is_generator": false, + "description": "
\n
A tuple containing three values:
\n
    \n
  1. A bool that is True if the write was successful.
  2. \n
  3. An int giving the number of chunks of data that were copied.
  4. \n
  5. An int giving the number of rows that were inserted.
  6. \n
\n
\n
\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L225" + } + ], + "properties": [ + { + "name": "raw_connection", + "signature": "st.connections.raw_connection.raw_connection", + "description": "

Access the underlying Snowflake Python connector object.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L271" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L41", + "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", + "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", + "args": [], + "returns": [] + }, + "streamlit.connections.SnowparkConnection": { + "name": "SnowparkConnection", + "signature": "st.connections.SnowparkConnection(connection_name, **kwargs)", + "is_class": true, + "methods": [ + { + "name": "query", + "signature": "st.connections.query.query(sql, ttl=None)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only SQL query.

", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L96" + }, + { + "name": "reset", + "signature": "st.connections.reset.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + { + "name": "safe_session", + "signature": "st.connections.safe_session.safe_session()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n
\n", + "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L189" + } + ], + "properties": [ + { + "name": "session", + "signature": "st.connections.session.session", + "example": "
\n
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n
\n", + "description": "

Access the underlying Snowpark session.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L166" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L45", + "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", + "args": [], + "returns": [] + }, + "streamlit.connections.SQLConnection.connect": { + "name": "connect", + "signature": "SQLConnection.connect()", + "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L246" + }, + "streamlit.connections.SQLConnection.driver": { + "name": "driver", + "signature": "SQLConnection.driver", + "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L265" + }, + "streamlit.connections.SQLConnection.engine": { + "name": "engine", + "signature": "SQLConnection.engine", + "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L257" + }, + "streamlit.connections.SQLConnection.query": { + "name": "query", + "signature": "SQLConnection.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("select * from pet_owners where owner = :owner", ttl=3600, params={"owner":"barbara"})\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n

Aside from the ttl kwarg, all kwargs passed to this function are passed down\nto pandas.read_sql\nand have the behavior described in the pandas documentation.

\n", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "show_spinner", + "type_name": "boolean or string", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "default": "to" + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "index_col", + "type_name": "str, list of str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Column(s) to set as index(MultiIndex). Default is None.

\n", + "default": "None" + }, + { + "name": "chunksize", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

If specified, return an iterator where chunksize is the number of\nrows to include in each chunk. Default is None.

\n", + "default": "None" + }, + { + "name": "params", + "type_name": "list, tuple, dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

List of parameters to pass to the execute method. The syntax used to pass\nparameters is database driver dependent. Check your database driver\ndocumentation for which of the five syntax styles, described in PEP 249\nparamstyle, is supported.\nDefault is None.

\n", + "default": "None" + }, + { + "name": "**kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional keyword arguments are passed to pandas.read_sql.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L122" + }, + "streamlit.connections.SQLConnection.reset": { + "name": "reset", + "signature": "SQLConnection.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + "streamlit.connections.SQLConnection.session": { + "name": "session", + "signature": "SQLConnection.session", + "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", + "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L273" + }, + "streamlit.connections.SnowparkConnection.query": { + "name": "query", + "signature": "SnowparkConnection.query(sql, ttl=None)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only SQL query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L96" + }, + "streamlit.connections.SnowparkConnection.reset": { + "name": "reset", + "signature": "SnowparkConnection.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + "streamlit.connections.SnowparkConnection.safe_session": { + "name": "safe_session", + "signature": "SnowparkConnection.safe_session()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n
\n", + "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L189" + }, + "streamlit.connections.SnowparkConnection.session": { + "name": "session", + "signature": "SnowparkConnection.session", + "example": "
\n
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n
\n", + "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L166" + }, + "streamlit.connections.SnowflakeConnection.cursor": { + "name": "cursor", + "signature": "SnowflakeConnection.cursor()", + "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L263" + }, + "streamlit.connections.SnowflakeConnection.query": { + "name": "query", + "signature": "SnowflakeConnection.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only SQL query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n", + "args": [ + { + "name": "sql", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The read-only SQL query to execute.

\n", + "default": null + }, + { + "name": "ttl", + "type_name": "float, int, timedelta or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", + "default": "None" + }, + { + "name": "show_spinner", + "type_name": "boolean or string", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "default": "to" + }, + { + "name": "params", + "type_name": "list, tuple, dict or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

List of parameters to pass to the execute method. This connector supports\nbinding data to a SQL statement using qmark bindings. For more information\nand examples, see the Snowflake Python Connector documentation.\nDefault is None.

\n", + "default": "None" + } + ], + "returns": [ + { + "type_name": "pandas.DataFrame", + "is_generator": false, + "description": "

The result of running the query, formatted as a pandas DataFrame.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L120" + }, + "streamlit.connections.SnowflakeConnection.raw_connection": { + "name": "raw_connection", + "signature": "SnowflakeConnection.raw_connection", + "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L271" + }, + "streamlit.connections.SnowflakeConnection.reset": { + "name": "reset", + "signature": "SnowflakeConnection.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + "streamlit.connections.SnowflakeConnection.session": { + "name": "session", + "signature": "SnowflakeConnection.session()", + "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L280" + }, + "streamlit.connections.SnowflakeConnection.write_pandas": { + "name": "write_pandas", + "signature": "SnowflakeConnection.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", + "description": "

Call snowflake.connector.pandas_tools.write_pandas with this connection.

\n

This convenience method is simply a thin wrapper around the write_pandas\nfunction of the same name from snowflake.connector.pandas_tools. For more\ninformation, see the Snowflake Python Connector documentation.

\n", + "args": [], + "returns": [ + { + "type_name": "tuple[bool, int, int]", + "is_generator": false, + "description": "
\n
A tuple containing three values:
\n
    \n
  1. A bool that is True if the write was successful.
  2. \n
  3. An int giving the number of chunks of data that were copied.
  4. \n
  5. An int giving the number of rows that were inserted.
  6. \n
\n
\n
\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L225" + }, + "streamlit.connections.BaseConnection.reset": { + "name": "reset", + "signature": "BaseConnection.reset()", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + }, + "streamlit.column_config.BarChartColumn": { + "name": "BarChartColumn", + "signature": "st.column_config.BarChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a bar chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "y_min", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "default": null + }, + { + "name": "y_max", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L778" + }, + "streamlit.column_config.CheckboxColumn": { + "name": "CheckboxColumn", + "signature": "st.column_config.CheckboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a checkbox column in st.dataframe or st.data_editor.

\n

This is the default column type for boolean values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a checkbox widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L597" + }, + "streamlit.column_config.Column": { + "name": "Column", + "signature": "st.column_config.Column(label=None, *, width=None, help=None, disabled=None, required=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n\n \n
\n", + "description": "

Configure a generic column in st.dataframe or st.data_editor.

\n

The type of the column will be automatically inferred from the data type.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n

To change the type of the column and enable type-specific configuration options,\nuse one of the column types in the st.column_config namespace,\ne.g. st.column_config.NumberColumn.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L188" + }, + "streamlit.column_config.DateColumn": { + "name": "DateColumn", + "signature": "st.column_config.DateColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "examples": "
\n
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a date column in st.dataframe or st.data_editor.

\n

This is the default column type for date values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When used\nwith st.data_editor, editing will be enabled with a date picker widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "datetime.date or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "datetime.date or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum date that can be entered.\nIf None (default), there will be no minimum.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "datetime.date or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum date that can be entered.\nIf None (default), there will be no maximum.

\n", + "default": null + }, + { + "name": "step", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The stepping interval in days. If None (default), the step will be 1 day.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1310" + }, + "streamlit.column_config.DatetimeColumn": { + "name": "DatetimeColumn", + "signature": "st.column_config.DatetimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None, timezone=None)", + "examples": "
\n
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a datetime column in st.dataframe or st.data_editor.

\n

This is the default column type for datetime values. This command needs to be\nused in the column_config parameter of st.dataframe or\nst.data_editor. When used with st.data_editor, editing will be enabled\nwith a datetime picker widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "datetime.datetime or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD HH:mm:ss.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "datetime.datetime or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum datetime that can be entered.\nIf None (default), there will be no minimum.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "datetime.datetime or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum datetime that can be entered.\nIf None (default), there will be no maximum.

\n", + "default": null + }, + { + "name": "step", + "type_name": "int, float, datetime.timedelta, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The stepping interval in seconds. If None (default), the step will be 1 second.

\n", + "default": null + }, + { + "name": "timezone", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The timezone of this column. If None (default),\nthe timezone is inferred from the underlying data.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1075" + }, + "streamlit.column_config.ImageColumn": { + "name": "ImageColumn", + "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L939" + }, + "streamlit.column_config.LineChartColumn": { + "name": "LineChartColumn", + "signature": "st.column_config.LineChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a line chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "y_min", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "default": null + }, + { + "name": "y_max", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L858" + }, + "streamlit.column_config.LinkColumn": { + "name": "LinkColumn", + "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None, display_text=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate="^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text="https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a link column in st.dataframe or st.data_editor.

\n

The cell values need to be string and will be shown as clickable links.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor. When used with st.data_editor, editing will be enabled\nwith a text input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "max_chars", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of characters that can be entered. If None (default),\nthere will be no maximum.

\n", + "default": null + }, + { + "name": "validate", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A regular expression (JS flavor, e.g. "^https://.+$") that edited values are validated against.\nIf the input is invalid, it will not be submitted.

\n", + "default": null + }, + { + "name": "display_text", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.streamlit\\.app"\nto extract the display text "foo" from the URL "https://foo.streamlit.app".
  • \n
\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L467" + }, + "streamlit.column_config.ListColumn": { + "name": "ListColumn", + "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1010" + }, + "streamlit.column_config.NumberColumn": { + "name": "NumberColumn", + "signature": "st.column_config.NumberColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a number column in st.dataframe or st.data_editor.

\n

This is the default column type for integer and float values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a numeric input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. Valid formatters: %d %e %f %g %i %u.\nYou can also add prefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value that can be entered.\nIf None (default), there will be no minimum.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum value that can be entered.\nIf None (default), there will be no maximum.

\n", + "default": null + }, + { + "name": "step", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The stepping interval. Specifies the precision of numbers that can be entered.\nIf None (default), uses 1 for integers and unrestricted precision for floats.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L263" + }, + "streamlit.column_config.ProgressColumn": { + "name": "ProgressColumn", + "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, format=None, min_value=None, max_value=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a progress column in st.dataframe or st.data_editor.

\n

Cells need to contain a number. Progress columns are not editable at the moment.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A printf-style format string controlling how numbers are displayed.\nValid formatters: %d %e %f %g %i %u. You can also add prefixes and suffixes,\ne.g. "$ %.2f" to show a dollar prefix.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value of the progress bar.\nIf None (default), will be 0.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value of the progress bar. If None (default), will be 100 for\ninteger values and 1 for float values.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1423" + }, + "streamlit.column_config.SelectboxColumn": { + "name": "SelectboxColumn", + "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, options=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a selectbox column in st.dataframe or st.data_editor.

\n

This is the default column type for Pandas categorical values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a selectbox widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "str, int, float, bool, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "options", + "type_name": "Iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The options that can be selected during editing. If None (default), this will be\ninferred from the underlying dataframe column if its dtype is "category"\n(see Pandas docs on categorical data).

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L679" + }, + "streamlit.column_config.TextColumn": { + "name": "TextColumn", + "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate="^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a text column in st.dataframe or st.data_editor.

\n

This is the default column type for string values. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor. When used with\nst.data_editor, editing will be enabled with a text input widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "max_chars", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum number of characters that can be entered. If None (default),\nthere will be no maximum.

\n", + "default": null + }, + { + "name": "validate", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A regular expression (JS flavor, e.g. "^[a-z]+$") that edited values are validated against.\nIf the input is invalid, it will not be submitted.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L373" + }, + "streamlit.column_config.TimeColumn": { + "name": "TimeColumn", + "signature": "st.column_config.TimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "examples": "
\n
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure a time column in st.dataframe or st.data_editor.

\n

This is the default column type for time values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When\nused with st.data_editor, editing will be enabled with a time picker widget.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", + "default": "False" + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", + "default": "False" + }, + { + "name": "default", + "type_name": "datetime.time or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "default": "value" + }, + { + "name": "format", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses HH:mm:ss.

\n", + "default": null + }, + { + "name": "min_value", + "type_name": "datetime.time or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum time that can be entered.\nIf None (default), there will be no minimum.

\n", + "default": null + }, + { + "name": "max_value", + "type_name": "datetime.time or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum time that can be entered.\nIf None (default), there will be no maximum.

\n", + "default": null + }, + { + "name": "step", + "type_name": "int, float, datetime.timedelta, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The stepping interval in seconds. If None (default), the step will be 1 second.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1196" + }, + "streamlit.components.v1.declare_component": { + "name": "declare_component", + "signature": "st.components.v1.declare_component(name, path=None, url=None)", + "description": "

Create and register a custom component.

\n", + "args": [ + { + "name": "name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short, descriptive name for the component. Like, "slider".

\n", + "default": null + }, + { + "name": "path", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The path to serve the component's frontend files from. Either\npath or url must be specified, but not both.

\n", + "default": null + }, + { + "name": "url", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The URL that the component is served from. Either path or url\nmust be specified, but not both.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "CustomComponent", + "is_generator": false, + "description": "

A CustomComponent that can be called like a function.\nCalling the component will create a new instance of the component\nin the Streamlit app.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/components/v1/components.py#L265" + }, + "streamlit.components.v1.html": { + "name": "html", + "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False)", + "description": "

Display an HTML string in an iframe.

\n", + "args": [ + { + "name": "html", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The HTML string to embed in the iframe.

\n", + "default": null + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The width of the frame in CSS pixels. Defaults to the app's\ndefault element width.

\n", + "default": "the" + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The height of the frame in CSS pixels. Defaults to 150.

\n", + "default": "150" + }, + { + "name": "scrolling", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, show a scrollbar when the content is larger than the iframe.\nOtherwise, do not show a scrollbar. Defaults to False.

\n", + "default": "False" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/iframe.py#L59" + }, + "streamlit.components.v1.iframe": { + "name": "iframe", + "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False)", + "description": "

Load a remote URL in an iframe.

\n", + "args": [ + { + "name": "src", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The URL of the page to embed.

\n", + "default": null + }, + { + "name": "width", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The width of the frame in CSS pixels. Defaults to the app's\ndefault element width.

\n", + "default": "the" + }, + { + "name": "height", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The height of the frame in CSS pixels. Defaults to 150.

\n", + "default": "150" + }, + { + "name": "scrolling", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

If True, show a scrollbar when the content is larger than the iframe.\nOtherwise, do not show a scrollbar. Defaults to False.

\n", + "default": "False" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/iframe.py#L25" + }, + "DeltaGenerator.add_rows": { + "name": "add_rows", + "signature": "element.add_rows(data=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart({\n    'mark': 'line',\n    'encoding': {'x': 'a', 'y': 'b'},\n    'datasets': {\n      'some_fancy_name': df1,  # <-- named dataset\n     },\n    'data': {'name': 'some_fancy_name'},\n}),\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n
\n", + "description": "

Concatenate a dataframe to the bottom of the current one.

\n", + "args": [ + { + "name": "data", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Table to concat. Optional.

\n", + "default": null + }, + { + "name": "**kwargs", + "type_name": "pandas.DataFrame, numpy.ndarray, Iterable, dict, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The named dataset to concat. Optional. You can only pass in 1\ndataset (including the one in the data parameter).

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L285" + }, + "StatusContainer.update": { + "name": "update", + "signature": "StatusContainer.update(*, label=None, expanded=None, state=None)", + "description": "

Update the status container.

\n

Only specified arguments are updated. Container contents and unspecified\narguments remain unchanged.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A new label of the status container. If None, the label is not\nchanged.

\n", + "default": null + }, + { + "name": "expanded", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The new expanded state of the status container. If None,\nthe expanded state is not changed.

\n", + "default": null + }, + { + "name": "state", + "type_name": "\"running\", \"complete\", \"error\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The new state of the status container. This mainly changes the\nicon. If None, the state is not changed.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + }, + "streamlit.testing.v1.AppTest": { + "name": "AppTest", + "signature": "st.testing.v1.AppTest(script_path, *, default_timeout)", + "is_class": true, + "methods": [ + { + "name": "get", + "signature": "st.testing.v1.get.get(element_type)", + "description": "

Get elements or widgets of the specified type.

", + "args": [ + { + "name": "element_type", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

An element attribute of AppTest. For example, "button",\n"caption", or "chat_input".

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "Sequence of Elements", + "is_generator": false, + "description": "

Sequence of elements of the given type. Individual elements can\nbe accessed from a Sequence by index (order on the page). When\ngetting and element_type that is a widget, individual widgets\ncan be accessed by key. For example, at.get("text")[0] for the\nfirst st.text element or at.get("slider")(key="my_key") for\nthe st.slider widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L908" + }, + { + "name": "run", + "signature": "st.testing.v1.run.run(*, timeout=None)", + "description": "

Run the script from the current state.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to run the script. None means\nuse the default timeout set for the instance of AppTest.

\n", + "default": "timeout" + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

self

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L324" + } + ], + "properties": [ + { + "name": "button", + "signature": "st.testing.v1.button.button", + "description": "

Sequence of all st.button and st.form_submit_button widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Button", + "is_generator": false, + "description": "

Sequence of all st.button and st.form_submit_button\nwidgets. Individual widgets can be accessed from a WidgetList by\nindex (order on the page) or key. For example, at.button[0] for\nthe first widget or at.button(key="my_key") for a widget with a\ngiven key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L371" + }, + { + "name": "caption", + "signature": "st.testing.v1.caption.caption", + "description": "

Sequence of all st.caption elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Caption", + "is_generator": false, + "description": "

Sequence of all st.caption elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.caption[0] for the first element. Caption is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L386" + }, + { + "name": "chat_input", + "signature": "st.testing.v1.chat_input.chat_input", + "description": "

Sequence of all st.chat_input widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ChatInput", + "is_generator": false, + "description": "

Sequence of all st.chat_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.chat_input[0] for the first widget or\nat.chat_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L400" + }, + { + "name": "chat_message", + "signature": "st.testing.v1.chat_message.chat_message", + "description": "

Sequence of all st.chat_message elements.

", + "args": [], + "returns": [ + { + "type_name": "Sequence of ChatMessage", + "is_generator": false, + "description": "

Sequence of all st.chat_message elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.chat_message[0] for the first element. ChatMessage\nis an extension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L414" + }, + { + "name": "checkbox", + "signature": "st.testing.v1.checkbox.checkbox", + "description": "

Sequence of all st.checkbox widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Checkbox", + "is_generator": false, + "description": "

Sequence of all st.checkbox widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.checkbox[0] for the first widget or\nat.checkbox(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L428" + }, + { + "name": "code", + "signature": "st.testing.v1.code.code", + "description": "

Sequence of all st.code elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Code", + "is_generator": false, + "description": "

Sequence of all st.code elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.code[0] for the first element. Code is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L442" + }, + { + "name": "color_picker", + "signature": "st.testing.v1.color_picker.color_picker", + "description": "

Sequence of all st.color_picker widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ColorPicker", + "is_generator": false, + "description": "

Sequence of all st.color_picker widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.color_picker[0] for the first widget or\nat.color_picker(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L456" + }, + { + "name": "columns", + "signature": "st.testing.v1.columns.columns", + "description": "

Sequence of all columns within st.columns elements.

", + "args": [], + "returns": [ + { + "type_name": "Sequence of Column", + "is_generator": false, + "description": "

Sequence of all columns within st.columns elements. Individual\ncolumns can be accessed from an ElementList by index (order on the\npage). For example, at.columns[0] for the first column. Column\nis an extension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L470" + }, + { + "name": "dataframe", + "signature": "st.testing.v1.dataframe.dataframe", + "description": "

Sequence of all st.dataframe elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Dataframe", + "is_generator": false, + "description": "

Sequence of all st.dataframe elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.dataframe[0] for the first element. Dataframe is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L487" + }, + { + "name": "date_input", + "signature": "st.testing.v1.date_input.date_input", + "description": "

Sequence of all st.date_input widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of DateInput", + "is_generator": false, + "description": "

Sequence of all st.date_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.date_input[0] for the first widget or\nat.date_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L501" + }, + { + "name": "divider", + "signature": "st.testing.v1.divider.divider", + "description": "

Sequence of all st.divider elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Divider", + "is_generator": false, + "description": "

Sequence of all st.divider elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.divider[0] for the first element. Divider is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L515" + }, + { + "name": "error", + "signature": "st.testing.v1.error.error", + "description": "

Sequence of all st.error elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Error", + "is_generator": false, + "description": "

Sequence of all st.error elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.error[0] for the first element. Error is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L529" + }, + { + "name": "exception", + "signature": "st.testing.v1.exception.exception", + "description": "

Sequence of all st.exception elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Exception", + "is_generator": false, + "description": "

Sequence of all st.exception elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.exception[0] for the first element. Exception is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L543" + }, + { + "name": "header", + "signature": "st.testing.v1.header.header", + "description": "

Sequence of all st.header elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Header", + "is_generator": false, + "description": "

Sequence of all st.header elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.header[0] for the first element. Header is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L557" + }, + { + "name": "info", + "signature": "st.testing.v1.info.info", + "description": "

Sequence of all st.info elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Info", + "is_generator": false, + "description": "

Sequence of all st.info elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.info[0] for the first element. Info is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L571" + }, + { + "name": "json", + "signature": "st.testing.v1.json.json", + "description": "

Sequence of all st.json elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Json", + "is_generator": false, + "description": "

Sequence of all st.json elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.json[0] for the first element. Json is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L585" + }, + { + "name": "latex", + "signature": "st.testing.v1.latex.latex", + "description": "

Sequence of all st.latex elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Latex", + "is_generator": false, + "description": "

Sequence of all st.latex elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.latex[0] for the first element. Latex is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L599" + }, + { + "name": "main", + "signature": "st.testing.v1.main.main", + "description": "

Sequence of elements within the main body of the app.

", + "args": [], + "returns": [ + { + "type_name": "Block", + "is_generator": false, + "description": "

A container of elements. Block can be queried for elements in the\nsame manner as AppTest. For example, Block.checkbox will\nreturn all st.checkbox within the associated container.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L345" + }, + { + "name": "markdown", + "signature": "st.testing.v1.markdown.markdown", + "description": "

Sequence of all st.markdown elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Markdown", + "is_generator": false, + "description": "

Sequence of all st.markdown elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.markdown[0] for the first element. Markdown is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L613" + }, + { + "name": "metric", + "signature": "st.testing.v1.metric.metric", + "description": "

Sequence of all st.metric elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Metric", + "is_generator": false, + "description": "

Sequence of all st.metric elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.metric[0] for the first element. Metric is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L627" + }, + { + "name": "multiselect", + "signature": "st.testing.v1.multiselect.multiselect", + "description": "

Sequence of all st.multiselect widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Multiselect", + "is_generator": false, + "description": "

Sequence of all st.multiselect widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.multiselect[0] for the first widget or\nat.multiselect(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L641" + }, + { + "name": "number_input", + "signature": "st.testing.v1.number_input.number_input", + "description": "

Sequence of all st.number_input widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of NumberInput", + "is_generator": false, + "description": "

Sequence of all st.number_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.number_input[0] for the first widget or\nat.number_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L655" + }, + { + "name": "radio", + "signature": "st.testing.v1.radio.radio", + "description": "

Sequence of all st.radio widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Radio", + "is_generator": false, + "description": "

Sequence of all st.radio widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.radio[0] for the first widget or\nat.radio(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L669" + }, + { + "name": "select_slider", + "signature": "st.testing.v1.select_slider.select_slider", + "description": "

Sequence of all st.select_slider widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of SelectSlider", + "is_generator": false, + "description": "

Sequence of all st.select_slider widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.select_slider[0] for the first widget or\nat.select_slider(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L683" + }, + { + "name": "selectbox", + "signature": "st.testing.v1.selectbox.selectbox", + "description": "

Sequence of all st.selectbox widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Selectbox", + "is_generator": false, + "description": "

Sequence of all st.selectbox widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.selectbox[0] for the first widget or\nat.selectbox(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L697" + }, + { + "name": "sidebar", + "signature": "st.testing.v1.sidebar.sidebar", + "description": "

Sequence of all elements within st.sidebar.

", + "args": [], + "returns": [ + { + "type_name": "Block", + "is_generator": false, + "description": "

A container of elements. Block can be queried for elements in the\nsame manner as AppTest. For example, Block.checkbox will\nreturn all st.checkbox within the associated container.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L358" + }, + { + "name": "slider", + "signature": "st.testing.v1.slider.slider", + "description": "

Sequence of all st.slider widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Slider", + "is_generator": false, + "description": "

Sequence of all st.slider widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.slider[0] for the first widget or\nat.slider(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L711" + }, + { + "name": "subheader", + "signature": "st.testing.v1.subheader.subheader", + "description": "

Sequence of all st.subheader elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Subheader", + "is_generator": false, + "description": "

Sequence of all st.subheader elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.subheader[0] for the first element. Subheader is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L725" + }, + { + "name": "success", + "signature": "st.testing.v1.success.success", + "description": "

Sequence of all st.success elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Success", + "is_generator": false, + "description": "

Sequence of all st.success elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.success[0] for the first element. Success is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L739" + }, + { + "name": "table", + "signature": "st.testing.v1.table.table", + "description": "

Sequence of all st.table elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Table", + "is_generator": false, + "description": "

Sequence of all st.table elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.table[0] for the first element. Table is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L753" + }, + { + "name": "tabs", + "signature": "st.testing.v1.tabs.tabs", + "description": "

Sequence of all tabs within st.tabs elements.

", + "args": [], + "returns": [ + { + "type_name": "Sequence of Tab", + "is_generator": false, + "description": "

Sequence of all tabs within st.tabs elements. Individual\ntabs can be accessed from an ElementList by index (order on the\npage). For example, at.tabs[0] for the first tab. Tab is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L767" + }, + { + "name": "text", + "signature": "st.testing.v1.text.text", + "description": "

Sequence of all st.text elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Text", + "is_generator": false, + "description": "

Sequence of all st.text elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.text[0] for the first element. Text is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L787" + }, + { + "name": "text_area", + "signature": "st.testing.v1.text_area.text_area", + "description": "

Sequence of all st.text_area widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TextArea", + "is_generator": false, + "description": "

Sequence of all st.text_area widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.text_area[0] for the first widget or\nat.text_area(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L801" + }, + { + "name": "text_input", + "signature": "st.testing.v1.text_input.text_input", + "description": "

Sequence of all st.text_input widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TextInput", + "is_generator": false, + "description": "

Sequence of all st.text_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.text_input[0] for the first widget or\nat.text_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L815" + }, + { + "name": "time_input", + "signature": "st.testing.v1.time_input.time_input", + "description": "

Sequence of all st.time_input widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of TimeInput", + "is_generator": false, + "description": "

Sequence of all st.time_input widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.time_input[0] for the first widget or\nat.time_input(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L829" + }, + { + "name": "title", + "signature": "st.testing.v1.title.title", + "description": "

Sequence of all st.title elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Title", + "is_generator": false, + "description": "

Sequence of all st.title elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.title[0] for the first element. Title is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L843" + }, + { + "name": "toast", + "signature": "st.testing.v1.toast.toast", + "description": "

Sequence of all st.toast elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Toast", + "is_generator": false, + "description": "

Sequence of all st.toast elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.toast[0] for the first element. Toast is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L857" + }, + { + "name": "toggle", + "signature": "st.testing.v1.toggle.toggle", + "description": "

Sequence of all st.toggle widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Toggle", + "is_generator": false, + "description": "

Sequence of all st.toggle widgets. Individual widgets can\nbe accessed from a WidgetList by index (order on the page) or key.\nFor example, at.toggle[0] for the first widget or\nat.toggle(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L871" + }, + { + "name": "warning", + "signature": "st.testing.v1.warning.warning", + "description": "

Sequence of all st.warning elements.

", + "args": [], + "returns": [ + { + "type_name": "ElementList of Warning", + "is_generator": false, + "description": "

Sequence of all st.warning elements. Individual elements can be\naccessed from an ElementList by index (order on the page). For\nexample, at.warning[0] for the first element. Warning is an\nextension of the Element class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L885" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L92", + "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue.

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", + "args": [ + { + "name": "secrets", + "type_name": "dict[str, Any]", + "is_optional": false, + "description": "

Dictionary of secrets to be used the simulated app. Use dict-like\nsyntax to set secret values for the simulated app.

\n", + "default": null + }, + { + "name": "session_state", + "type_name": "SafeSessionState", + "is_optional": false, + "description": "

Session State for the simulated app. SafeSessionState object supports\nread and write operations as usual for Streamlit apps.

\n", + "default": null + }, + { + "name": "query_params", + "type_name": "dict[str, Any]", + "is_optional": false, + "description": "

Dictionary of query parameters to be used by the simluated app. Use\ndict-like syntax to set query_params values for the simulated app.

\n", + "default": null + } + ], + "returns": [] + }, + "AppTest.button": { + "name": "button", + "signature": "AppTest.button", + "description": "

Sequence of all st.button and st.form_submit_button widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of Button", + "is_generator": false, + "description": "

Sequence of all st.button and st.form_submit_button\nwidgets. Individual widgets can be accessed from a WidgetList by\nindex (order on the page) or key. For example, at.button[0] for\nthe first widget or at.button(key="my_key") for a widget with a\ngiven key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L371" }, "AppTest.caption": { "name": "caption", @@ -52360,7 +61177,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L386" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L386" }, "AppTest.chat_input": { "name": "chat_input", @@ -52375,7 +61192,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L400" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L400" }, "AppTest.chat_message": { "name": "chat_message", @@ -52390,7 +61207,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L414" }, "AppTest.checkbox": { "name": "checkbox", @@ -52405,7 +61222,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L428" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L428" }, "AppTest.code": { "name": "code", @@ -52420,7 +61237,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L442" }, "AppTest.color_picker": { "name": "color_picker", @@ -52435,7 +61252,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L456" }, "AppTest.columns": { "name": "columns", @@ -52450,7 +61267,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L470" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L470" }, "AppTest.dataframe": { "name": "dataframe", @@ -52465,7 +61282,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L487" }, "AppTest.date_input": { "name": "date_input", @@ -52480,7 +61297,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L501" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L501" }, "AppTest.divider": { "name": "divider", @@ -52495,7 +61312,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L515" }, "AppTest.error": { "name": "error", @@ -52510,7 +61327,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L529" }, "AppTest.exception": { "name": "exception", @@ -52525,7 +61342,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L543" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L543" }, "AppTest.from_file": { "name": "from_file", @@ -52536,6 +61353,7 @@ "name": "script_path", "type_name": "str", "is_optional": false, + "is_kwarg_only": false, "description": "

Path to a script file. The path should be absolute or relative to\nthe file calling .from_file.

\n", "default": null }, @@ -52543,6 +61361,7 @@ "name": "default_timeout", "type_name": "float", "is_optional": false, + "is_kwarg_only": true, "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", "default": "time" } @@ -52555,7 +61374,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L232" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L232" }, "AppTest.from_function": { "name": "from_function", @@ -52566,6 +61385,7 @@ "name": "script", "type_name": "Callable", "is_optional": false, + "is_kwarg_only": false, "description": "

A function whose body will be used as a script. Must be runnable\nin isolation, so it must include any necessary imports.

\n", "default": null }, @@ -52573,6 +61393,7 @@ "name": "default_timeout", "type_name": "float", "is_optional": false, + "is_kwarg_only": true, "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", "default": "time" } @@ -52585,7 +61406,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L194" }, "AppTest.from_string": { "name": "from_string", @@ -52596,6 +61417,7 @@ "name": "script", "type_name": "str", "is_optional": false, + "is_kwarg_only": false, "description": "

The string contents of the script to be run.

\n", "default": null }, @@ -52603,6 +61425,7 @@ "name": "default_timeout", "type_name": "float", "is_optional": false, + "is_kwarg_only": true, "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", "default": "time" } @@ -52615,7 +61438,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L159" }, "AppTest.get": { "name": "get", @@ -52626,6 +61449,7 @@ "name": "element_type", "type_name": "str", "is_optional": false, + "is_kwarg_only": false, "description": "

An element attribute of AppTest. For example, "button",\n"caption", or "chat_input".

\n", "default": null } @@ -52638,7 +61462,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L908" }, "AppTest.header": { "name": "header", @@ -52653,7 +61477,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L557" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L557" }, "AppTest.info": { "name": "info", @@ -52668,7 +61492,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L571" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L571" }, "AppTest.json": { "name": "json", @@ -52683,7 +61507,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L585" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L585" }, "AppTest.latex": { "name": "latex", @@ -52698,7 +61522,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L599" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L599" }, "AppTest.main": { "name": "main", @@ -52713,7 +61537,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L345" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L345" }, "AppTest.markdown": { "name": "markdown", @@ -52728,7 +61552,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L613" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L613" }, "AppTest.metric": { "name": "metric", @@ -52743,7 +61567,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L627" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L627" }, "AppTest.multiselect": { "name": "multiselect", @@ -52758,7 +61582,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L641" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L641" }, "AppTest.number_input": { "name": "number_input", @@ -52773,7 +61597,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L655" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L655" }, "AppTest.radio": { "name": "radio", @@ -52788,7 +61612,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L669" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L669" }, "AppTest.run": { "name": "run", @@ -52799,6 +61623,7 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the default timeout set for the instance of AppTest.

\n", "default": "timeout" } @@ -52811,7 +61636,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L324" }, "AppTest.select_slider": { "name": "select_slider", @@ -52826,7 +61651,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L683" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L683" }, "AppTest.selectbox": { "name": "selectbox", @@ -52841,7 +61666,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L697" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L697" }, "AppTest.sidebar": { "name": "sidebar", @@ -52856,7 +61681,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L358" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L358" }, "AppTest.slider": { "name": "slider", @@ -52871,7 +61696,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L711" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L711" }, "AppTest.subheader": { "name": "subheader", @@ -52886,7 +61711,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L725" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L725" }, "AppTest.success": { "name": "success", @@ -52901,7 +61726,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L739" }, "AppTest.table": { "name": "table", @@ -52916,7 +61741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L753" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L753" }, "AppTest.tabs": { "name": "tabs", @@ -52931,7 +61756,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L767" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L767" }, "AppTest.text": { "name": "text", @@ -52946,7 +61771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L787" }, "AppTest.text_area": { "name": "text_area", @@ -52961,7 +61786,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L801" }, "AppTest.text_input": { "name": "text_input", @@ -52976,7 +61801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L815" }, "AppTest.time_input": { "name": "time_input", @@ -52991,7 +61816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L829" }, "AppTest.title": { "name": "title", @@ -53006,7 +61831,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L843" }, "AppTest.toast": { "name": "toast", @@ -53021,7 +61846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L857" }, "AppTest.toggle": { "name": "toggle", @@ -53036,7 +61861,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L871" }, "AppTest.warning": { "name": "warning", @@ -53051,7 +61876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L885" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -53064,7 +61889,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L342" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L342" }, { "name": "run", @@ -53075,12 +61900,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53088,7 +61914,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L337" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L337" } ], "properties": [ @@ -53098,10 +61924,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L327" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L327" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L304", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L304", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -53120,12 +61946,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53133,7 +61960,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L359" } ], "properties": [ @@ -53143,10 +61970,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L372" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L347", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L347", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -53162,7 +61989,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L420" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L420" }, { "name": "run", @@ -53173,12 +62000,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53186,7 +62014,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L415" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L415" }, { "name": "uncheck", @@ -53194,7 +62022,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L424" } ], "properties": [ @@ -53204,10 +62032,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L405" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L405" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L383", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L383", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -53223,7 +62051,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L492" }, { "name": "run", @@ -53234,12 +62062,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53247,7 +62076,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L487" } ], "properties": [ @@ -53257,10 +62086,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L466" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L466" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L451", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L451", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -53279,12 +62108,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53292,7 +62122,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L538" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L538" } ], "properties": [ @@ -53302,10 +62132,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L552" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L552" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L518", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L518", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -53324,12 +62154,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -53339,10 +62170,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L102", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -53361,12 +62192,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -53374,7 +62206,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L754" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L754" }, { "name": "set_value", @@ -53382,7 +62214,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L743" }, { "name": "unselect", @@ -53390,7 +62222,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L769" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L769" } ], "properties": [ @@ -53400,7 +62232,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "value", @@ -53408,10 +62240,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L728" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L728" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L699", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L699", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -53427,7 +62259,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L842" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L842" }, { "name": "increment", @@ -53435,7 +62267,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L834" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L834" }, { "name": "run", @@ -53446,12 +62278,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53459,7 +62292,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L809" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L809" } ], "properties": [ @@ -53469,10 +62302,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L822" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L822" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L789", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L789", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -53491,12 +62324,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53504,7 +62338,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L887" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L887" } ], "properties": [ @@ -53514,7 +62348,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L870" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L870" }, { "name": "value", @@ -53522,10 +62356,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L877" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L877" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L851", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L851", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -53544,12 +62378,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -53557,7 +62392,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1029" }, { "name": "set_value", @@ -53565,7 +62400,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L994" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L994" } ], "properties": [ @@ -53575,10 +62410,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1018" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1018" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L976", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L976", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -53597,12 +62432,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -53610,7 +62446,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L953" }, { "name": "select_index", @@ -53618,7 +62454,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L957" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L957" }, { "name": "set_value", @@ -53626,7 +62462,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L943" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L943" } ], "properties": [ @@ -53636,7 +62472,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L923" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L923" }, { "name": "value", @@ -53644,10 +62480,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L933" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L905", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L905", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -53666,12 +62502,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -53679,7 +62516,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1082" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1082" }, { "name": "set_value", @@ -53687,7 +62524,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1053" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1053" } ], "properties": [ @@ -53697,10 +62534,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1071" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1071" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1034", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1034", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -53716,7 +62553,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1163" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1163" }, { "name": "run", @@ -53727,12 +62564,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53740,7 +62578,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1139" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1139" } ], "properties": [ @@ -53750,10 +62588,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1152" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1121", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1121", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -53769,7 +62607,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1216" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1216" }, { "name": "run", @@ -53780,12 +62618,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53793,7 +62632,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1192" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1192" } ], "properties": [ @@ -53803,10 +62642,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1205" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1205" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1174", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1174", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -53822,7 +62661,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1281" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1281" }, { "name": "increment", @@ -53830,7 +62669,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1274" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1274" }, { "name": "run", @@ -53841,12 +62680,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53854,7 +62694,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], "properties": [ @@ -53864,10 +62704,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1262" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1262" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1230", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1230", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -53886,12 +62726,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53899,7 +62740,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1338" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1338" } ], "properties": [ @@ -53909,10 +62750,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1328" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1328" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L1305", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1305", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -53931,12 +62772,13 @@ "name": "timeout", "type_name": null, "is_optional": null, + "is_kwarg_only": true, "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -53944,7 +62786,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -53954,16 +62796,16 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] }, "streamlit.experimental_user.to_dict": { - "name": "to_dict", + "name": "experimental_user.to_dict", "signature": "st.experimental_user.to_dict()", "description": "

Get user info as a dictionary.

\n

This method primarily exists for internal use and is not needed for\nmost cases. st.experimental_user returns an object that inherits from\ndict by default.

\n", "args": [], @@ -53975,7 +62817,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L82" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -53995,11 +62837,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L82" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.30.0/lib/streamlit/user_info.py#L30", + "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L32", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -54013,7 +62855,7 @@ "returns": [] } }, - "1.31.0": { + "1.32.0": { "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, use_container_width=False, theme=\"streamlit\")", @@ -54046,7 +62888,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L745" }, "streamlit.area_chart": { "name": "area_chart", @@ -54112,7 +62954,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L252" }, "streamlit.audio": { "name": "audio", @@ -54154,7 +62996,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/media.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/media.py#L50" }, "streamlit.balloons": { "name": "balloons", @@ -54163,7 +63005,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/balloons.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -54229,7 +63071,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L411" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -54255,7 +63097,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -54344,7 +63186,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L68" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L68" }, "streamlit.cache": { "name": "cache", @@ -54418,7 +63260,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/legacy_caching/caching.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/legacy_caching/caching.py#L480" }, "streamlit.cache_data": { "name": "cache_data", @@ -54484,7 +63326,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -54550,7 +63392,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.camera_input": { "name": "camera_input", @@ -54631,7 +63473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/camera_input.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/camera_input.py#L82" }, "streamlit.caption": { "name": "caption", @@ -54665,7 +63507,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L148" }, "streamlit.chat_input": { "name": "chat_input", @@ -54738,7 +63580,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/chat.py#L211" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/chat.py#L210" }, "streamlit.chat_message": { "name": "chat_message", @@ -54771,7 +63613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/chat.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/chat.py#L116" }, "streamlit.checkbox": { "name": "checkbox", @@ -54860,7 +63702,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/checkbox.py#L53" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/checkbox.py#L55" }, "streamlit.code": { "name": "code", @@ -54894,7 +63736,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/code.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -54983,13 +63825,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/color_picker.py#L53" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/color_picker.py#L55" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\")", - "examples": "
\n

You can use with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", - "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", "args": [ { "name": "spec", @@ -55016,7 +63858,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L144" }, "streamlit.connection": { "name": "connection", @@ -55073,13 +63915,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/connection_factory.py#L206" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.container": { "name": "container", "signature": "st.container(*, height=None, border=None)", "examples": "
\n

Inserting elements using "with" notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n\n \n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n\n \n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n\n \n
\n", - "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", + "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ { "name": "height", @@ -55099,13 +63941,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L33" }, "streamlit.data_editor": { "name": "data_editor", "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", - "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state."

\n
\n", + "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", "args": [ { "name": "data", @@ -55220,7 +64062,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/data_editor.py#L569" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/data_editor.py#L578" }, "streamlit.dataframe": { "name": "dataframe", @@ -55286,11 +64128,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L56" }, "streamlit.date_input": { "name": "date_input", - "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", + "signature": "st.date_input(label, value=\"default_value_today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write('Your birthday is:', d)\n
\n\n \n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n\n \n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write('Your birthday is:', d)\n
\n\n \n
\n", "description": "

Display a date input widget.

\n", "args": [ @@ -55399,7 +64241,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/time_widgets.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/time_widgets.py#L512" }, "streamlit.divider": { "name": "divider", @@ -55408,12 +64250,12 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L260" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode('utf-8')\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name='large_df.csv',\n    mime='text/csv',\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button('Download some text', text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b'example content'\n# Defaults to 'application/octet-stream'\nst.download_button('Download binary file', binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", + "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode('utf-8')\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name='large_df.csv',\n    mime='text/csv',\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button('Download some text', text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b'example content'\n# Defaults to 'application/octet-stream'\nst.download_button('Download binary file', binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n", "args": [ { @@ -55521,7 +64363,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L177" }, "streamlit.echo": { "name": "echo", @@ -55539,7 +64381,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/echo.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -55548,7 +64390,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse "with" notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/empty.py#L24" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/empty.py#L26" }, "streamlit.error": { "name": "error", @@ -55574,7 +64416,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -55592,13 +64434,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/exception.py#L50" }, "streamlit.expander": { "name": "expander", "signature": "st.expander(label, expanded=False)", - "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write(\\"\\"\\"\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    \\"\\"\\")\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write(\\"\\"\\"\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n\\"\\"\\")\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", - "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write(\\"\\"\\"\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    \\"\\"\\")\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write(\\"\\"\\"\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n\\"\\"\\")\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", + "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", "args": [ { "name": "label", @@ -55618,7 +64460,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L383" }, "streamlit.experimental_connection": { "name": "experimental_connection", @@ -55675,13 +64517,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/connection_factory.py#L206" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.experimental_data_editor": { "name": "experimental_data_editor", "signature": "st.experimental_data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", - "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state."

\n
\n", + "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", "args": [ { "name": "data", @@ -55796,7 +64638,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/data_editor.py#L569" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/data_editor.py#L578" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -55812,7 +64654,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/experimental_query_params.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_memo": { "name": "experimental_memo", @@ -55878,7 +64720,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.experimental_rerun": { "name": "experimental_rerun", @@ -55886,7 +64728,7 @@ "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L82" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -55904,7 +64746,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/experimental_query_params.py#L68" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.experimental_singleton": { "name": "experimental_singleton", @@ -55970,7 +64812,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -56067,7 +64909,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/file_uploader.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", @@ -56101,7 +64943,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/form.py#L113" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -56181,7 +65023,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/form.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/form.py#L224" }, "streamlit.get_option": { "name": "get_option", @@ -56198,7 +65040,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/config.py#L131" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/config.py#L130" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -56224,7 +65066,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/graphviz_chart.py#L39" }, "streamlit.header": { "name": "header", @@ -56266,7 +65108,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", @@ -56284,7 +65126,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/doc_string.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.image": { "name": "image", @@ -56350,7 +65192,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/image.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -56376,7 +65218,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L91" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L93" }, "streamlit.json": { "name": "json", @@ -56402,7 +65244,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/json.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/json.py#L37" }, "streamlit.latex": { "name": "latex", @@ -56428,7 +65270,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L210" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L212" }, "streamlit.line_chart": { "name": "line_chart", @@ -56494,7 +65336,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L94" }, "streamlit.link_button": { "name": "link_button", @@ -56552,7 +65394,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L347" }, "streamlit.map": { "name": "map", @@ -56618,7 +65460,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/map.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/map.py#L84" }, "streamlit.markdown": { "name": "markdown", @@ -56652,7 +65494,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/markdown.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -56710,7 +65552,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/metric.py#L46" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/metric.py#L48" }, "streamlit.multiselect": { "name": "multiselect", @@ -56831,7 +65673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/multiselect.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/multiselect.py#L139" }, "streamlit.number_input": { "name": "number_input", @@ -56960,12 +65802,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/number_input.py#L108" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/number_input.py#L113" }, "streamlit.page_link": { "name": "page_link", "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py.py\n\u2502   \u2514\u2500\u2500 page_2.py.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ { @@ -57018,7 +65860,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/button.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L430" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -57068,7 +65910,49 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/plotly_chart.py#L81" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/plotly_chart.py#L74" + }, + "streamlit.popover": { + "name": "popover", + "signature": "st.popover(label, *, help=None, disabled=False, use_container_width=False)", + "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n\n \n
\n", + "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label of the button that opens the popover container.\nThe label can optionally contain Markdown and supports the\nfollowing elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • \n
    Emoji shortcodes, such as :+1: and :sunglasses:.
    \n
    For a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
    \n
    \n
  • \n
  • \n
    LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
    \n
    must be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
    \n
    \n
  • \n
  • \n
    Colored text, using the syntax :color[text to be colored],
    \n
    where color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
    \n
    \n
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when the popover button is\nhovered over.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the popover button if set to\nTrue. The default is False.

\n", + "default": "False" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which makes the popover button stretch its width\nto match the parent container. This only affects the button and not\nthe width of the popover container.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L478" }, "streamlit.progress": { "name": "progress", @@ -57094,7 +65978,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/progress.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -57120,7 +66004,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", @@ -57163,7 +66047,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/pyplot.py#L38" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/pyplot.py#L35" }, "streamlit.radio": { "name": "radio", @@ -57284,7 +66168,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/radio.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/radio.py#L83" }, "streamlit.rerun": { "name": "rerun", @@ -57292,7 +66176,7 @@ "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L58" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -57366,7 +66250,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_altair.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L572" }, "streamlit.select_slider": { "name": "select_slider", @@ -57471,7 +66355,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/select_slider.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/select_slider.py#L101" }, "streamlit.selectbox": { "name": "selectbox", @@ -57584,7 +66468,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/selectbox.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/selectbox.py#L76" }, "streamlit.set_option": { "name": "set_option", @@ -57609,7 +66493,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/config.py#L92" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -57659,7 +66543,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/page_config.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/page_config.py#L116" }, "streamlit.slider": { "name": "slider", @@ -57780,7 +66664,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/slider.py#L173" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/slider.py#L165" }, "streamlit.snow": { "name": "snow", @@ -57789,7 +66673,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/snow.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -57807,12 +66691,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/spinner.py#L23" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", "signature": "st.status(label, *, expanded=False, state=\"running\")", - "examples": "
\n

You can use with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button('Rerun')\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button('Rerun')\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button('Rerun')\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button('Rerun')\n
\n\n \n
\n", "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse "with" notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\n"with" notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", "args": [ { @@ -57848,7 +66732,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L477" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L591" }, "streamlit.stop": { "name": "stop", @@ -57857,7 +66741,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L32" }, "streamlit.subheader": { "name": "subheader", @@ -57899,7 +66783,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L111" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L113" }, "streamlit.success": { "name": "success", @@ -57925,12 +66809,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L126" }, "streamlit.switch_page": { "name": "switch_page", "signature": "st.switch_page(page)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py.py\n\u2502   \u2514\u2500\u2500 page_2.py.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n\n \n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n\n \n
\n", "description": "

Programmatically switch the current page in a multipage app.

\n

When st.switch_page is called, the current page execution stops and\nthe specified page runs as if the user clicked on it in the sidebar\nnavigation. The specified page must be recognized by Streamlit's multipage\narchitecture (your main Python file or a Python file in a pages/\nfolder). Arbitrary Python scripts cannot be passed to st.switch_page.

\n", "args": [ { @@ -57943,7 +66827,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/commands/execution_control.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L98" }, "streamlit.table": { "name": "table", @@ -57961,13 +66845,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L241" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs)", - "examples": "
\n

You can use with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", - "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", "args": [ { "name": "tabs", @@ -57986,7 +66870,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/layouts.py#L270" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L271" }, "streamlit.text": { "name": "text", @@ -58012,7 +66896,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/text.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -58125,7 +67009,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/text_widgets.py#L376" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/text_widgets.py#L376" }, "streamlit.text_input": { "name": "text_input", @@ -58246,7 +67130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/text_widgets.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/text_widgets.py#L114" }, "streamlit.time_input": { "name": "time_input", @@ -58343,7 +67227,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/time_widgets.py#L276" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/time_widgets.py#L295" }, "streamlit.title": { "name": "title", @@ -58377,12 +67261,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/heading.py#L181" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L183" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -58403,7 +67287,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/toast.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -58492,7 +67376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/widgets/checkbox.py#L156" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/checkbox.py#L158" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -58542,17 +67426,17 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow_vega_lite.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_vega_lite.py#L36" }, "streamlit.video": { "name": "video", - "signature": "st.video(data, format=\"video/mp4\", start_time=0)", - "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", + "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None)", + "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n\n \n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", "description": "

Display a video player.

\n", "args": [ { "name": "data", - "type_name": "str, bytes, BytesIO, numpy.ndarray, or file", + "type_name": "str, bytes, io.BytesIO, numpy.ndarray, or file", "is_optional": false, "is_kwarg_only": false, "description": "

Raw video data, filename, or URL pointing to a video to load.\nIncludes support for YouTube URLs.\nNumpy arrays and raw data formats must include all necessary file\nheaders to match specified file format.

\n", @@ -58563,7 +67447,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The mime type for the video file. Defaults to 'video/mp4'.\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "description": "

The mime type for the video file. Defaults to "video/mp4".\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", "default": "s" }, { @@ -58573,10 +67457,18 @@ "is_kwarg_only": false, "description": "

The time from which this element should start playing.

\n", "default": null + }, + { + "name": "subtitles", + "type_name": "str, bytes, Path, io.BytesIO, or dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Optional subtitle data for the video, supporting several input types:

\n
    \n
  • None (default): No subtitles.
  • \n
  • A string, bytes, or Path: File path to a subtitle file in .vtt or .srt formats, or\nthe raw content of subtitles conforming to these formats.\nIf providing raw content, the string must adhere to the WebVTT or SRT\nformat specifications.
  • \n
  • io.BytesIO: A BytesIO stream that contains valid .vtt or .srt\nformatted subtitle data.
  • \n
  • A dictionary: Pairs of labels and file paths or raw subtitle content in\n.vtt or .srt formats to enable multiple subtitle tracks.\nThe label will be shown in the video player. Example:\n{"English": "path/to/english.vtt", "French": "path/to/french.srt"}
  • \n
\n

When provided, subtitles are displayed by default. For multiple\ntracks, the first one is displayed by default. If you don't want any\nsubtitles displayed by default, use an empty string for the value\nin a dictrionary's first pair: {"None": "", "English": "path/to/english.vtt"}

\n

Not supported for YouTube videos.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/media.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/media.py#L126" }, "streamlit.warning": { "name": "warning", @@ -58602,7 +67494,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/alert.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L61" }, "streamlit.write": { "name": "write", @@ -58615,7 +67507,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(data_frame) : Displays the DataFrame as a table.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(dict) : Displays dict in an interactive widget.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", + "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(data_frame) : Displays the DataFrame as a table.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(dict) : Displays dict in an interactive widget.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", "default": null }, { @@ -58625,22 +67517,35 @@ "is_kwarg_only": true, "description": "

This is a keyword-only argument that defaults to False.

\n

By default, any HTML tags found in strings will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write secure\nHTML, so by using this argument you may be compromising your users'\nsecurity. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", "default": "False" + }, + { + "name": "**kwargs", + "type_name": "any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Keyword arguments. Not used.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

**kwargs is deprecated and will be removed in a later version.\nUse other, more specific Streamlit commands to pass additional\nkeyword arguments.

\n" + } } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/write.py#L212" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/write.py#L221" }, "streamlit.write_stream": { "name": "write_stream", "signature": "st.write_stream(stream)", - "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split():\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split():\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n\n \n
\n", + "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n\n \n
\n", "description": "

Stream a generator, iterable, or stream-like sequence to the app.

\n

st.write_stream iterates through the given sequences and writes all\nchunks to the app. String chunks will be written using a typewriter effect.\nOther data types will be written using st.write.

\n", "args": [ { "name": "stream", "type_name": "Callable, Generator, Iterable, OpenAI Stream, or LangChain Stream", "is_optional": false, - "description": "

The generator or iterable to stream.

\n", + "is_kwarg_only": false, + "description": "

The generator or iterable to stream.

\n
\n

Note

\n

To use additional LLM libraries, you can create a wrapper to\nmanually define a generator function and include custom output\nparsing.

\n
\n", "default": null } ], @@ -58652,7 +67557,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/write.py#L55" }, "streamlit.experimental_memo.clear": { "name": "experimental_memo.clear", @@ -58660,7 +67565,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -58668,7 +67573,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" }, "streamlit.experimental_singleton.clear": { "name": "experimental_singleton.clear", @@ -58676,7 +67581,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -58684,7 +67589,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/caching/cache_resource_api.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" }, "streamlit.query_params.clear": { "name": "clear", @@ -58699,7 +67604,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L99" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -58723,7 +67628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L76" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -58738,7 +67643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/runtime/state/query_params_proxy.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L111" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -58752,11 +67657,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L25", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -58773,11 +67678,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L25", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -58793,7 +67698,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L248" }, { "name": "query", @@ -58866,7 +67771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L122" }, { "name": "reset", @@ -58875,7 +67780,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -58885,7 +67790,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L267" }, { "name": "engine", @@ -58893,7 +67798,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L259" }, { "name": "session", @@ -58902,10 +67807,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L273" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L47", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine. Initialize using st.connection("<name>", type="sql").

\n

SQLConnection provides the query() convenience method, which can be used to\nrun simple read-only queries with both caching and simple error handling/retries.\nMore complex DB interactions can be performed by using the .session property\nto receive a regular SQLAlchemy Session.

\n

SQLConnections should always be created using st.connection(), not\ninitialized directly. Connection parameters for a SQLConnection can be specified\nusing either st.secrets or **kwargs. Some frequently used parameters include:

\n
    \n
  • url or arguments for sqlalchemy.engine.URL.create().\nMost commonly it includes a dialect, host, database, username and password.
  • \n
  • create_engine_kwargs can be passed via st.secrets, such as for\nsnowflake-sqlalchemy\nor Google BigQuery.\nThese can also be passed directly as **kwargs to connection().
  • \n
  • autocommit=True to run with isolation level AUTOCOMMIT. Default is False.
  • \n
\n", "args": [], @@ -58922,7 +67827,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L263" }, { "name": "query", @@ -58971,7 +67876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L120" }, { "name": "reset", @@ -58980,7 +67885,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -58988,7 +67893,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L280" }, { "name": "write_pandas", @@ -59003,7 +67908,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L225" } ], "properties": [ @@ -59013,10 +67918,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L271" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L41", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L41", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -59058,7 +67963,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L97" }, { "name": "reset", @@ -59067,7 +67972,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -59076,7 +67981,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L190" } ], "properties": [ @@ -59087,10 +67992,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L167" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L45", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L46", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -59101,7 +68006,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L248" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -59109,7 +68014,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L267" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -59117,7 +68022,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L259" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -59190,7 +68095,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L122" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -59199,7 +68104,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -59208,7 +68113,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/sql_connection.py#L273" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L275" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -59241,7 +68146,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L97" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -59250,7 +68155,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -59259,7 +68164,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L190" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -59268,7 +68173,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L167" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -59276,7 +68181,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L263" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -59325,7 +68230,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L120" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -59333,7 +68238,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L271" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -59342,7 +68247,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -59350,7 +68255,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L280" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -59365,7 +68270,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L225" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -59374,7 +68279,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/connections/base_connection.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -59424,7 +68329,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L778" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L777" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -59482,7 +68387,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L596" }, "streamlit.column_config.Column": { "name": "Column", @@ -59532,7 +68437,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L188" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -59622,7 +68527,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1309" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -59720,7 +68625,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1075" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1074" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -59754,7 +68659,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L939" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L938" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -59804,7 +68709,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L858" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L857" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -59881,12 +68786,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.streamlit\\.app"\nto extract the display text "foo" from the URL "https://foo.streamlit.app".
  • \n
\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", + "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L467" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L467" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -59920,7 +68825,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1010" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1009" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -60010,7 +68915,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L263" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -60068,7 +68973,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1423" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1422" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -60134,7 +69039,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L679" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L678" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -60208,7 +69113,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L373" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -60298,7 +69203,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/column_types.py#L1196" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1195" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -60338,7 +69243,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/components/v1/components.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/components/v1/components.py#L272" }, "streamlit.components.v1.html": { "name": "html", @@ -60379,7 +69284,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/iframe.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/iframe.py#L61" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -60420,7 +69325,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/iframe.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -60446,7 +69351,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/arrow.py#L285" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L286" }, "StatusContainer.update": { "name": "update", @@ -60479,11 +69384,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", - "signature": "st.testing.v1.AppTest(script_path, *, default_timeout)", + "signature": "st.testing.v1.AppTest(script_path, *, default_timeout, args=None, kwargs=None)", "is_class": true, "methods": [ { @@ -60508,7 +69413,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L962" }, { "name": "run", @@ -60532,7 +69437,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L350" } ], "properties": [ @@ -60549,7 +69454,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L397" }, { "name": "caption", @@ -60564,7 +69469,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L386" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L412" }, { "name": "chat_input", @@ -60579,7 +69484,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L400" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L426" }, { "name": "chat_message", @@ -60594,7 +69499,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L440" }, { "name": "checkbox", @@ -60609,7 +69514,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L428" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L454" }, { "name": "code", @@ -60624,7 +69529,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L468" }, { "name": "color_picker", @@ -60639,7 +69544,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L482" }, { "name": "columns", @@ -60654,7 +69559,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L470" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L496" }, { "name": "dataframe", @@ -60669,7 +69574,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L513" }, { "name": "date_input", @@ -60684,7 +69589,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L501" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L527" }, { "name": "divider", @@ -60699,7 +69604,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L541" }, { "name": "error", @@ -60714,7 +69619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L555" }, { "name": "exception", @@ -60729,7 +69634,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L543" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L569" + }, + { + "name": "expander", + "signature": "st.testing.v1.expander.expander", + "description": "

Sequence of all st.expander elements.

", + "args": [], + "returns": [ + { + "type_name": "Sequence of Expandable", + "is_generator": false, + "description": "

Sequence of all st.expander elements. Individual elements can be\naccessed from a Sequence by index (order on the page). For\nexample, at.expander[0] for the first element. Expandable is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L583" }, { "name": "header", @@ -60744,7 +69664,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L557" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L597" }, { "name": "info", @@ -60759,7 +69679,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L571" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L611" }, { "name": "json", @@ -60774,7 +69694,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L585" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L625" }, { "name": "latex", @@ -60789,7 +69709,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L599" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L639" }, { "name": "main", @@ -60804,7 +69724,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L345" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L371" }, { "name": "markdown", @@ -60819,7 +69739,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L613" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L653" }, { "name": "metric", @@ -60834,7 +69754,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L627" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L667" }, { "name": "multiselect", @@ -60849,7 +69769,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L641" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L681" }, { "name": "number_input", @@ -60864,7 +69784,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L655" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L695" }, { "name": "radio", @@ -60879,7 +69799,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L669" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L709" }, { "name": "select_slider", @@ -60894,7 +69814,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L683" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L723" }, { "name": "selectbox", @@ -60909,7 +69829,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L697" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L737" }, { "name": "sidebar", @@ -60924,7 +69844,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L358" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L384" }, { "name": "slider", @@ -60939,7 +69859,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L711" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L751" + }, + { + "name": "status", + "signature": "st.testing.v1.status.status", + "description": "

Sequence of all st.status elements.

", + "args": [], + "returns": [ + { + "type_name": "Sequence of Status", + "is_generator": false, + "description": "

Sequence of all st.status elements. Individual elements can be\naccessed from a Sequence by index (order on the page). For\nexample, at.status[0] for the first element. Status is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L793" }, { "name": "subheader", @@ -60954,7 +69889,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L725" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L765" }, { "name": "success", @@ -60969,7 +69904,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L779" }, { "name": "table", @@ -60984,7 +69919,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L753" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L807" }, { "name": "tabs", @@ -60999,7 +69934,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L767" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L821" }, { "name": "text", @@ -61014,7 +69949,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "text_area", @@ -61029,7 +69964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "text_input", @@ -61044,7 +69979,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "time_input", @@ -61059,7 +69994,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "title", @@ -61074,7 +70009,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L897" }, { "name": "toast", @@ -61089,7 +70024,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L911" }, { "name": "toggle", @@ -61104,7 +70039,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L925" }, { "name": "warning", @@ -61119,10 +70054,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L939" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L92", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L90", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue.

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -61162,7 +70097,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L397" }, "AppTest.caption": { "name": "caption", @@ -61177,7 +70112,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L386" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L412" }, "AppTest.chat_input": { "name": "chat_input", @@ -61192,7 +70127,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L400" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L426" }, "AppTest.chat_message": { "name": "chat_message", @@ -61207,7 +70142,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L440" }, "AppTest.checkbox": { "name": "checkbox", @@ -61222,7 +70157,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L428" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L454" }, "AppTest.code": { "name": "code", @@ -61237,7 +70172,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L468" }, "AppTest.color_picker": { "name": "color_picker", @@ -61252,7 +70187,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L482" }, "AppTest.columns": { "name": "columns", @@ -61267,7 +70202,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L470" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L496" }, "AppTest.dataframe": { "name": "dataframe", @@ -61282,7 +70217,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L513" }, "AppTest.date_input": { "name": "date_input", @@ -61297,7 +70232,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L501" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L527" }, "AppTest.divider": { "name": "divider", @@ -61312,7 +70247,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L541" }, "AppTest.error": { "name": "error", @@ -61327,7 +70262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L555" }, "AppTest.exception": { "name": "exception", @@ -61342,7 +70277,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L543" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L569" + }, + "AppTest.expander": { + "name": "expander", + "signature": "AppTest.expander", + "description": "

Sequence of all st.expander elements.

\n", + "args": [], + "returns": [ + { + "type_name": "Sequence of Expandable", + "is_generator": false, + "description": "

Sequence of all st.expander elements. Individual elements can be\naccessed from a Sequence by index (order on the page). For\nexample, at.expander[0] for the first element. Expandable is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L583" }, "AppTest.from_file": { "name": "from_file", @@ -61374,11 +70324,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L232" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L256" }, "AppTest.from_function": { "name": "from_function", - "signature": "AppTest.from_function(cls, script, *, default_timeout=3)", + "signature": "AppTest.from_function(cls, script, *, default_timeout=3, args=None, kwargs=None)", "description": "

Create an instance of AppTest to simulate an app page defined within a function.

\n

This is similar to AppTest.from_string(), but more convenient to\nwrite with IDE assistance. The script must be executable on its own and\nso must contain all necessary imports.

\n", "args": [ { @@ -61396,6 +70346,22 @@ "is_kwarg_only": true, "description": "

Default time in seconds before a script run is timed out. Can be\noverridden for individual .run() calls.

\n", "default": "time" + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the script function.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the script function.

\n", + "default": null } ], "returns": [ @@ -61406,7 +70372,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L209" }, "AppTest.from_string": { "name": "from_string", @@ -61438,7 +70404,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L166" }, "AppTest.get": { "name": "get", @@ -61462,7 +70428,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L962" }, "AppTest.header": { "name": "header", @@ -61477,7 +70443,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L557" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L597" }, "AppTest.info": { "name": "info", @@ -61492,7 +70458,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L571" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L611" }, "AppTest.json": { "name": "json", @@ -61507,7 +70473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L585" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L625" }, "AppTest.latex": { "name": "latex", @@ -61522,7 +70488,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L599" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L639" }, "AppTest.main": { "name": "main", @@ -61537,7 +70503,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L345" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L371" }, "AppTest.markdown": { "name": "markdown", @@ -61552,7 +70518,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L613" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L653" }, "AppTest.metric": { "name": "metric", @@ -61567,7 +70533,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L627" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L667" }, "AppTest.multiselect": { "name": "multiselect", @@ -61582,7 +70548,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L641" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L681" }, "AppTest.number_input": { "name": "number_input", @@ -61597,7 +70563,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L655" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L695" }, "AppTest.radio": { "name": "radio", @@ -61612,7 +70578,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L669" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L709" }, "AppTest.run": { "name": "run", @@ -61636,7 +70602,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L350" }, "AppTest.select_slider": { "name": "select_slider", @@ -61651,7 +70617,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L683" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L723" }, "AppTest.selectbox": { "name": "selectbox", @@ -61666,7 +70632,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L697" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L737" }, "AppTest.sidebar": { "name": "sidebar", @@ -61681,7 +70647,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L358" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L384" }, "AppTest.slider": { "name": "slider", @@ -61696,7 +70662,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L711" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L751" + }, + "AppTest.status": { + "name": "status", + "signature": "AppTest.status", + "description": "

Sequence of all st.status elements.

\n", + "args": [], + "returns": [ + { + "type_name": "Sequence of Status", + "is_generator": false, + "description": "

Sequence of all st.status elements. Individual elements can be\naccessed from a Sequence by index (order on the page). For\nexample, at.status[0] for the first element. Status is an\nextension of the Block class.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L793" }, "AppTest.subheader": { "name": "subheader", @@ -61711,7 +70692,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L725" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L765" }, "AppTest.success": { "name": "success", @@ -61726,7 +70707,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L779" }, "AppTest.table": { "name": "table", @@ -61741,7 +70722,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L753" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L807" }, "AppTest.tabs": { "name": "tabs", @@ -61756,7 +70737,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L767" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L821" }, "AppTest.text": { "name": "text", @@ -61771,7 +70752,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.text_area": { "name": "text_area", @@ -61786,7 +70767,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.text_input": { "name": "text_input", @@ -61801,7 +70782,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.time_input": { "name": "time_input", @@ -61816,7 +70797,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.title": { "name": "title", @@ -61831,7 +70812,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L897" }, "AppTest.toast": { "name": "toast", @@ -61846,7 +70827,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L911" }, "AppTest.toggle": { "name": "toggle", @@ -61861,7 +70842,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L925" }, "AppTest.warning": { "name": "warning", @@ -61876,7 +70857,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L939" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -61889,7 +70870,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L342" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L343" }, { "name": "run", @@ -61906,7 +70887,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -61914,7 +70895,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L337" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L338" } ], "properties": [ @@ -61924,10 +70905,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L327" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L328" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L304", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L305", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -61952,7 +70933,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -61960,7 +70941,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L360" } ], "properties": [ @@ -61970,10 +70951,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L373" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L347", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L348", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -61989,7 +70970,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L420" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L421" }, { "name": "run", @@ -62006,7 +70987,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62014,7 +70995,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L415" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L416" }, { "name": "uncheck", @@ -62022,7 +71003,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L425" } ], "properties": [ @@ -62032,10 +71013,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L405" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L406" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L383", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L384", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -62051,7 +71032,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L493" }, { "name": "run", @@ -62068,7 +71049,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62076,7 +71057,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L488" } ], "properties": [ @@ -62086,10 +71067,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L466" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L467" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L451", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L452", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -62114,7 +71095,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62122,7 +71103,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L538" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L539" } ], "properties": [ @@ -62132,10 +71113,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L552" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L553" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L518", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L519", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -62160,7 +71141,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -62170,10 +71151,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -62198,7 +71179,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -62206,7 +71187,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L754" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L755" }, { "name": "set_value", @@ -62214,7 +71195,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -62222,7 +71203,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L769" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L770" } ], "properties": [ @@ -62232,7 +71213,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L739" }, { "name": "value", @@ -62240,10 +71221,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L728" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L729" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L699", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L700", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -62259,7 +71240,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L842" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L843" }, { "name": "increment", @@ -62267,7 +71248,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L834" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L835" }, { "name": "run", @@ -62284,7 +71265,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62292,7 +71273,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L809" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L810" } ], "properties": [ @@ -62302,10 +71283,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L822" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L823" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L789", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L790", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -62330,7 +71311,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62338,7 +71319,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L887" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L888" } ], "properties": [ @@ -62348,7 +71329,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L870" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L871" }, { "name": "value", @@ -62356,10 +71337,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L877" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L878" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L851", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L852", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -62384,7 +71365,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -62392,7 +71373,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1030" }, { "name": "set_value", @@ -62400,7 +71381,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L994" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L995" } ], "properties": [ @@ -62410,10 +71391,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1018" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1019" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L976", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L977", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -62438,7 +71419,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -62446,7 +71427,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "select_index", @@ -62454,7 +71435,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L957" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L958" }, { "name": "set_value", @@ -62462,7 +71443,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L943" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L944" } ], "properties": [ @@ -62472,7 +71453,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L923" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L924" }, { "name": "value", @@ -62480,10 +71461,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L934" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L905", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L906", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -62508,7 +71489,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -62516,7 +71497,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1082" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1083" }, { "name": "set_value", @@ -62524,7 +71505,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1053" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1054" } ], "properties": [ @@ -62534,10 +71515,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1071" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1072" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1034", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1035", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -62553,7 +71534,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1163" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1164" }, { "name": "run", @@ -62570,7 +71551,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62578,7 +71559,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1139" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1140" } ], "properties": [ @@ -62588,10 +71569,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1153" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1121", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1122", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -62607,7 +71588,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1216" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1217" }, { "name": "run", @@ -62624,7 +71605,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62632,7 +71613,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1192" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1193" } ], "properties": [ @@ -62642,10 +71623,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1205" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1206" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1174", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1175", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -62661,7 +71642,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1281" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1282" }, { "name": "increment", @@ -62669,7 +71650,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1274" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1275" }, { "name": "run", @@ -62686,7 +71667,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62694,7 +71675,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1247" } ], "properties": [ @@ -62704,10 +71685,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1262" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1263" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1230", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1231", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -62732,7 +71713,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62740,7 +71721,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1338" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1339" } ], "properties": [ @@ -62750,10 +71731,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1328" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1329" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L1305", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1306", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -62778,7 +71759,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -62786,7 +71767,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -62796,10 +71777,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -62817,7 +71798,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L84" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -62837,11 +71818,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.31.0/lib/streamlit/user_info.py#L32", + "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -62855,7 +71836,7 @@ "returns": [] } }, - "1.32.0": { + "1.33.0": { "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, use_container_width=False, theme=\"streamlit\")", @@ -62888,7 +71869,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L745" }, "streamlit.area_chart": { "name": "area_chart", @@ -62954,12 +71935,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L252" }, "streamlit.audio": { "name": "audio", - "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None)", - "example": "
\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open('myaudio.ogg', 'rb')\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format='audio/ogg')\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n\n \n
\n", + "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False)", + "examples": "
\n

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n\n \n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n\n \n
\n", "description": "

Display an audio player.

\n", "args": [ { @@ -62975,15 +71956,15 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The mime type for the audio file. Defaults to 'audio/wav'.\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "description": "

The mime type for the audio file. Defaults to "audio/wav".\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", "default": "s" }, { "name": "start_time", - "type_name": "int", + "type_name": "int, float, timedelta, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The time from which this element should start playing.

\n", + "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An``int`` or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", "default": null }, { @@ -62993,10 +71974,26 @@ "is_kwarg_only": true, "description": "

The sample rate of the audio data in samples per second. Only required if\ndata is a numpy array.

\n", "default": null + }, + { + "name": "end_time", + "type_name": "int, float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The time at which the element should stop playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays through to the end.
  • \n
  • An int or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", + "default": null + }, + { + "name": "loop", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the audio should loop playback.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/media.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/media.py#L62" }, "streamlit.balloons": { "name": "balloons", @@ -63005,7 +72002,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -63071,7 +72068,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L411" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L411" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -63097,7 +72094,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -63186,7 +72183,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L68" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L68" }, "streamlit.cache": { "name": "cache", @@ -63260,7 +72257,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/legacy_caching/caching.py#L480" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/legacy_caching/caching.py#L480" }, "streamlit.cache_data": { "name": "cache_data", @@ -63326,7 +72323,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -63392,7 +72389,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.camera_input": { "name": "camera_input", @@ -63473,7 +72470,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/camera_input.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/camera_input.py#L82" }, "streamlit.caption": { "name": "caption", @@ -63507,7 +72504,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L148" }, "streamlit.chat_input": { "name": "chat_input", @@ -63580,7 +72577,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/chat.py#L210" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/chat.py#L210" }, "streamlit.chat_message": { "name": "chat_message", @@ -63613,7 +72610,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/chat.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/chat.py#L116" }, "streamlit.checkbox": { "name": "checkbox", @@ -63702,7 +72699,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/checkbox.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/checkbox.py#L55" }, "streamlit.code": { "name": "code", @@ -63736,7 +72733,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -63825,7 +72822,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/color_picker.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/color_picker.py#L55" }, "streamlit.columns": { "name": "columns", @@ -63858,7 +72855,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L144" }, "streamlit.connection": { "name": "connection", @@ -63915,7 +72912,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.container": { "name": "container", @@ -63941,7 +72938,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L33" }, "streamlit.data_editor": { "name": "data_editor", @@ -64062,7 +73059,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/data_editor.py#L578" }, "streamlit.dataframe": { "name": "dataframe", @@ -64128,7 +73125,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L56" }, "streamlit.date_input": { "name": "date_input", @@ -64241,7 +73238,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/time_widgets.py#L512" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/time_widgets.py#L496" }, "streamlit.divider": { "name": "divider", @@ -64250,7 +73247,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L260" }, "streamlit.download_button": { "name": "download_button", @@ -64363,7 +73360,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L177" }, "streamlit.echo": { "name": "echo", @@ -64381,7 +73378,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -64390,7 +73387,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse "with" notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/empty.py#L26" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/empty.py#L26" }, "streamlit.error": { "name": "error", @@ -64416,7 +73413,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -64434,7 +73431,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/exception.py#L50" }, "streamlit.expander": { "name": "expander", @@ -64460,7 +73457,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L383" }, "streamlit.experimental_connection": { "name": "experimental_connection", @@ -64517,7 +73514,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.experimental_data_editor": { "name": "experimental_data_editor", @@ -64638,7 +73635,33 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/data_editor.py#L578" + }, + "streamlit.experimental_fragment": { + "name": "experimental_fragment", + "signature": "st.experimental_fragment(func=None, *, run_every=None)", + "examples": "
\n

The following example demonstrates basic usage of @st.experimental_fragment. In\nthis app, clicking "Rerun full script" will increment both counters and\nupdate all values displayed in the app. In contrast, clicking "Rerun fragment"\nwill only increment the counter within the fragment. In this case, the\nst.write command inside the fragment will update the app's frontend,\nbut the two st.write commands outside the fragment will not update the\nfrontend.

\n
\nimport streamlit as st\n\nif "script_runs" not in st.session_state:\n    st.session_state.script_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.script_runs += 1\nfragment()\nst.button("Rerun full script")\nst.write(f"Full script says it ran {st.session_state.script_runs} times.")\nst.write(f"Full script sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n\n \n

You can also trigger a full-script rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n\n \n
\n", + "description": "

Decorator to turn a function into a fragment which can rerun independently of the full script.

\n

When a user interacts with an input widget created by a fragment, Streamlit\nonly reruns the fragment instead of the full script. If run_every is set,\nStreamlit will also rerun the fragment at the specified interval while the\nsession is active, even if the user is not interacting with your app.

\n

To trigger a full script rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each full-script rerun. The rest of the app is\npersisted during a fragment rerun. When a fragment renders elements into\nexternally created containers, the elements will not be cleared with each\nfragment rerun. In this case, elements will accumulate in those containers\nwith each fragment rerun, until the next full-script rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment funciton inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function to turn into a fragment.

\n", + "default": null + }, + { + "name": "run_every", + "type_name": "int, float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The time interval between automatic fragment reruns. This can be one of\nthe following:

\n
\n\n
\n

If run_every is None, the fragment will only rerun from\nuser-triggered events.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/fragment.py#L116" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -64654,7 +73677,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_memo": { "name": "experimental_memo", @@ -64720,7 +73743,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.experimental_rerun": { "name": "experimental_rerun", @@ -64728,7 +73751,7 @@ "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L82" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -64746,7 +73769,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.experimental_singleton": { "name": "experimental_singleton", @@ -64812,7 +73835,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -64909,7 +73932,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", @@ -64943,7 +73966,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/form.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/form.py#L115" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -65023,7 +74046,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/form.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/form.py#L226" }, "streamlit.get_option": { "name": "get_option", @@ -65040,7 +74063,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/config.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/config.py#L130" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -65066,7 +74089,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/graphviz_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/graphviz_chart.py#L39" }, "streamlit.header": { "name": "header", @@ -65108,7 +74131,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", @@ -65126,7 +74149,25 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/doc_string.py#L44" + }, + "streamlit.html": { + "name": "html", + "signature": "st.html(body)", + "example": "
\n
\nimport streamlit as st\n\ncode = """\n<style>\n    p {\n        color: red;\n    }\n</style>\n"""\nst.html(code)\nst.markdown("Lorem ipsum")\n
\n\n \n
\n", + "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", + "args": [ + { + "name": "body", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The HTML code to insert, or path to an HTML code file which is\nloaded and inserted.

\n

If the provided string is the path of a local file, Streamlit will\nload the file and render its contents as HTML. Otherwise, Streamlit\nwill render the string directly as HTML.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", @@ -65192,7 +74233,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -65218,7 +74259,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L93" }, "streamlit.json": { "name": "json", @@ -65244,7 +74285,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/json.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/json.py#L37" }, "streamlit.latex": { "name": "latex", @@ -65270,7 +74311,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L212" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L212" }, "streamlit.line_chart": { "name": "line_chart", @@ -65336,7 +74377,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L94" }, "streamlit.link_button": { "name": "link_button", @@ -65394,7 +74435,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L347" }, "streamlit.map": { "name": "map", @@ -65460,7 +74501,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/map.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/map.py#L84" }, "streamlit.markdown": { "name": "markdown", @@ -65494,7 +74535,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -65552,7 +74593,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/metric.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/metric.py#L48" }, "streamlit.multiselect": { "name": "multiselect", @@ -65673,7 +74714,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/multiselect.py#L139" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/multiselect.py#L139" }, "streamlit.number_input": { "name": "number_input", @@ -65802,7 +74843,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/number_input.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/number_input.py#L113" }, "streamlit.page_link": { "name": "page_link", @@ -65860,7 +74901,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/button.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L430" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -65910,7 +74951,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/plotly_chart.py#L74" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/plotly_chart.py#L74" }, "streamlit.popover": { "name": "popover", @@ -65952,7 +74993,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L478" }, "streamlit.progress": { "name": "progress", @@ -65978,7 +75019,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -66004,7 +75045,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", @@ -66047,7 +75088,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/pyplot.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/pyplot.py#L35" }, "streamlit.radio": { "name": "radio", @@ -66168,7 +75209,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/radio.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/radio.py#L83" }, "streamlit.rerun": { "name": "rerun", @@ -66176,7 +75217,7 @@ "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L58" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -66250,7 +75291,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_altair.py#L572" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L572" }, "streamlit.select_slider": { "name": "select_slider", @@ -66355,7 +75396,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/select_slider.py#L101" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/select_slider.py#L105" }, "streamlit.selectbox": { "name": "selectbox", @@ -66468,7 +75509,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/selectbox.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/selectbox.py#L76" }, "streamlit.set_option": { "name": "set_option", @@ -66493,7 +75534,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -66543,7 +75584,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/page_config.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/page_config.py#L116" }, "streamlit.slider": { "name": "slider", @@ -66664,7 +75705,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/slider.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/slider.py#L165" }, "streamlit.snow": { "name": "snow", @@ -66673,7 +75714,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -66691,7 +75732,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -66732,7 +75773,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L591" }, "streamlit.stop": { "name": "stop", @@ -66741,7 +75782,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L32" }, "streamlit.subheader": { "name": "subheader", @@ -66783,7 +75824,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L113" }, "streamlit.success": { "name": "success", @@ -66809,7 +75850,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L126" }, "streamlit.switch_page": { "name": "switch_page", @@ -66827,7 +75868,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/commands/execution_control.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L98" }, "streamlit.table": { "name": "table", @@ -66845,7 +75886,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L241" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L241" }, "streamlit.tabs": { "name": "tabs", @@ -66870,7 +75911,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/layouts.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L271" }, "streamlit.text": { "name": "text", @@ -66896,7 +75937,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -67009,7 +76050,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/text_widgets.py#L376" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/text_widgets.py#L376" }, "streamlit.text_input": { "name": "text_input", @@ -67130,7 +76171,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/text_widgets.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/text_widgets.py#L114" }, "streamlit.time_input": { "name": "time_input", @@ -67227,7 +76268,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/time_widgets.py#L295" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/time_widgets.py#L279" }, "streamlit.title": { "name": "title", @@ -67261,12 +76302,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/heading.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L183" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -67287,7 +76328,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -67376,7 +76417,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/widgets/checkbox.py#L158" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/checkbox.py#L158" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -67426,11 +76467,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow_vega_lite.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_vega_lite.py#L36" }, "streamlit.video": { "name": "video", - "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None)", + "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False)", "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n\n \n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", "description": "

Display a video player.

\n", "args": [ @@ -67452,10 +76493,10 @@ }, { "name": "start_time", - "type_name": "int", + "type_name": "int, float, timedelta, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The time from which this element should start playing.

\n", + "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An``int`` or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", "default": null }, { @@ -67465,10 +76506,26 @@ "is_kwarg_only": true, "description": "

Optional subtitle data for the video, supporting several input types:

\n
    \n
  • None (default): No subtitles.
  • \n
  • A string, bytes, or Path: File path to a subtitle file in .vtt or .srt formats, or\nthe raw content of subtitles conforming to these formats.\nIf providing raw content, the string must adhere to the WebVTT or SRT\nformat specifications.
  • \n
  • io.BytesIO: A BytesIO stream that contains valid .vtt or .srt\nformatted subtitle data.
  • \n
  • A dictionary: Pairs of labels and file paths or raw subtitle content in\n.vtt or .srt formats to enable multiple subtitle tracks.\nThe label will be shown in the video player. Example:\n{"English": "path/to/english.vtt", "French": "path/to/french.srt"}
  • \n
\n

When provided, subtitles are displayed by default. For multiple\ntracks, the first one is displayed by default. If you don't want any\nsubtitles displayed by default, use an empty string for the value\nin a dictrionary's first pair: {"None": "", "English": "path/to/english.vtt"}

\n

Not supported for YouTube videos.

\n", "default": null + }, + { + "name": "end_time", + "type_name": "int, float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The time at which the element should stop playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays through to the end.
  • \n
  • An int or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", + "default": null + }, + { + "name": "loop", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the video should loop playback.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/media.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/media.py#L189" }, "streamlit.warning": { "name": "warning", @@ -67494,7 +76551,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/alert.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L61" }, "streamlit.write": { "name": "write", @@ -67532,7 +76589,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/write.py#L221" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/write.py#L225" }, "streamlit.write_stream": { "name": "write_stream", @@ -67557,7 +76614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/write.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/write.py#L59" }, "streamlit.experimental_memo.clear": { "name": "experimental_memo.clear", @@ -67565,7 +76622,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -67573,7 +76630,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" }, "streamlit.experimental_singleton.clear": { "name": "experimental_singleton.clear", @@ -67581,7 +76638,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -67589,7 +76646,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" }, "streamlit.query_params.clear": { "name": "clear", @@ -67604,7 +76661,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L118" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -67628,7 +76685,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L95" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -67643,7 +76700,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/runtime/state/query_params_proxy.py#L111" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L130" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -67657,11 +76714,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -67678,11 +76735,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -67698,7 +76755,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L248" }, { "name": "query", @@ -67771,7 +76828,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L122" }, { "name": "reset", @@ -67780,7 +76837,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -67790,7 +76847,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L267" }, { "name": "engine", @@ -67798,7 +76855,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L259" }, { "name": "session", @@ -67807,10 +76864,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L47", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine. Initialize using st.connection("<name>", type="sql").

\n

SQLConnection provides the query() convenience method, which can be used to\nrun simple read-only queries with both caching and simple error handling/retries.\nMore complex DB interactions can be performed by using the .session property\nto receive a regular SQLAlchemy Session.

\n

SQLConnections should always be created using st.connection(), not\ninitialized directly. Connection parameters for a SQLConnection can be specified\nusing either st.secrets or **kwargs. Some frequently used parameters include:

\n
    \n
  • url or arguments for sqlalchemy.engine.URL.create().\nMost commonly it includes a dialect, host, database, username and password.
  • \n
  • create_engine_kwargs can be passed via st.secrets, such as for\nsnowflake-sqlalchemy\nor Google BigQuery.\nThese can also be passed directly as **kwargs to connection().
  • \n
  • autocommit=True to run with isolation level AUTOCOMMIT. Default is False.
  • \n
\n", "args": [], @@ -67827,7 +76884,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L263" }, { "name": "query", @@ -67876,7 +76933,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L120" }, { "name": "reset", @@ -67885,7 +76942,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -67893,7 +76950,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L280" }, { "name": "write_pandas", @@ -67908,7 +76965,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L225" } ], "properties": [ @@ -67918,10 +76975,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L271" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L41", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L41", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -67963,7 +77020,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L97" }, { "name": "reset", @@ -67972,7 +77029,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -67981,7 +77038,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L190" } ], "properties": [ @@ -67992,10 +77049,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L167" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L46", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L46", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -68006,7 +77063,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L248" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -68014,7 +77071,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L267" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -68022,7 +77079,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L259" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -68095,7 +77152,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L122" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -68104,7 +77161,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -68113,7 +77170,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L275" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -68146,7 +77203,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L97" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -68155,7 +77212,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -68164,7 +77221,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L190" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -68173,7 +77230,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L167" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -68181,7 +77238,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L263" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -68230,7 +77287,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L120" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -68238,7 +77295,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L271" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -68247,7 +77304,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -68255,7 +77312,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L280" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -68270,7 +77327,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L225" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -68279,7 +77336,57 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + }, + "streamlit.column_config.AreaChartColumn": { + "name": "AreaChartColumn", + "signature": "st.column_config.AreaChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "description": "

Configure an area chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "default": null + }, + { + "name": "y_min", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "default": null + }, + { + "name": "y_max", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L946" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -68329,7 +77436,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L777" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L785" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -68387,7 +77494,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L596" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L604" }, "streamlit.column_config.Column": { "name": "Column", @@ -68437,7 +77544,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -68527,7 +77634,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1309" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1398" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -68625,7 +77732,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1074" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1163" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -68659,7 +77766,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L938" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1027" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -68709,7 +77816,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L865" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -68791,7 +77898,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L467" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -68825,7 +77932,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1098" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -68915,7 +78022,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -68973,7 +78080,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1511" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -69039,7 +78146,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L678" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L686" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -69113,7 +78220,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -69203,7 +78310,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/column_types.py#L1195" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1284" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -69243,7 +78350,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/components/v1/components.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/components/v1/components.py#L272" }, "streamlit.components.v1.html": { "name": "html", @@ -69284,7 +78391,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/iframe.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/iframe.py#L61" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -69325,7 +78432,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -69351,7 +78458,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/arrow.py#L286" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L286" }, "StatusContainer.update": { "name": "update", @@ -69384,7 +78491,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -69413,7 +78520,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L962" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L1000" }, { "name": "run", @@ -69437,7 +78544,31 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L359" + }, + { + "name": "switch_page", + "signature": "st.testing.v1.switch_page.switch_page(page_path)", + "description": "

Switch to another page of the app.

", + "args": [ + { + "name": "page_path", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Path of the page to switch to. The path must be relative to the\nmain script's location (e.g. "pages/my_page.py").

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

self

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L381" } ], "properties": [ @@ -69454,7 +78585,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L435" }, { "name": "caption", @@ -69469,7 +78600,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L412" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L450" }, { "name": "chat_input", @@ -69484,7 +78615,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L426" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L464" }, { "name": "chat_message", @@ -69499,7 +78630,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L440" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L478" }, { "name": "checkbox", @@ -69514,7 +78645,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L454" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L492" }, { "name": "code", @@ -69529,7 +78660,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L506" }, { "name": "color_picker", @@ -69544,7 +78675,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L482" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L520" }, { "name": "columns", @@ -69559,7 +78690,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L534" }, { "name": "dataframe", @@ -69574,7 +78705,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L513" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L551" }, { "name": "date_input", @@ -69589,7 +78720,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L565" }, { "name": "divider", @@ -69604,7 +78735,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L541" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L579" }, { "name": "error", @@ -69619,7 +78750,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L555" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L593" }, { "name": "exception", @@ -69634,7 +78765,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L569" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L607" }, { "name": "expander", @@ -69649,7 +78780,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L621" }, { "name": "header", @@ -69664,7 +78795,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L635" }, { "name": "info", @@ -69679,7 +78810,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L649" }, { "name": "json", @@ -69694,7 +78825,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L663" }, { "name": "latex", @@ -69709,7 +78840,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L639" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L677" }, { "name": "main", @@ -69724,7 +78855,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L409" }, { "name": "markdown", @@ -69739,7 +78870,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L691" }, { "name": "metric", @@ -69754,7 +78885,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L667" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L705" }, { "name": "multiselect", @@ -69769,7 +78900,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L681" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L719" }, { "name": "number_input", @@ -69784,7 +78915,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L695" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L733" }, { "name": "radio", @@ -69799,7 +78930,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L709" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L747" }, { "name": "select_slider", @@ -69814,7 +78945,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L761" }, { "name": "selectbox", @@ -69829,7 +78960,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L775" }, { "name": "sidebar", @@ -69844,7 +78975,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L422" }, { "name": "slider", @@ -69859,7 +78990,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L789" }, { "name": "status", @@ -69874,7 +79005,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L793" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L831" }, { "name": "subheader", @@ -69889,7 +79020,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L803" }, { "name": "success", @@ -69904,7 +79035,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L779" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L817" }, { "name": "table", @@ -69919,7 +79050,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L807" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L845" }, { "name": "tabs", @@ -69934,7 +79065,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L859" }, { "name": "text", @@ -69949,7 +79080,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L879" }, { "name": "text_area", @@ -69964,7 +79095,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L893" }, { "name": "text_input", @@ -69979,7 +79110,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L907" }, { "name": "time_input", @@ -69994,7 +79125,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L921" }, { "name": "title", @@ -70009,7 +79140,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L897" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L935" }, { "name": "toast", @@ -70024,7 +79155,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L911" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L949" }, { "name": "toggle", @@ -70039,7 +79170,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L963" }, { "name": "warning", @@ -70054,11 +79185,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L939" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L977" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L90", - "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue.

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L92", + "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { "name": "secrets", @@ -70097,7 +79228,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L435" }, "AppTest.caption": { "name": "caption", @@ -70112,7 +79243,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L412" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L450" }, "AppTest.chat_input": { "name": "chat_input", @@ -70127,7 +79258,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L426" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L464" }, "AppTest.chat_message": { "name": "chat_message", @@ -70142,7 +79273,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L440" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L478" }, "AppTest.checkbox": { "name": "checkbox", @@ -70157,7 +79288,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L454" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L492" }, "AppTest.code": { "name": "code", @@ -70172,7 +79303,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L506" }, "AppTest.color_picker": { "name": "color_picker", @@ -70187,7 +79318,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L482" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L520" }, "AppTest.columns": { "name": "columns", @@ -70202,7 +79333,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L534" }, "AppTest.dataframe": { "name": "dataframe", @@ -70217,7 +79348,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L513" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L551" }, "AppTest.date_input": { "name": "date_input", @@ -70232,7 +79363,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L565" }, "AppTest.divider": { "name": "divider", @@ -70247,7 +79378,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L541" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L579" }, "AppTest.error": { "name": "error", @@ -70262,7 +79393,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L555" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L593" }, "AppTest.exception": { "name": "exception", @@ -70277,7 +79408,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L569" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L607" }, "AppTest.expander": { "name": "expander", @@ -70292,7 +79423,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L621" }, "AppTest.from_file": { "name": "from_file", @@ -70324,7 +79455,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L262" }, "AppTest.from_function": { "name": "from_function", @@ -70372,7 +79503,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L209" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L215" }, "AppTest.from_string": { "name": "from_string", @@ -70404,7 +79535,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L172" }, "AppTest.get": { "name": "get", @@ -70428,7 +79559,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L962" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L1000" }, "AppTest.header": { "name": "header", @@ -70443,7 +79574,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L635" }, "AppTest.info": { "name": "info", @@ -70458,7 +79589,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L649" }, "AppTest.json": { "name": "json", @@ -70473,7 +79604,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L663" }, "AppTest.latex": { "name": "latex", @@ -70488,7 +79619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L639" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L677" }, "AppTest.main": { "name": "main", @@ -70503,7 +79634,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L409" }, "AppTest.markdown": { "name": "markdown", @@ -70518,7 +79649,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L691" }, "AppTest.metric": { "name": "metric", @@ -70533,7 +79664,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L667" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L705" }, "AppTest.multiselect": { "name": "multiselect", @@ -70548,7 +79679,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L681" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L719" }, "AppTest.number_input": { "name": "number_input", @@ -70563,7 +79694,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L695" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L733" }, "AppTest.radio": { "name": "radio", @@ -70578,12 +79709,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L709" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L747" }, "AppTest.run": { "name": "run", "signature": "AppTest.run(*, timeout=None)", - "description": "

Run the script from the current state.

\n

This is equivalent to manually rerunning the app or the rerun that\noccurs upon user interaction. AppTest.run() must be manually called\nafter updating a widget value as script reruns do not occur\nautomatically as they do for live-running Streamlit apps.

\n", + "description": "

Run the script from the current state.

\n

This is equivalent to manually rerunning the app or the rerun that\noccurs upon user interaction. AppTest.run() must be manually called\nafter updating a widget value or switching pages as script reruns do\nnot occur automatically as they do for live-running Streamlit apps.

\n", "args": [ { "name": "timeout", @@ -70602,7 +79733,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L359" }, "AppTest.select_slider": { "name": "select_slider", @@ -70617,7 +79748,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L761" }, "AppTest.selectbox": { "name": "selectbox", @@ -70632,7 +79763,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L775" }, "AppTest.sidebar": { "name": "sidebar", @@ -70647,7 +79778,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L422" }, "AppTest.slider": { "name": "slider", @@ -70662,7 +79793,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L789" }, "AppTest.status": { "name": "status", @@ -70677,7 +79808,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L793" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L831" }, "AppTest.subheader": { "name": "subheader", @@ -70692,7 +79823,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L803" }, "AppTest.success": { "name": "success", @@ -70707,7 +79838,31 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L779" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L817" + }, + "AppTest.switch_page": { + "name": "switch_page", + "signature": "AppTest.switch_page(page_path)", + "description": "

Switch to another page of the app.

\n

This method does not automatically rerun the app. Use a follow-up call\nto AppTest.run() to obtain the elements on the selected page.

\n", + "args": [ + { + "name": "page_path", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Path of the page to switch to. The path must be relative to the\nmain script's location (e.g. "pages/my_page.py").

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "AppTest", + "is_generator": false, + "description": "

self

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L381" }, "AppTest.table": { "name": "table", @@ -70722,7 +79877,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L807" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L845" }, "AppTest.tabs": { "name": "tabs", @@ -70737,7 +79892,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L859" }, "AppTest.text": { "name": "text", @@ -70752,7 +79907,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L879" }, "AppTest.text_area": { "name": "text_area", @@ -70767,7 +79922,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L893" }, "AppTest.text_input": { "name": "text_input", @@ -70782,7 +79937,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L907" }, "AppTest.time_input": { "name": "time_input", @@ -70797,7 +79952,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L921" }, "AppTest.title": { "name": "title", @@ -70812,7 +79967,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L897" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L935" }, "AppTest.toast": { "name": "toast", @@ -70827,7 +79982,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L911" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L949" }, "AppTest.toggle": { "name": "toggle", @@ -70842,7 +79997,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L963" }, "AppTest.warning": { "name": "warning", @@ -70857,7 +80012,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/app_test.py#L939" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L977" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -70870,7 +80025,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L343" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L344" }, { "name": "run", @@ -70887,7 +80042,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -70895,7 +80050,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L338" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L339" } ], "properties": [ @@ -70905,10 +80060,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L328" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L329" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L305", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L306", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -70933,7 +80088,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -70941,7 +80096,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L360" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L361" } ], "properties": [ @@ -70951,10 +80106,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L374" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L348", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L349", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -70970,7 +80125,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L422" }, { "name": "run", @@ -70987,7 +80142,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -70995,7 +80150,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L416" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "uncheck", @@ -71003,7 +80158,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L425" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L426" } ], "properties": [ @@ -71013,10 +80168,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L406" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L407" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L384", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L385", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -71032,7 +80187,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L494" }, { "name": "run", @@ -71049,7 +80204,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71057,7 +80212,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L489" } ], "properties": [ @@ -71067,10 +80222,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L467" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L468" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L452", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L453", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -71095,7 +80250,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71103,7 +80258,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L539" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L540" } ], "properties": [ @@ -71113,10 +80268,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L553" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L554" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L519", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L520", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -71141,7 +80296,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" } ], "properties": [ @@ -71151,10 +80306,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -71179,7 +80334,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -71187,7 +80342,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L755" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L757" }, { "name": "set_value", @@ -71195,7 +80350,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L751" }, { "name": "unselect", @@ -71203,17 +80358,25 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L770" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L772" } ], "properties": [ + { + "name": "format_func", + "signature": "st.testing.v1.element_tree.format_func.format_func", + "description": "

The widget's formatting function for displaying options. (callable)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L745" + }, { "name": "indices", "signature": "st.testing.v1.element_tree.indices.indices", "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L740" }, { "name": "value", @@ -71221,10 +80384,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L730" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L700", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L701", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -71240,7 +80403,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L845" }, { "name": "increment", @@ -71248,7 +80411,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L835" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L837" }, { "name": "run", @@ -71265,7 +80428,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71273,7 +80436,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L810" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L812" } ], "properties": [ @@ -71283,10 +80446,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L823" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L825" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L790", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L792", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -71311,7 +80474,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71319,17 +80482,25 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L896" } ], "properties": [ + { + "name": "format_func", + "signature": "st.testing.v1.element_tree.format_func.format_func", + "description": "

The widget's formatting function for displaying options. (callable)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L890" + }, { "name": "index", "signature": "st.testing.v1.element_tree.index.index", "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L873" }, { "name": "value", @@ -71337,10 +80508,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L878" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L880" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L852", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L854", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -71365,7 +80536,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -71373,7 +80544,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1030" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1042" }, { "name": "set_value", @@ -71381,20 +80552,28 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L995" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1004" } ], "properties": [ + { + "name": "format_func", + "signature": "st.testing.v1.element_tree.format_func.format_func", + "description": "

The widget's formatting function for displaying options. (callable)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1036" + }, { "name": "value", "signature": "st.testing.v1.element_tree.value.value", "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1019" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1025" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L977", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L986", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -71419,7 +80598,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -71427,7 +80606,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "select_index", @@ -71435,7 +80614,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L967" }, { "name": "set_value", @@ -71443,17 +80622,25 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L944" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L958" } ], "properties": [ + { + "name": "format_func", + "signature": "st.testing.v1.element_tree.format_func.format_func", + "description": "

The widget's formatting function for displaying options. (callable)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L952" + }, { "name": "index", "signature": "st.testing.v1.element_tree.index.index", "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L924" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L932" }, { "name": "value", @@ -71461,10 +80648,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L934" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L942" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L906", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L914", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -71489,7 +80676,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -71497,7 +80684,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1083" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1095" }, { "name": "set_value", @@ -71505,7 +80692,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1054" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1066" } ], "properties": [ @@ -71515,10 +80702,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1072" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1084" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1035", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1047", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -71534,7 +80721,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1164" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "run", @@ -71551,7 +80738,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71559,7 +80746,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1140" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1152" } ], "properties": [ @@ -71569,10 +80756,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1153" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1122", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1134", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -71588,7 +80775,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1217" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1229" }, { "name": "run", @@ -71605,7 +80792,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71613,7 +80800,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1193" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1205" } ], "properties": [ @@ -71623,10 +80810,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1206" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1218" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1175", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1187", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -71642,7 +80829,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1282" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1294" }, { "name": "increment", @@ -71650,7 +80837,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1275" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1287" }, { "name": "run", @@ -71667,7 +80854,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71675,7 +80862,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1247" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1259" } ], "properties": [ @@ -71685,10 +80872,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1263" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1231", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1243", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -71713,7 +80900,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71721,7 +80908,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1339" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1351" } ], "properties": [ @@ -71731,10 +80918,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1329" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1341" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L1306", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1318", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -71759,7 +80946,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -71767,7 +80954,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L195" } ], "properties": [ @@ -71777,10 +80964,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L180", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -71798,7 +80985,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L84" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -71818,11 +81005,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.32.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -71836,7 +81023,7 @@ "returns": [] } }, - "1.33.0": { + "1.34.0": { "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, use_container_width=False, theme=\"streamlit\")", @@ -71869,7 +81056,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L745" }, "streamlit.area_chart": { "name": "area_chart", @@ -71935,11 +81122,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L252" }, "streamlit.audio": { "name": "audio", - "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False)", + "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False, autoplay=False)", "examples": "
\n

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n\n \n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n\n \n
\n", "description": "

Display an audio player.

\n", "args": [ @@ -71990,10 +81177,18 @@ "is_kwarg_only": true, "description": "

Whether the audio should loop playback.

\n", "default": null + }, + { + "name": "autoplay", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the audio file should start playing automatically. This is\nFalse by default. Browsers will not autoplay audio files if the\nuser has not interacted with the page by clicking somewhere.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/media.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/media.py#L64" }, "streamlit.balloons": { "name": "balloons", @@ -72002,7 +81197,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -72068,7 +81263,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L411" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L411" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -72094,12 +81289,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button('Say hello'):\n    st.write('Why hello there')\nelse:\n    st.write('Goodbye')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n\n \n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -72107,7 +81302,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -72183,7 +81378,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L68" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L67" }, "streamlit.cache": { "name": "cache", @@ -72257,12 +81452,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/legacy_caching/caching.py#L480" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/legacy_caching/caching.py#L431" }, "streamlit.cache_data": { "name": "cache_data", "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", "args": [ { @@ -72323,12 +81518,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.cache_resource": { "name": "cache_resource", "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", "args": [ { @@ -72389,7 +81584,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.camera_input": { "name": "camera_input", @@ -72402,7 +81597,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -72470,7 +81665,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/camera_input.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/camera_input.py#L83" }, "streamlit.caption": { "name": "caption", @@ -72483,7 +81678,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -72504,7 +81699,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L151" }, "streamlit.chat_input": { "name": "chat_input", @@ -72577,7 +81772,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/chat.py#L210" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/chat.py#L231" }, "streamlit.chat_message": { "name": "chat_message", @@ -72595,11 +81790,11 @@ }, { "name": "avatar", - "type_name": "str, numpy.ndarray, or BytesIO", + "type_name": "Anything supported by st.image, str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The avatar shown next to the message. Can be one of:

\n
    \n
  • A single emoji, e.g. "\ud83e\uddd1\u200d\ud83d\udcbb", "\ud83e\udd16", "\ud83e\udd96". Shortcodes are not supported.
  • \n
  • \n
    An image using one of the formats allowed for st.image: path of a local
    \n
    image file; URL to fetch the image from; an SVG image; array of shape\n(w,h) or (w,h,1) for a monochrome image, (w,h,3) for a color image,\nor (w,h,4) for an RGBA image.
    \n
    \n
  • \n
\n

If None (default), uses default icons if name is "user",\n"assistant", "ai", "human" or the first letter of the name value.

\n", - "default": "icons" + "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": "user" } ], "returns": [ @@ -72610,12 +81805,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/chat.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/chat.py#L120" }, "streamlit.checkbox": { "name": "checkbox", "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox('I agree')\n\nif agree:\n    st.write('Great!')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n\n \n
\n", "description": "

Display a checkbox widget.

\n", "args": [ { @@ -72623,7 +81818,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -72699,7 +81894,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/checkbox.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/checkbox.py#L56" }, "streamlit.code": { "name": "code", @@ -72733,12 +81928,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker('Pick A Color', '#00f900')\nst.write('The current color is', color)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n\n \n
\n", "description": "

Display a color picker widget.

\n", "args": [ { @@ -72746,7 +81941,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -72822,13 +82017,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/color_picker.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/color_picker.py#L56" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\")", - "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", - "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", "args": [ { "name": "spec", @@ -72855,7 +82050,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L145" }, "streamlit.connection": { "name": "connection", @@ -72912,13 +82107,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.container": { "name": "container", "signature": "st.container(*, height=None, border=None)", - "examples": "
\n

Inserting elements using "with" notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n\n \n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n\n \n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n\n \n
\n", - "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n\n \n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n\n \n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n\n \n
\n", + "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ { "name": "height", @@ -72938,7 +82133,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L34" }, "streamlit.data_editor": { "name": "data_editor", @@ -73059,7 +82254,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/data_editor.py#L577" }, "streamlit.dataframe": { "name": "dataframe", @@ -73125,12 +82320,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L56" }, "streamlit.date_input": { "name": "date_input", "signature": "st.date_input(label, value=\"default_value_today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write('Your birthday is:', d)\n
\n\n \n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n\n \n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write('Your birthday is:', d)\n
\n\n \n
\n", + "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n\n \n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n\n \n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n\n \n
\n", "description": "

Display a date input widget.

\n", "args": [ { @@ -73138,7 +82333,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -73210,7 +82405,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

A format string controlling how the interface should display dates.\nSupports \u201cYYYY/MM/DD\u201d (default), \u201cDD/MM/YYYY\u201d, or \u201cMM/DD/YYYY\u201d.\nYou may also use a period (.) or hyphen (-) as separators.

\n", + "description": "

A format string controlling how the interface should display dates.\nSupports "YYYY/MM/DD" (default), "DD/MM/YYYY", or "MM/DD/YYYY".\nYou may also use a period (.) or hyphen (-) as separators.

\n", "default": null }, { @@ -73238,7 +82433,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/time_widgets.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/time_widgets.py#L515" }, "streamlit.divider": { "name": "divider", @@ -73247,12 +82442,12 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L266" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode('utf-8')\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name='large_df.csv',\n    mime='text/csv',\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button('Download some text', text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b'example content'\n# Defaults to 'application/octet-stream'\nst.download_button('Download binary file', binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", + "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n", "args": [ { @@ -73260,7 +82455,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -73360,7 +82555,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L179" }, "streamlit.echo": { "name": "echo", @@ -73378,16 +82573,16 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", "signature": "st.empty()", - "examples": "
\n

Overwriting elements in-place using "with" notation:

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(60):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write("\u2714\ufe0f 1 minute over!")\n
\n

Replacing several elements, then clearing them:

\n
\nimport streamlit as st\n\nplaceholder = st.empty()\n\n# Replace the placeholder with some text:\nplaceholder.text("Hello")\n\n# Replace the text with a chart:\nplaceholder.line_chart({"data": [1, 5, 2, 6]})\n\n# Replace the chart with several elements:\nwith placeholder.container():\n    st.write("This is one element")\n    st.write("This is another")\n\n# Clear all those elements:\nplaceholder.empty()\n
\n
\n", - "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse "with" notation or just call methods directly on the returned object.\nSee examples below.

\n", + "examples": "
\n

Overwriting elements in-place using with notation:

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(60):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write("\u2714\ufe0f 1 minute over!")\n
\n

Replacing several elements, then clearing them:

\n
\nimport streamlit as st\n\nplaceholder = st.empty()\n\n# Replace the placeholder with some text:\nplaceholder.text("Hello")\n\n# Replace the text with a chart:\nplaceholder.line_chart({"data": [1, 5, 2, 6]})\n\n# Replace the chart with several elements:\nwith placeholder.container():\n    st.write("This is one element")\n    st.write("This is another")\n\n# Clear all those elements:\nplaceholder.empty()\n
\n
\n", + "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/empty.py#L26" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -73405,15 +82600,15 @@ }, { "name": "icon", - "type_name": "str or None", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "None" + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -73431,20 +82626,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/exception.py#L50" }, "streamlit.expander": { "name": "expander", "signature": "st.expander(label, expanded=False)", - "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write(\\"\\"\\"\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    \\"\\"\\")\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write(\\"\\"\\"\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n\\"\\"\\")\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", - "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", + "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", "args": [ { "name": "label", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A string to use as the header for the expander. The label can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A string to use as the header for the expander. The label can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -73457,7 +82652,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L387" }, "streamlit.experimental_connection": { "name": "experimental_connection", @@ -73514,7 +82709,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.experimental_data_editor": { "name": "experimental_data_editor", @@ -73635,13 +82830,39 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/data_editor.py#L577" + }, + "streamlit.experimental_dialog": { + "name": "experimental_dialog", + "signature": "st.experimental_dialog(title=\"\", *, width=\"small\")", + "examples": "
\n

The following example demonstrates the basic usage of @st.experimental_dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.experimental_dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n\n \n
\n", + "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.experimental_dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing``ESC`` on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.experimental_dialog inherits behavior from st.experimental_fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

A dialog may not open another dialog. Only one dialog function may be\ncalled in a script run, which means that only one dialog can be open at\nany given time.

\n
\n", + "args": [ + { + "name": "title", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The title to display at the top of the modal dialog. It cannot be empty.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"large\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the modal dialog. If width is "small (default), the\nmodal dialog will be 500 pixels wide. If width is "large", the\nmodal dialog will be about 750 pixels wide.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/dialog_decorator.py#L93" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", "signature": "st.experimental_fragment(func=None, *, run_every=None)", "examples": "
\n

The following example demonstrates basic usage of @st.experimental_fragment. In\nthis app, clicking "Rerun full script" will increment both counters and\nupdate all values displayed in the app. In contrast, clicking "Rerun fragment"\nwill only increment the counter within the fragment. In this case, the\nst.write command inside the fragment will update the app's frontend,\nbut the two st.write commands outside the fragment will not update the\nfrontend.

\n
\nimport streamlit as st\n\nif "script_runs" not in st.session_state:\n    st.session_state.script_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.script_runs += 1\nfragment()\nst.button("Rerun full script")\nst.write(f"Full script says it ran {st.session_state.script_runs} times.")\nst.write(f"Full script sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n\n \n

You can also trigger a full-script rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n\n \n
\n", - "description": "

Decorator to turn a function into a fragment which can rerun independently of the full script.

\n

When a user interacts with an input widget created by a fragment, Streamlit\nonly reruns the fragment instead of the full script. If run_every is set,\nStreamlit will also rerun the fragment at the specified interval while the\nsession is active, even if the user is not interacting with your app.

\n

To trigger a full script rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each full-script rerun. The rest of the app is\npersisted during a fragment rerun. When a fragment renders elements into\nexternally created containers, the elements will not be cleared with each\nfragment rerun. In this case, elements will accumulate in those containers\nwith each fragment rerun, until the next full-script rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment funciton inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n", + "description": "

Decorator to turn a function into a fragment which can rerun independently of the full script.

\n

When a user interacts with an input widget created by a fragment, Streamlit\nonly reruns the fragment instead of the full script. If run_every is set,\nStreamlit will also rerun the fragment at the specified interval while the\nsession is active, even if the user is not interacting with your app.

\n

To trigger a full script rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each full-script rerun. The rest of the app is\npersisted during a fragment rerun. When a fragment renders elements into\nexternally created containers, the elements will not be cleared with each\nfragment rerun. In this case, elements will accumulate in those containers\nwith each fragment rerun, until the next full-script rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n", "args": [ { "name": "func", @@ -73661,7 +82882,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/fragment.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/fragment.py#L116" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -73677,12 +82898,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_memo": { "name": "experimental_memo", "signature": "st.experimental_memo(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", "args": [ { @@ -73743,7 +82964,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.experimental_rerun": { "name": "experimental_rerun", @@ -73751,7 +82972,7 @@ "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L82" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -73769,12 +82990,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.experimental_singleton": { "name": "experimental_singleton", "signature": "st.experimental_singleton(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", "args": [ { @@ -73835,20 +83056,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n\n \n
\n", - "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration#set-configuration-options

\n", + "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration#set-configuration-options

\n", "args": [ { "name": "label", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -73932,13 +83153,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/file_uploader.py#L229" }, "streamlit.form": { "name": "form", "signature": "st.form(key, clear_on_submit=False, *, border=True)", - "examples": "
\n

Inserting elements using "with" notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n\n \n
\n", - "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use "with" notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n\n \n
\n", + "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ { "name": "key", @@ -73966,7 +83187,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/form.py#L115" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -74046,7 +83267,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/form.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/form.py#L230" }, "streamlit.get_option": { "name": "get_option", @@ -74063,7 +83284,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/config.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/config.py#L130" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -74089,7 +83310,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/graphviz_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/graphviz_chart.py#L39" }, "streamlit.header": { "name": "header", @@ -74102,7 +83323,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -74131,11 +83352,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=streamlit)", + "signature": "st.help(obj=)", "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n\n \n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog('poodle', 'white')\n\nst.help(fido)\n
\n\n \n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n\n \n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -74149,7 +83370,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -74167,7 +83388,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", @@ -74233,7 +83454,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -74251,15 +83472,15 @@ }, { "name": "icon", - "type_name": "str or None", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "None" + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", @@ -74285,7 +83506,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/json.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/json.py#L37" }, "streamlit.latex": { "name": "latex", @@ -74311,7 +83532,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L212" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L218" }, "streamlit.line_chart": { "name": "line_chart", @@ -74377,7 +83598,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L94" }, "streamlit.link_button": { "name": "link_button", @@ -74390,7 +83611,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -74435,7 +83656,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L352" }, "streamlit.map": { "name": "map", @@ -74501,12 +83722,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/map.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/map.py#L84" }, "streamlit.markdown": { "name": "markdown", "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors].''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n\n \n
\n", "description": "

Display string formatted as Markdown.

\n", "args": [ { @@ -74514,7 +83735,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -74535,7 +83756,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -74548,7 +83769,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The header or title for the metric. The label can optionally contain\nMarkdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The header or title for the metric. The label can optionally contain\nMarkdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -74593,12 +83814,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/metric.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/metric.py#L48" }, "streamlit.multiselect": { "name": "multiselect", "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    'What are your favorite colors',\n    ['Green', 'Yellow', 'Red', 'Blue'],\n    ['Yellow', 'Red'])\n\nst.write('You selected:', options)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"])\n\nst.write("You selected:", options)\n
\n\n \n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ { @@ -74606,7 +83827,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -74714,12 +83935,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/multiselect.py#L139" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/multiselect.py#L144" }, "streamlit.number_input": { "name": "number_input", "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input('Insert a number')\nst.write('The current number is ', number)\n
\n\n \n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write('The current number is ', number)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n\n \n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write("The current number is ", number)\n
\n\n \n
\n", "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -74727,7 +83948,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -74843,12 +84064,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/number_input.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/number_input.py#L115" }, "streamlit.page_link": { "name": "page_link", "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ { @@ -74864,7 +84085,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

The label for the page link. Labels are required for external pages.\nLabels can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The label for the page link. Labels are required for external pages.\nLabels can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -74901,7 +84122,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/button.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L438" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -74951,12 +84172,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/plotly_chart.py#L74" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/plotly_chart.py#L74" }, "streamlit.popover": { "name": "popover", "signature": "st.popover(label, *, help=None, disabled=False, use_container_width=False)", - "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n\n \n
\n", "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", "args": [ { @@ -74964,7 +84185,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The label of the button that opens the popover container.\nThe label can optionally contain Markdown and supports the\nfollowing elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • \n
    Emoji shortcodes, such as :+1: and :sunglasses:.
    \n
    For a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
    \n
    \n
  • \n
  • \n
    LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
    \n
    must be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
    \n
    \n
  • \n
  • \n
    Colored text, using the syntax :color[text to be colored],
    \n
    where color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
    \n
    \n
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The label of the button that opens the popover container.\nThe label can optionally contain Markdown and supports the\nfollowing elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • \n
    Emoji shortcodes, such as :+1: and :sunglasses:.
    \n
    For a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
    \n
    \n
  • \n
  • \n
    LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
    \n
    must be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
    \n
    \n
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -74993,7 +84214,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L485" }, "streamlit.progress": { "name": "progress", @@ -75014,12 +84235,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A message to display above the progress bar. The text can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A message to display above the progress bar. The text can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -75045,7 +84266,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", @@ -75088,12 +84309,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/pyplot.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/pyplot.py#L35" }, "streamlit.radio": { "name": "radio", "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ':rainbow[Comedy]':\n    st.write('You selected comedy.')\nelse:\n    st.write("You didn\\'t select comedy.")\n
\n\n \n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n\n \n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n\n \n
\n", "description": "

Display a radio button widget.

\n", "args": [ { @@ -75101,7 +84322,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -75209,7 +84430,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/radio.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/radio.py#L85" }, "streamlit.rerun": { "name": "rerun", @@ -75217,7 +84438,7 @@ "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L58" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -75291,12 +84512,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_altair.py#L572" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L572" }, "streamlit.select_slider": { "name": "select_slider", "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    'Select a color of the rainbow',\n    options=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'])\nst.write('My favorite color is', color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    'Select a range of color wavelength',\n    options=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'],\n    value=('red', 'blue'))\nst.write('You selected wavelengths between', start_color, 'and', end_color)\n
\n\n \n ", + "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"])\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"],\n    value=("red", "blue"))\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n\n \n ", "description": "

Display a slider widget to select items from a list.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.select_slider and st.slider is that\nselect_slider accepts any datatype and takes an iterable set of\noptions, while st.slider only accepts numerical or date/time data and\ntakes a range as input.

\n", "args": [ { @@ -75304,7 +84525,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -75396,12 +84617,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/select_slider.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/select_slider.py#L106" }, "streamlit.selectbox": { "name": "selectbox", "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    'How would you like to be contacted?',\n    ('Email', 'Home phone', 'Mobile phone'))\n\nst.write('You selected:', option)\n
\n\n \n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write('You selected:', option)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"))\n\nst.write("You selected:", option)\n
\n\n \n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n\n \n
\n", "description": "

Display a select widget.

\n", "args": [ { @@ -75409,7 +84630,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -75481,7 +84702,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nDefaults to 'Choose an option'.

\n", + "description": "

A string to display when no options are selected.\nDefaults to "Choose an option".

\n", "default": "s" }, { @@ -75509,7 +84730,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/selectbox.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/selectbox.py#L78" }, "streamlit.set_option": { "name": "set_option", @@ -75534,7 +84755,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -75552,10 +84773,10 @@ }, { "name": "page_icon", - "type_name": "Anything supported by st.image or str or None", + "type_name": "Anything supported by st.image, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page favicon.\nBesides the types supported by st.image (like URLs or numpy arrays),\nyou can pass in an emoji as a string ("\ud83e\udd88") or a shortcode (":shark:").\nIf you're feeling lucky, try "random" for a random emoji!\nEmoji icons are courtesy of Twemoji and loaded from MaxCDN.

\n", + "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", "default": null }, { @@ -75584,20 +84805,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/page_config.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/page_config.py#L119" }, "streamlit.slider": { "name": "slider", "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\nage = st.slider('How old are you?', 0, 130, 25)\nst.write("I'm ", age, 'years old')\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    'Select a range of values',\n    0.0, 100.0, (25.0, 75.0))\nst.write('Values:', values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n\n \n
\n", - "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    "Select a range of values",\n    0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n\n \n
\n", + "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { "name": "label", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -75705,7 +84926,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/slider.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/slider.py#L166" }, "streamlit.snow": { "name": "snow", @@ -75714,7 +84935,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -75732,20 +84953,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", "signature": "st.status(label, *, expanded=False, state=\"running\")", - "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button('Rerun')\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button('Rerun')\n
\n\n \n
\n", - "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse "with" notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\n"with" notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", + "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button("Rerun")\n
\n\n \n
\n", + "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", "args": [ { "name": "label", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The initial label of the status container. The label can optionally\ncontain Markdown and supports the following elements: Bold,\nItalics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The initial label of the status container. The label can optionally\ncontain Markdown and supports the following elements: Bold,\nItalics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null }, { @@ -75773,7 +84994,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L601" }, "streamlit.stop": { "name": "stop", @@ -75782,7 +85003,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L32" }, "streamlit.subheader": { "name": "subheader", @@ -75795,7 +85016,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -75824,7 +85045,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L116" }, "streamlit.success": { "name": "success", @@ -75842,15 +85063,15 @@ }, { "name": "icon", - "type_name": "str or None", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "None" + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -75868,7 +85089,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/commands/execution_control.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L98" }, "streamlit.table": { "name": "table", @@ -75886,20 +85107,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L241" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L241" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs)", - "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", - "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the "with" notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", + "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", "args": [ { "name": "tabs", "type_name": "list of str", "is_optional": false, "is_kwarg_only": false, - "description": "

Creates a tab for each string in the list. The first tab is selected by default.\nThe string is used as the name of the tab and can optionally contain Markdown,\nsupporting the following elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

Creates a tab for each string in the list. The first tab is selected by default.\nThe string is used as the name of the tab and can optionally contain Markdown,\nsupporting the following elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", "default": null } ], @@ -75911,7 +85132,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/layouts.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L272" }, "streamlit.text": { "name": "text", @@ -75937,12 +85158,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f'You wrote {len(txt)} characters.')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n\n \n
\n", "description": "

Display a multi-line text input widget.

\n", "args": [ { @@ -75950,7 +85171,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -76050,12 +85271,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/text_widgets.py#L376" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/text_widgets.py#L385" }, "streamlit.text_input": { "name": "text_input", "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input('Movie title', 'Life of Brian')\nst.write('The current movie title is', title)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n\n \n
\n", "description": "

Display a single-line text input widget.

\n", "args": [ { @@ -76063,7 +85284,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -76171,12 +85392,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/text_widgets.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/text_widgets.py#L116" }, "streamlit.time_input": { "name": "time_input", "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00)", - "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input('Set an alarm for', datetime.time(8, 45))\nst.write('Alarm is set for', t)\n
\n\n \n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input('Set an alarm for', value=None)\nst.write('Alarm is set for', t)\n
\n\n \n
\n", + "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n\n \n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n\n \n
\n", "description": "

Display a time input widget.

\n", "args": [ { @@ -76184,7 +85405,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -76268,7 +85489,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/time_widgets.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/time_widgets.py#L290" }, "streamlit.title": { "name": "title", @@ -76281,7 +85502,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -76302,12 +85523,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/heading.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L189" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -76315,25 +85536,25 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n", + "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { "name": "icon", - "type_name": "str or None", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the toast. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "None" + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\non = st.toggle('Activate feature')\n\nif on:\n    st.write('Feature activated!')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n\n \n
\n", "description": "

Display a toggle widget.

\n", "args": [ { @@ -76341,7 +85562,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text, using the syntax :color[text to be colored],\nwhere color needs to be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -76417,7 +85638,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/widgets/checkbox.py#L158" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/checkbox.py#L162" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -76467,11 +85688,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow_vega_lite.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_vega_lite.py#L36" }, "streamlit.video": { "name": "video", - "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False)", + "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False)", "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n\n \n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", "description": "

Display a video player.

\n", "args": [ @@ -76496,7 +85717,7 @@ "type_name": "int, float, timedelta, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An``int`` or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", + "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An int or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", "default": null }, { @@ -76522,10 +85743,26 @@ "is_kwarg_only": true, "description": "

Whether the video should loop playback.

\n", "default": null + }, + { + "name": "autoplay", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the video should start playing automatically. This is\nFalse by default. Browsers will not autoplay unmuted videos\nif the user has not interacted with the page by clicking somewhere.\nTo enable autoplay without user interaction, you must also set\nmuted=True.

\n", + "default": null + }, + { + "name": "muted", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the video should play with the audio silenced. This is\nFalse by default. Use this in conjunction with autoplay=True\nto enable autoplay without user interaction.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/media.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/media.py#L197" }, "streamlit.warning": { "name": "warning", @@ -76543,15 +85780,15 @@ }, { "name": "icon", - "type_name": "str or None", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the alert. Shortcodes are not allowed, please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "None" + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/alert.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -76589,7 +85826,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/write.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/write.py#L233" }, "streamlit.write_stream": { "name": "write_stream", @@ -76614,7 +85851,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/write.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/write.py#L59" }, "streamlit.experimental_memo.clear": { "name": "experimental_memo.clear", @@ -76622,7 +85859,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -76630,7 +85867,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_data_api.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" }, "streamlit.experimental_singleton.clear": { "name": "experimental_singleton.clear", @@ -76638,7 +85875,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -76646,7 +85883,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" }, "streamlit.query_params.clear": { "name": "clear", @@ -76661,7 +85898,25 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L118" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L133" + }, + "streamlit.query_params.from_dict": { + "name": "from_dict", + "signature": "st.query_params.from_dict(params)", + "example": "
\nimport streamlit as st\n\nst.query_params.from_dict({"foo": "bar", "baz": [1, "two"]})\n
\n", + "description": "

Set all of the query parameters from a dictionary or dictionary-like object.

\n

This method primarily exists for advanced users who want to control\nmultiple query parameters in a single update. To set individual query\nparameters, use key or attribute notation instead.

\n

This method inherits limitations from st.query_params and can't be\nused to set embedding options as described in Embed your app.

\n

To handle repeated keys, the value in a key-value pair should be a list.

\n
\n

Note

\n

.from_dict() is not a direct inverse of .to_dict() if\nyou are working with repeated keys. A true inverse operation is\n{key: st.query_params.get_all(key) for key st.query_params}.

\n
\n", + "args": [ + { + "name": "params", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A dictionary used to replace the current query parameters.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L173" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -76685,7 +85940,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L110" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -76700,7 +85955,32 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/runtime/state/query_params_proxy.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L145" + }, + "streamlit.query_params.update": { + "name": "update", + "signature": "st.query_params.update(other=(), /, **kwds)", + "description": "

Update one or more values in query_params at once from a dictionary or

\n

dictionary-like object.

\n

See Mapping.update() from Python's collections library.

\n", + "args": [ + { + "name": "other", + "type_name": "SupportsKeysAndGetItem[str, str] | Iterable[tuple[str, str]]", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A dictionary or mapping of strings to strings.

\n", + "default": null + }, + { + "name": "**kwds", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional key/value pairs to update passed as keyword arguments.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L88" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -76714,11 +85994,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -76735,11 +86015,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -76755,7 +86035,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L248" }, { "name": "query", @@ -76828,7 +86108,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L122" }, { "name": "reset", @@ -76837,7 +86117,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -76847,7 +86127,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L267" }, { "name": "engine", @@ -76855,7 +86135,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L259" }, { "name": "session", @@ -76864,10 +86144,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L47", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine. Initialize using st.connection("<name>", type="sql").

\n

SQLConnection provides the query() convenience method, which can be used to\nrun simple read-only queries with both caching and simple error handling/retries.\nMore complex DB interactions can be performed by using the .session property\nto receive a regular SQLAlchemy Session.

\n

SQLConnections should always be created using st.connection(), not\ninitialized directly. Connection parameters for a SQLConnection can be specified\nusing either st.secrets or **kwargs. Some frequently used parameters include:

\n
    \n
  • url or arguments for sqlalchemy.engine.URL.create().\nMost commonly it includes a dialect, host, database, username and password.
  • \n
  • create_engine_kwargs can be passed via st.secrets, such as for\nsnowflake-sqlalchemy\nor Google BigQuery.\nThese can also be passed directly as **kwargs to connection().
  • \n
  • autocommit=True to run with isolation level AUTOCOMMIT. Default is False.
  • \n
\n", "args": [], @@ -76884,7 +86164,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L263" }, { "name": "query", @@ -76933,7 +86213,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L120" }, { "name": "reset", @@ -76942,7 +86222,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -76950,7 +86230,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L280" }, { "name": "write_pandas", @@ -76965,7 +86245,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L225" } ], "properties": [ @@ -76975,10 +86255,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L271" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L41", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L41", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -77020,7 +86300,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L97" }, { "name": "reset", @@ -77029,7 +86309,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -77038,7 +86318,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L190" } ], "properties": [ @@ -77049,10 +86329,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L167" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L46", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L46", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -77063,7 +86343,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L248" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -77071,7 +86351,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L267" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -77079,7 +86359,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L259" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -77152,7 +86432,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L122" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -77161,7 +86441,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -77170,7 +86450,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L275" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -77203,7 +86483,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L97" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -77212,7 +86492,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -77221,7 +86501,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L190" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -77230,7 +86510,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L167" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -77238,7 +86518,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L263" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -77287,7 +86567,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L120" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -77295,7 +86575,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L271" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -77304,7 +86584,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -77312,7 +86592,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L280" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -77327,7 +86607,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L225" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -77336,7 +86616,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -77386,7 +86666,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L946" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L948" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -77436,7 +86716,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L787" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -77494,7 +86774,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L604" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L606" }, "streamlit.column_config.Column": { "name": "Column", @@ -77544,7 +86824,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -77634,7 +86914,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1398" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1400" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -77732,7 +87012,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1163" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1165" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -77766,7 +87046,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1027" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -77816,7 +87096,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L865" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L867" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -77893,12 +87173,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", + "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -77932,7 +87212,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1098" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1100" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -78022,7 +87302,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -78080,7 +87360,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1511" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1513" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -78146,7 +87426,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L686" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L688" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -78220,7 +87500,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -78310,7 +87590,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/column_types.py#L1284" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1286" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -78350,7 +87630,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/components/v1/components.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/components/v1/component_registry.py#L45" }, "streamlit.components.v1.html": { "name": "html", @@ -78391,7 +87671,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/iframe.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/iframe.py#L61" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -78432,7 +87712,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -78458,7 +87738,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/arrow.py#L286" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L284" }, "StatusContainer.update": { "name": "update", @@ -78491,7 +87771,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -78520,7 +87800,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L1000" }, { "name": "run", @@ -78544,7 +87824,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L359" }, { "name": "switch_page", @@ -78568,7 +87848,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L381" } ], "properties": [ @@ -78585,7 +87865,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L435" }, { "name": "caption", @@ -78600,7 +87880,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L450" }, { "name": "chat_input", @@ -78615,7 +87895,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L464" }, { "name": "chat_message", @@ -78630,7 +87910,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L478" }, { "name": "checkbox", @@ -78645,7 +87925,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L492" }, { "name": "code", @@ -78660,7 +87940,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L506" }, { "name": "color_picker", @@ -78675,7 +87955,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L520" }, { "name": "columns", @@ -78690,7 +87970,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L534" }, { "name": "dataframe", @@ -78705,7 +87985,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L551" }, { "name": "date_input", @@ -78720,7 +88000,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L565" }, { "name": "divider", @@ -78735,7 +88015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L579" }, { "name": "error", @@ -78750,7 +88030,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L593" }, { "name": "exception", @@ -78765,7 +88045,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L607" }, { "name": "expander", @@ -78780,7 +88060,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L621" }, { "name": "header", @@ -78795,7 +88075,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L635" }, { "name": "info", @@ -78810,7 +88090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L649" }, { "name": "json", @@ -78825,7 +88105,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L663" }, { "name": "latex", @@ -78840,7 +88120,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L677" }, { "name": "main", @@ -78855,7 +88135,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L409" }, { "name": "markdown", @@ -78870,7 +88150,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L691" }, { "name": "metric", @@ -78885,7 +88165,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L705" }, { "name": "multiselect", @@ -78900,7 +88180,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L719" }, { "name": "number_input", @@ -78915,7 +88195,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L733" }, { "name": "radio", @@ -78930,7 +88210,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L747" }, { "name": "select_slider", @@ -78945,7 +88225,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L761" }, { "name": "selectbox", @@ -78960,7 +88240,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L775" }, { "name": "sidebar", @@ -78975,7 +88255,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L422" }, { "name": "slider", @@ -78990,7 +88270,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L789" }, { "name": "status", @@ -79005,7 +88285,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L831" }, { "name": "subheader", @@ -79020,7 +88300,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L803" }, { "name": "success", @@ -79035,7 +88315,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L817" }, { "name": "table", @@ -79050,7 +88330,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L845" }, { "name": "tabs", @@ -79065,7 +88345,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L859" }, { "name": "text", @@ -79080,7 +88360,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L879" }, { "name": "text_area", @@ -79095,7 +88375,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L893" }, { "name": "text_input", @@ -79110,7 +88390,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L907" }, { "name": "time_input", @@ -79125,7 +88405,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L921" }, { "name": "title", @@ -79140,7 +88420,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L935" }, { "name": "toast", @@ -79155,7 +88435,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L949" }, { "name": "toggle", @@ -79170,7 +88450,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L963" }, { "name": "warning", @@ -79185,10 +88465,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L977" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L92", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L92", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -79228,7 +88508,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L435" }, "AppTest.caption": { "name": "caption", @@ -79243,7 +88523,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L450" }, "AppTest.chat_input": { "name": "chat_input", @@ -79258,7 +88538,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L464" }, "AppTest.chat_message": { "name": "chat_message", @@ -79273,7 +88553,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L478" }, "AppTest.checkbox": { "name": "checkbox", @@ -79288,7 +88568,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L492" }, "AppTest.code": { "name": "code", @@ -79303,7 +88583,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L506" }, "AppTest.color_picker": { "name": "color_picker", @@ -79318,7 +88598,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L520" }, "AppTest.columns": { "name": "columns", @@ -79333,7 +88613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L534" }, "AppTest.dataframe": { "name": "dataframe", @@ -79348,7 +88628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L551" }, "AppTest.date_input": { "name": "date_input", @@ -79363,7 +88643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L565" }, "AppTest.divider": { "name": "divider", @@ -79378,7 +88658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L579" }, "AppTest.error": { "name": "error", @@ -79393,7 +88673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L593" }, "AppTest.exception": { "name": "exception", @@ -79408,7 +88688,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L607" }, "AppTest.expander": { "name": "expander", @@ -79423,7 +88703,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L621" }, "AppTest.from_file": { "name": "from_file", @@ -79455,7 +88735,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L262" }, "AppTest.from_function": { "name": "from_function", @@ -79503,7 +88783,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L215" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L215" }, "AppTest.from_string": { "name": "from_string", @@ -79535,7 +88815,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L172" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L172" }, "AppTest.get": { "name": "get", @@ -79559,7 +88839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L1000" }, "AppTest.header": { "name": "header", @@ -79574,7 +88854,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L635" }, "AppTest.info": { "name": "info", @@ -79589,7 +88869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L649" }, "AppTest.json": { "name": "json", @@ -79604,7 +88884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L663" }, "AppTest.latex": { "name": "latex", @@ -79619,7 +88899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L677" }, "AppTest.main": { "name": "main", @@ -79634,7 +88914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L409" }, "AppTest.markdown": { "name": "markdown", @@ -79649,7 +88929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L691" }, "AppTest.metric": { "name": "metric", @@ -79664,7 +88944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L705" }, "AppTest.multiselect": { "name": "multiselect", @@ -79679,7 +88959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L719" }, "AppTest.number_input": { "name": "number_input", @@ -79694,7 +88974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L733" }, "AppTest.radio": { "name": "radio", @@ -79709,7 +88989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L747" }, "AppTest.run": { "name": "run", @@ -79733,7 +89013,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L359" }, "AppTest.select_slider": { "name": "select_slider", @@ -79748,7 +89028,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L761" }, "AppTest.selectbox": { "name": "selectbox", @@ -79763,7 +89043,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L775" }, "AppTest.sidebar": { "name": "sidebar", @@ -79778,7 +89058,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L422" }, "AppTest.slider": { "name": "slider", @@ -79793,7 +89073,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L789" }, "AppTest.status": { "name": "status", @@ -79808,7 +89088,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L831" }, "AppTest.subheader": { "name": "subheader", @@ -79823,7 +89103,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L803" }, "AppTest.success": { "name": "success", @@ -79838,7 +89118,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L817" }, "AppTest.switch_page": { "name": "switch_page", @@ -79862,7 +89142,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L381" }, "AppTest.table": { "name": "table", @@ -79877,7 +89157,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L845" }, "AppTest.tabs": { "name": "tabs", @@ -79892,7 +89172,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L859" }, "AppTest.text": { "name": "text", @@ -79907,7 +89187,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L879" }, "AppTest.text_area": { "name": "text_area", @@ -79922,7 +89202,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L893" }, "AppTest.text_input": { "name": "text_input", @@ -79937,7 +89217,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L907" }, "AppTest.time_input": { "name": "time_input", @@ -79952,7 +89232,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L921" }, "AppTest.title": { "name": "title", @@ -79967,7 +89247,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L935" }, "AppTest.toast": { "name": "toast", @@ -79982,7 +89262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L949" }, "AppTest.toggle": { "name": "toggle", @@ -79997,7 +89277,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L963" }, "AppTest.warning": { "name": "warning", @@ -80012,7 +89292,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L977" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -80025,7 +89305,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L344" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L344" }, { "name": "run", @@ -80042,7 +89322,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80050,7 +89330,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L339" } ], "properties": [ @@ -80060,10 +89340,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L329" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L329" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L306", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L306", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -80088,7 +89368,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80096,7 +89376,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L361" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L361" } ], "properties": [ @@ -80106,10 +89386,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L374" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L349", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L349", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -80125,7 +89405,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L422" }, { "name": "run", @@ -80142,7 +89422,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80150,7 +89430,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "uncheck", @@ -80158,7 +89438,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L426" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L426" } ], "properties": [ @@ -80168,10 +89448,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L407" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L407" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L385", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L385", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -80187,7 +89467,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L494" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L494" }, { "name": "run", @@ -80204,7 +89484,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80212,7 +89492,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L489" } ], "properties": [ @@ -80222,10 +89502,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L468" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L453", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L453", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -80250,7 +89530,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80258,7 +89538,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L540" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L540" } ], "properties": [ @@ -80268,10 +89548,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L554" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L554" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L520", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L520", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -80296,7 +89576,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" } ], "properties": [ @@ -80306,10 +89586,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -80334,7 +89614,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -80342,7 +89622,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L757" }, { "name": "set_value", @@ -80350,7 +89630,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L751" }, { "name": "unselect", @@ -80358,7 +89638,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L772" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L772" } ], "properties": [ @@ -80368,7 +89648,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L745" }, { "name": "indices", @@ -80376,7 +89656,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L740" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L740" }, { "name": "value", @@ -80384,10 +89664,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L730" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L730" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L701", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L701", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -80403,7 +89683,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L845" }, { "name": "increment", @@ -80411,7 +89691,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L837" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L837" }, { "name": "run", @@ -80428,7 +89708,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80436,7 +89716,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L812" } ], "properties": [ @@ -80446,10 +89726,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L825" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L792", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L792", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -80474,7 +89754,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80482,7 +89762,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L896" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L896" } ], "properties": [ @@ -80492,7 +89772,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L890" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L890" }, { "name": "index", @@ -80500,7 +89780,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L873" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L873" }, { "name": "value", @@ -80508,10 +89788,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L880" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L880" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L854", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L854", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -80536,7 +89816,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -80544,7 +89824,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1042" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1042" }, { "name": "set_value", @@ -80552,7 +89832,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1004" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1004" } ], "properties": [ @@ -80562,7 +89842,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1036" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1036" }, { "name": "value", @@ -80570,10 +89850,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1025" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1025" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L986", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L986", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -80598,7 +89878,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -80606,7 +89886,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "select_index", @@ -80614,7 +89894,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L967" }, { "name": "set_value", @@ -80622,7 +89902,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L958" } ], "properties": [ @@ -80632,7 +89912,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L952" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L952" }, { "name": "index", @@ -80640,7 +89920,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L932" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L932" }, { "name": "value", @@ -80648,10 +89928,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L942" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L942" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L914", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L914", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -80676,7 +89956,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -80684,7 +89964,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1095" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1095" }, { "name": "set_value", @@ -80692,7 +89972,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1066" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1066" } ], "properties": [ @@ -80702,10 +89982,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1084" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1084" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1047", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1047", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -80721,7 +90001,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "run", @@ -80738,7 +90018,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80746,7 +90026,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1152" } ], "properties": [ @@ -80756,10 +90036,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1134", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1134", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -80775,7 +90055,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1229" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1229" }, { "name": "run", @@ -80792,7 +90072,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80800,7 +90080,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1205" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1205" } ], "properties": [ @@ -80810,10 +90090,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1218" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1218" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1187", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1187", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -80829,7 +90109,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1294" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1294" }, { "name": "increment", @@ -80837,7 +90117,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1287" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1287" }, { "name": "run", @@ -80854,7 +90134,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80862,7 +90142,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1259" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1259" } ], "properties": [ @@ -80872,10 +90152,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1275" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1243", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1243", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -80900,7 +90180,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80908,7 +90188,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1351" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1351" } ], "properties": [ @@ -80918,10 +90198,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1341" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1341" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L1318", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1318", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -80946,7 +90226,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -80954,7 +90234,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L195" } ], "properties": [ @@ -80964,10 +90244,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/testing/v1/element_tree.py#L180", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L180", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -80985,7 +90265,33 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L84" + }, + "CachedFunc.clear": { + "name": "clear", + "signature": "CachedFunc.clear(*args, **kwargs)", + "example": "
\n
\nimport streamlit as st\nimport time\n\n@st.cache_data\ndef foo(bar):\n    time.sleep(2)\n    st.write(f"Executed foo({bar}).")\n    return bar\n\nif st.button("Clear all cached values for `foo`", on_click=foo.clear):\n    foo.clear()\n\nif st.button("Clear the cached value of `foo(1)`"):\n    foo.clear(1)\n\nfoo(1)\nfoo(2)\n
\n
\n", + "description": "

Clear the cached function's associated cache.

\n

If no arguments are passed, Streamlit will clear all values cached for\nthe function. If arguments are passed, Streamlit will clear the cached\nvalue for these arguments only.

\n", + "args": [ + { + "name": "*args", + "type_name": "Any", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Arguments of the cached functions.

\n", + "default": null + }, + { + "name": "**kwargs", + "type_name": "Any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Keyword arguments of the cached function.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_utils.py#L306" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -81005,11 +90311,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.33.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -81023,46 +90329,77 @@ "returns": [] } }, - "1.34.0": { + "1.35.0": { "streamlit.altair_chart": { "name": "altair_chart", - "signature": "st.altair_chart(altair_chart, use_container_width=False, theme=\"streamlit\")", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c, use_container_width=True)\n
\n\n \n

Examples of Altair charts can be found at\nhttps://altair-viz.github.io/gallery/.

\n
\n", - "description": "

Display a chart using the Altair library.

\n", + "signature": "st.altair_chart(altair_chart, *, use_container_width=False, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c, use_container_width=True)\n
\n
\n", + "description": "

Display a chart using the Vega-Altair library.

\n

Vega-Altair is a declarative\nstatistical visualization library for Python, based on Vega and\nVega-Lite.

\n", "args": [ { "name": "altair_chart", "type_name": "altair.Chart", "is_optional": false, "is_kwarg_only": false, - "description": "

The Altair chart object to display.

\n", + "description": "

The Altair chart object to display. See\nhttps://altair-viz.github.io/gallery/ for examples of graph\ndescriptions.

\n", "default": null }, { "name": "use_container_width", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over Altair's native width value.

\n", + "is_kwarg_only": true, + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null }, { "name": "theme", "type_name": "\"streamlit\" or None", "is_optional": false, - "is_kwarg_only": false, - "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", + "is_kwarg_only": true, + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", "default": "behavior" + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use for giving this element a stable\nidentity. If key is None (default), this element's identity\nwill be determined based on the values of the other parameters.

\n

Additionally, if selections are activated and key is provided,\nStreamlit will register the key in Session State to store the\nselection state. The selection state is read-only.

\n", + "default": null + }, + { + "name": "on_select", + "type_name": "\"ignore\", \"rerun\", or callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.altair_chart will return\nthe selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.altair_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the object passed to altair_chart must\ninclude selection paramters. To learn about defining interactions\nin Altair and how to declare selection-type parameters, see\nInteractive Charts\nin Altair's documentation.

\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "str or Iterable of str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection parameters Streamlit should use. If\nselection_mode is None (default), Streamlit will use all\nselection parameters defined in the chart's Altair spec.

\n

When Streamlit uses a selection parameter, selections from that\nparameter will trigger a rerun and be included in the selection\nstate. When Streamlit does not use a selection parameter,\nselections from that parameter will not trigger a rerun and not be\nincluded in the selection state.

\n

Selection parameters are identified by their name property.

\n", + "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L745" + "returns": [ + { + "type_name": "element or dict", + "is_generator": false, + "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1288" }, "streamlit.area_chart": { "name": "area_chart", - "signature": "st.area_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.area_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", - "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "signature": "st.area_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.area_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", @@ -81098,18 +90435,18 @@ }, { "name": "width", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", "default": null }, { "name": "height", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", "default": null }, { @@ -81117,17 +90454,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L729" }, "streamlit.audio": { "name": "audio", "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False, autoplay=False)", - "examples": "
\n

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n\n \n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n\n \n
\n", + "examples": "
\n

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n
\n", "description": "

Display an audio player.

\n", "args": [ { @@ -81188,7 +90525,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/media.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/media.py#L64" }, "streamlit.balloons": { "name": "balloons", @@ -81197,13 +90534,13 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", - "signature": "st.bar_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", - "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "signature": "st.bar_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", @@ -81239,18 +90576,18 @@ }, { "name": "width", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", "default": null }, { "name": "height", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", "default": null }, { @@ -81258,18 +90595,18 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L411" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L901" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", "signature": "st.bokeh_chart(figure, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(\n    title='simple line example',\n    x_axis_label='x',\n    y_axis_label='y')\n\np.line(x, y, legend_label='Trend', line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n\n \n
\n", - "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n", + "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(\n    title='simple line example',\n    x_axis_label='x',\n    y_axis_label='y')\n\np.line(x, y, legend_label='Trend', line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n
\n", + "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n", "args": [ { "name": "figure", @@ -81284,17 +90621,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over Bokeh's native width value.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -81378,7 +90715,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L67" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L67" }, "streamlit.cache": { "name": "cache", @@ -81452,7 +90789,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/legacy_caching/caching.py#L431" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/legacy_caching/caching.py#L431" }, "streamlit.cache_data": { "name": "cache_data", @@ -81518,7 +90855,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -81584,7 +90921,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.camera_input": { "name": "camera_input", @@ -81665,7 +91002,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/camera_input.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/camera_input.py#L83" }, "streamlit.caption": { "name": "caption", @@ -81699,12 +91036,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L151" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L151" }, "streamlit.chat_input": { "name": "chat_input", "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, disabled=False, on_submit=None, args=None, kwargs=None)", - "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n\n \n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc). Create chat\ninterfaces embedded next to other content or have multiple chat bots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n\n \n
\n", + "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc). Create chat\ninterfaces embedded next to other content or have multiple chat bots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n
\n", "description": "

Display a chat input widget.

\n", "args": [ { @@ -81772,12 +91109,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/chat.py#L231" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/chat.py#L231" }, "streamlit.chat_message": { "name": "chat_message", "signature": "st.chat_message(name, *, avatar=None)", - "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n\n \n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n\n \n
\n", + "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n
\n", "description": "

Insert a chat message container.

\n

To add elements to the returned container, you can use with notation\n(preferred) or just call methods directly on the returned object. See the\nexamples below.

\n", "args": [ { @@ -81805,12 +91142,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/chat.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/chat.py#L120" }, "streamlit.checkbox": { "name": "checkbox", "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n
\n", "description": "

Display a checkbox widget.

\n", "args": [ { @@ -81894,7 +91231,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/checkbox.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/checkbox.py#L56" }, "streamlit.code": { "name": "code", @@ -81928,12 +91265,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n
\n", "description": "

Display a color picker widget.

\n", "args": [ { @@ -82017,12 +91354,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/color_picker.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/color_picker.py#L56" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\")", - "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n
\n", "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", "args": [ { @@ -82050,7 +91387,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L145" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L145" }, "streamlit.connection": { "name": "connection", @@ -82107,12 +91444,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.container": { "name": "container", "signature": "st.container(*, height=None, border=None)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n\n \n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n\n \n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n\n \n
\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n
\n", "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ { @@ -82133,12 +91470,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L34" }, "streamlit.data_editor": { "name": "data_editor", "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n
\n", "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", "args": [ { @@ -82154,7 +91491,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the data editor expressed in pixels. If None, the width will\nbe automatically determined.

\n", + "description": "

Desired width of the data editor expressed in pixels. If width\nis None (default), Streamlit sets the data editor width to fit\nits contents up to the width of the parent container. If width\nis greater than the width of the parent container, Streamlit sets\nthe data editor width to match the width of the parent container.

\n", "default": null }, { @@ -82162,7 +91499,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the data editor expressed in pixels. If None, the height will\nbe automatically determined.

\n", + "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accomodate all rows.

\n", "default": null }, { @@ -82170,15 +91507,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the data editor width to the width of the parent container.\nThis takes precedence over the width argument. Defaults to False.

\n", - "default": "False" + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the data editor's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe data editor to match the width of the parent container.

\n", + "default": null }, { "name": "hide_index", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "description": "

Whether to hide the index column(s). If hide_index is None\n(default), the visibility of index columns is automatically\ndetermined based on the data.

\n", "default": null }, { @@ -82254,20 +91591,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/data_editor.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/data_editor.py#L577" }, "streamlit.dataframe": { "name": "dataframe", - "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n\n \n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n\n \n

Or you can customize the dataframe via column_config, hide_index, or column_order:

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\")", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Or you can customize the dataframe via column_config, hide_index, or column_order:

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Display a dataframe as an interactive table.

\n

This command works with dataframes from Pandas, PyArrow, Snowpark, and PySpark.\nIt can also display several other types that can be converted to dataframes,\ne.g. numpy arrays, lists, sets and dictionaries.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to display.

\n

If 'data' is a pandas.Styler, it will be used to style its\nunderlying DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\npandas styling features, like bar charts, hovering, and captions.

\n", + "description": "

The data to display.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\npandas styling features, like bar charts, hovering, and captions.

\n", "default": null }, { @@ -82275,7 +91612,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired width of the dataframe expressed in pixels. If None, the width\nwill be automatically calculated based on the column content.

\n", + "description": "

Desired width of the dataframe expressed in pixels. If width is\nNone (default), Streamlit sets the dataframe width to fit its\ncontents up to the width of the parent container. If width is\ngreater than the width of the parent container, Streamlit sets the\ndataframe width to match the width of the parent container.

\n", "default": null }, { @@ -82283,15 +91620,15 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired height of the dataframe expressed in pixels. If None, a\ndefault height is used.

\n", - "default": "height" + "description": "

Desired height of the dataframe expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the dataframe element is\nenabled when the height does not accomodate all rows.

\n", + "default": null }, { "name": "use_container_width", "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the dataframe width to the width of the parent container.\nThis takes precedence over the width argument.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the dataframe's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe dataframe to match the width of the parent container.

\n", "default": null }, { @@ -82299,7 +91636,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "description": "

Whether to hide the index column(s). If hide_index is None\n(default), the visibility of index columns is automatically\ndetermined based on the data.

\n", "default": null }, { @@ -82307,7 +91644,7 @@ "type_name": "Iterable of str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", + "description": "

The ordered list of columns to display. If column_order is\nNone (default), Streamlit displays all columns in the order\ninherited from the underlying data structure. If column_order\nis a list, the indicated columns will display in the order they\nappear within the list. Columns may be omitted or repeated within\nthe list.

\n

For example, column_order=("col2", "col1") will display\n"col2" first, followed by "col1", and will hide all other\nnon-index columns.

\n", "default": null }, { @@ -82315,17 +91652,48 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat. This needs to be a dictionary where each key is a column name and\nthe value is one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use for giving this element a stable\nidentity. If key is None (default), this element's identity\nwill be determined based on the values of the other parameters.

\n

Additionally, if selections are activated and key is provided,\nStreamlit will register the key in Session State to store the\nselection state. The selection state is read-only.

\n", + "default": null + }, + { + "name": "on_select", + "type_name": "\"ignore\" or \"rerun\" or callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

How the dataframe should respond to user selection events. This\ncontrols whether or not the dataframe behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the dataframe. The dataframe will not behave like an\ninput widget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\nrows or columns in the dataframe. In this case, st.dataframe\nwill return the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.dataframe will return the selection data\nas a dictionary.
  • \n
\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "\"single-row\", \"multi-row\", single-column\", \"multi-column\", or Iterable of these", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The types of selections Streamlit should allow. This can be one of\nthe following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L56" + "returns": [ + { + "type_name": "element or dict", + "is_generator": false, + "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the dataframe element that can be used\nwith the .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the DataframeState\ndictionary schema.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L260" }, "streamlit.date_input": { "name": "date_input", "signature": "st.date_input(label, value=\"default_value_today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n\n \n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n\n \n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n\n \n
\n", + "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n
\n", "description": "

Display a date input widget.

\n", "args": [ { @@ -82433,7 +91801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/time_widgets.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/time_widgets.py#L515" }, "streamlit.divider": { "name": "divider", @@ -82442,12 +91810,12 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L266" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n\n \n
\n", + "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n", "args": [ { @@ -82555,7 +91923,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L179" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L179" }, "streamlit.echo": { "name": "echo", @@ -82573,7 +91941,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -82582,7 +91950,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -82608,7 +91976,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -82626,12 +91994,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/exception.py#L50" }, "streamlit.expander": { "name": "expander", "signature": "st.expander(label, expanded=False)", - "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n
\n", "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", "args": [ { @@ -82652,7 +92020,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L387" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L387" }, "streamlit.experimental_connection": { "name": "experimental_connection", @@ -82709,12 +92077,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/connection_factory.py#L203" }, "streamlit.experimental_data_editor": { "name": "experimental_data_editor", "signature": "st.experimental_data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n
\n", "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", "args": [ { @@ -82730,7 +92098,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the data editor expressed in pixels. If None, the width will\nbe automatically determined.

\n", + "description": "

Desired width of the data editor expressed in pixels. If width\nis None (default), Streamlit sets the data editor width to fit\nits contents up to the width of the parent container. If width\nis greater than the width of the parent container, Streamlit sets\nthe data editor width to match the width of the parent container.

\n", "default": null }, { @@ -82738,7 +92106,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the data editor expressed in pixels. If None, the height will\nbe automatically determined.

\n", + "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accomodate all rows.

\n", "default": null }, { @@ -82746,15 +92114,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the data editor width to the width of the parent container.\nThis takes precedence over the width argument. Defaults to False.

\n", - "default": "False" + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the data editor's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe data editor to match the width of the parent container.

\n", + "default": null }, { "name": "hide_index", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to hide the index column(s). If None (default), the visibility of\nindex columns is automatically determined based on the data.

\n", + "description": "

Whether to hide the index column(s). If hide_index is None\n(default), the visibility of index columns is automatically\ndetermined based on the data.

\n", "default": null }, { @@ -82830,12 +92198,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/data_editor.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/data_editor.py#L577" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", - "signature": "st.experimental_dialog(title=\"\", *, width=\"small\")", - "examples": "
\n

The following example demonstrates the basic usage of @st.experimental_dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.experimental_dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n\n \n
\n", + "signature": "st.experimental_dialog(title, *, width=\"small\")", + "examples": "
\n

The following example demonstrates the basic usage of @st.experimental_dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.experimental_dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n
\n", "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.experimental_dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing``ESC`` on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.experimental_dialog inherits behavior from st.experimental_fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

A dialog may not open another dialog. Only one dialog function may be\ncalled in a script run, which means that only one dialog can be open at\nany given time.

\n
\n", "args": [ { @@ -82856,12 +92224,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/dialog_decorator.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/dialog_decorator.py#L93" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", "signature": "st.experimental_fragment(func=None, *, run_every=None)", - "examples": "
\n

The following example demonstrates basic usage of @st.experimental_fragment. In\nthis app, clicking "Rerun full script" will increment both counters and\nupdate all values displayed in the app. In contrast, clicking "Rerun fragment"\nwill only increment the counter within the fragment. In this case, the\nst.write command inside the fragment will update the app's frontend,\nbut the two st.write commands outside the fragment will not update the\nfrontend.

\n
\nimport streamlit as st\n\nif "script_runs" not in st.session_state:\n    st.session_state.script_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.script_runs += 1\nfragment()\nst.button("Rerun full script")\nst.write(f"Full script says it ran {st.session_state.script_runs} times.")\nst.write(f"Full script sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n\n \n

You can also trigger a full-script rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n\n \n
\n", + "examples": "
\n

The following example demonstrates basic usage of @st.experimental_fragment. In\nthis app, clicking "Rerun full script" will increment both counters and\nupdate all values displayed in the app. In contrast, clicking "Rerun fragment"\nwill only increment the counter within the fragment. In this case, the\nst.write command inside the fragment will update the app's frontend,\nbut the two st.write commands outside the fragment will not update the\nfrontend.

\n
\nimport streamlit as st\n\nif "script_runs" not in st.session_state:\n    st.session_state.script_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.script_runs += 1\nfragment()\nst.button("Rerun full script")\nst.write(f"Full script says it ran {st.session_state.script_runs} times.")\nst.write(f"Full script sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger a full-script rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", "description": "

Decorator to turn a function into a fragment which can rerun independently of the full script.

\n

When a user interacts with an input widget created by a fragment, Streamlit\nonly reruns the fragment instead of the full script. If run_every is set,\nStreamlit will also rerun the fragment at the specified interval while the\nsession is active, even if the user is not interacting with your app.

\n

To trigger a full script rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each full-script rerun. The rest of the app is\npersisted during a fragment rerun. When a fragment renders elements into\nexternally created containers, the elements will not be cleared with each\nfragment rerun. In this case, elements will accumulate in those containers\nwith each fragment rerun, until the next full-script rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n", "args": [ { @@ -82882,7 +92250,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/fragment.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/fragment.py#L116" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -82898,7 +92266,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_memo": { "name": "experimental_memo", @@ -82964,7 +92332,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.experimental_rerun": { "name": "experimental_rerun", @@ -82972,7 +92340,7 @@ "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L82" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -82990,7 +92358,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.experimental_singleton": { "name": "experimental_singleton", @@ -83056,12 +92424,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n\n \n
\n", + "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n
\n", "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration#set-configuration-options

\n", "args": [ { @@ -83153,12 +92521,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/file_uploader.py#L229" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/file_uploader.py#L229" }, "streamlit.form": { "name": "form", "signature": "st.form(key, clear_on_submit=False, *, border=True)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n\n \n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n\n \n
\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n
\n", "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ { @@ -83187,7 +92555,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/form.py#L115" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -83267,7 +92635,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/form.py#L230" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/form.py#L230" }, "streamlit.get_option": { "name": "get_option", @@ -83284,12 +92652,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/config.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/config.py#L130" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge('run', 'intr')\ngraph.edge('intr', 'runbl')\ngraph.edge('runbl', 'run')\ngraph.edge('run', 'kernel')\ngraph.edge('kernel', 'zombie')\ngraph.edge('kernel', 'sleep')\ngraph.edge('kernel', 'runmem')\ngraph.edge('sleep', 'swap')\ngraph.edge('swap', 'runswap')\ngraph.edge('runswap', 'new')\ngraph.edge('runswap', 'runmem')\ngraph.edge('new', 'runmem')\ngraph.edge('sleep', 'runmem')\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge('run', 'intr')\ngraph.edge('intr', 'runbl')\ngraph.edge('runbl', 'run')\ngraph.edge('run', 'kernel')\ngraph.edge('kernel', 'zombie')\ngraph.edge('kernel', 'sleep')\ngraph.edge('kernel', 'runmem')\ngraph.edge('sleep', 'swap')\ngraph.edge('swap', 'runswap')\ngraph.edge('runswap', 'new')\ngraph.edge('runswap', 'runmem')\ngraph.edge('new', 'runmem')\ngraph.edge('sleep', 'runmem')\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n
\n", "description": "

Display a graph using the dagre-d3 library.

\n", "args": [ { @@ -83305,17 +92673,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the figure's native width value.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/graphviz_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/graphviz_chart.py#L39" }, "streamlit.header": { "name": "header", "signature": "st.header(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.header('This is a header with a divider', divider='rainbow')\nst.header('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.header('This is a header with a divider', divider='rainbow')\nst.header('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", "description": "

Display text in header formatting.

\n", "args": [ { @@ -83352,12 +92720,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", "signature": "st.help(obj=)", - "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n\n \n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog('poodle', 'white')\n\nst.help(fido)\n
\n\n \n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n\n \n
\n", + "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog('poodle', 'white')\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ { @@ -83370,12 +92738,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", "signature": "st.html(body)", - "example": "
\n
\nimport streamlit as st\n\ncode = """\n<style>\n    p {\n        color: red;\n    }\n</style>\n"""\nst.html(code)\nst.markdown("Lorem ipsum")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ncode = """\n<style>\n    p {\n        color: red;\n    }\n</style>\n"""\nst.html(code)\nst.markdown("Lorem ipsum")\n
\n
\n", "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", "args": [ { @@ -83388,12 +92756,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\")", - "example": "
\n
\nimport streamlit as st\nst.image('sunrise.jpg', caption='Sunrise by the mountains')\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\nst.image('sunrise.jpg', caption='Sunrise by the mountains')\n
\n
\n", "description": "

Display an image or list of images.

\n", "args": [ { @@ -83454,7 +92822,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -83480,12 +92848,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", "signature": "st.json(body, *, expanded=True)", - "example": "
\n
\nimport streamlit as st\n\nst.json({\n    'foo': 'bar',\n    'baz': 'boz',\n    'stuff': [\n        'stuff 1',\n        'stuff 2',\n        'stuff 3',\n        'stuff 5',\n    ],\n})\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.json({\n    'foo': 'bar',\n    'baz': 'boz',\n    'stuff': [\n        'stuff 1',\n        'stuff 2',\n        'stuff 3',\n        'stuff 5',\n    ],\n})\n
\n
\n", "description": "

Display object or string as a pretty-printed JSON string.

\n", "args": [ { @@ -83506,7 +92874,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/json.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/json.py#L37" }, "streamlit.latex": { "name": "latex", @@ -83532,13 +92900,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L218" }, "streamlit.line_chart": { "name": "line_chart", - "signature": "st.line_chart(data=None, *, x=None, y=None, color=None, width=0, height=0, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.line_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n\n \n
\n", - "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", + "signature": "st.line_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.line_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", @@ -83574,18 +92942,18 @@ }, { "name": "width", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", "default": null }, { "name": "height", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", "default": null }, { @@ -83593,17 +92961,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L557" }, "streamlit.link_button": { "name": "link_button", "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", disabled=False, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n
\n", "description": "

Display a link button element.

\n

When clicked, a new tab will be opened to the specified URL. This will\ncreate a new session for the user if directed within the app.

\n", "args": [ { @@ -83656,12 +93024,46 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L352" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L352" + }, + "streamlit.logo": { + "name": "logo", + "signature": "st.logo(image, *, link=None, icon_image=None)", + "examples": "

A common design practice is to use a wider logo in the sidebar, and a\nsmaller, icon-styled logo in your app's main body.

\n
\nimport streamlit as st\n\nst.logo(LOGO_URL_LARGE, link="https://streamlit.io/gallery", icon_image=LOGO_URL_SMALL)\n
\n

Try switching logos around in the following example:

\n
\nimport streamlit as st\n\nHORIZONTAL_RED = "images/horizontal_red.png"\nICON_RED = "images/icon_red.png"\nHORIZONTAL_BLUE = "images/horizontal_blue.png"\nICON_BLUE = "images/icon_blue.png"\n\noptions = [HORIZONTAL_RED, ICON_RED, HORIZONTAL_BLUE, ICON_BLUE]\nsidebar_logo = st.selectbox("Sidebar logo", options, 0)\nmain_body_logo = st.selectbox("Main body logo", options, 1)\n\nst.logo(sidebar_logo, icon_image=main_body_logo)\nst.sidebar.markdown("Hi!")\n
\n", + "description": "

Renders a logo in the upper-left corner of your app and its sidebar.

\n

If st.logo is called multiple times within a page, Streamlit will\nrender the image passed in the last call. For the most consistent results,\ncall st.logo early in your page script and choose an image that works\nwell in both light and dark mode. Avoid empty margins around your image.

\n

If your logo does not work well for both light and dark mode, consider\nsetting the theme and hiding the settings menu from users with the\nconfiguration option\nclient.toolbarMode="minimal".

\n", + "args": [ + { + "name": "image", + "type_name": "Anything supported by st.image", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The image to display in the upper-left corner of your app and its\nsidebar. If icon_image is also provided, then Streamlit will only\ndisplay image in the sidebar.

\n

Streamlit scales the image to a height of 24 pixels and a maximum\nwidth of 240 pixels. Use images with an aspect ratio of 10:1 or less to\navoid distortion.

\n", + "default": null + }, + { + "name": "link", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The external URL to open when a user clicks on the logo. The URL must\nstart with "http://" or "https://". If link is None (default),\nthe logo will not include a hyperlink.

\n", + "default": null + }, + { + "name": "icon_image", + "type_name": "Anything supported by st.image or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An alternate image to replace image in the upper-left corner of the\napp's main body. If icon_image is None (default), Streamlit\nwill render image in the upper-left corner of the app and its\nsidebar. Otherwise, Streamlit will render icon_image in the\nupper-left corner of the app and image in the upper-left corner\nof the sidebar.

\n

Streamlit scales the image to a height of 24 pixels and a maximum\nwidth of 240 pixels. Use images with an aspect ratio of 10:1 or less to\navoid distortion.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/logo.py#L36" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=['lat', 'lon'])\n\nst.map(df)\n
\n\n \n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color='#0044ff')\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n    "col1": np.random.randn(1000) / 50 + 37.76,\n    "col2": np.random.randn(1000) / 50 + -122.4,\n    "col3": np.random.randn(1000) * 100,\n    "col4": np.random.rand(1000, 4).tolist(),\n})\n\nst.map(df,\n    latitude='col1',\n    longitude='col2',\n    size='col3',\n    color='col4')\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=['lat', 'lon'])\n\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color='#0044ff')\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n    "col1": np.random.randn(1000) / 50 + 37.76,\n    "col2": np.random.randn(1000) / 50 + -122.4,\n    "col3": np.random.randn(1000) * 100,\n    "col4": np.random.rand(1000, 4).tolist(),\n})\n\nst.map(df,\n    latitude='col1',\n    longitude='col2',\n    size='col3',\n    color='col4')\n
\n
\n", "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", "args": [ { @@ -83717,17 +93119,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "description": "

Whether to override the map's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the map to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/map.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/map.py#L84" }, "streamlit.markdown": { "name": "markdown", "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n
\n", "description": "

Display string formatted as Markdown.

\n", "args": [ { @@ -83756,12 +93158,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n\n \n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n\n \n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5,\n    delta_color="inverse")\n\nst.metric(label="Active developers", value=123, delta=123,\n    delta_color="off")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5,\n    delta_color="inverse")\n\nst.metric(label="Active developers", value=123, delta=123,\n    delta_color="off")\n
\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ { @@ -83814,12 +93216,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/metric.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/metric.py#L48" }, "streamlit.multiselect": { "name": "multiselect", "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"])\n\nst.write("You selected:", options)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"])\n\nst.write("You selected:", options)\n
\n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ { @@ -83935,12 +93337,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/multiselect.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/multiselect.py#L144" }, "streamlit.number_input": { "name": "number_input", "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n\n \n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write("The current number is ", number)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write("The current number is ", number)\n
\n
\n", "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -84064,12 +93466,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/number_input.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/number_input.py#L115" }, "streamlit.page_link": { "name": "page_link", "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n\n \n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n
\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ { @@ -84090,11 +93492,11 @@ }, { "name": "icon", - "type_name": "str", + "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional argument that specifies an emoji to use as\nthe icon for the link. Shortcodes are not allowed. Please use a\nsingle character instead. E.g. "\ud83d\udea8", "\ud83d\udd25", "\ud83e\udd16", etc.\nDefaults to None, which means no icon is displayed.

\n", - "default": "s" + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null }, { "name": "help", @@ -84122,20 +93524,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/button.py#L438" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L438" }, "streamlit.plotly_chart": { "name": "plotly_chart", - "signature": "st.plotly_chart(figure_or_data, use_container_width=False, sharing=\"streamlit\", theme=\"streamlit\", **kwargs)", - "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python:

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig, use_container_width=True)\n
\n\n \n
\n", - "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python. The arguments to this function\nclosely follow the ones for Plotly's plot() function. You can find\nmore about Plotly at https://plot.ly/python.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever you\nwould call Plotly's py.plot or py.iplot.

\n", + "signature": "st.plotly_chart(figure_or_data, use_container_width=False, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", + "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig, use_container_width=True)\n
\n
\n", + "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n", "args": [ { "name": "figure_or_data", - "type_name": "plotly.graph_objs.Figure, plotly.graph_objs.Data, dict/list of plotly.graph_objs.Figure/Data", + "type_name": "plotly.graph_objs.Figure, plotly.graph_objs.Data, or dict/list of plotly.graph_objs.Figure/Data", "is_optional": false, "is_kwarg_only": false, - "description": "

See https://plot.ly/python/ for examples of graph descriptions.

\n", + "description": "

The Plotly Figure or Data object to render. See\nhttps://plot.ly/python/ for examples of graph descriptions.

\n", "default": null }, { @@ -84143,41 +93545,64 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the figure's native width value.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null }, { - "name": "sharing", - "type_name": "\"streamlit\", \"private\", \"secret\", or \"public\"", + "name": "theme", + "type_name": "\"streamlit\" or None", "is_optional": false, - "is_kwarg_only": false, - "description": "

Use "streamlit" to insert the plot and all its dependencies\ndirectly in the Streamlit app using plotly's offline mode (default).\nUse any other sharing mode to send the chart to Plotly chart studio, which\nrequires an account. See https://plot.ly/python/chart-studio/ for more information.

\n", + "is_kwarg_only": true, + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", + "default": "behavior" + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use for giving this element a stable\nidentity. If key is None (default), this element's identity\nwill be determined based on the values of the other parameters.

\n

Additionally, if selections are activated and key is provided,\nStreamlit will register the key in Session State to store the\nselection state. The selection state is read-only.

\n", "default": null }, { - "name": "theme", - "type_name": "\"streamlit\" or None", + "name": "on_select", + "type_name": "\"ignore\" or \"rerun\" or callable", "is_optional": false, - "is_kwarg_only": false, - "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", - "default": "behavior" + "is_kwarg_only": true, + "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.plotly_chart will return\nthe selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.plotly_chart will return the selection data\nas a dictionary.
  • \n
\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "\"points\", \"box\", \"lasso\" or an Iterable of these", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection mode of the chart. This can be one of the following:

\n
    \n
  • "points": The chart will allow selections based on individual\ndata points.
  • \n
  • "box": The chart will allow selections based on rectangular\nareas.
  • \n
  • "lasso": The chart will allow selections based on freeform\nareas.
  • \n
  • An Iterable of the above options: The chart will allow\nselections based on the modes specified.
  • \n
\n

All selections modes are activated by default.

\n", + "default": null }, { "name": "**kwargs", "type_name": null, "is_optional": null, "is_kwarg_only": true, - "description": "

Any argument accepted by Plotly's plot() function.

\n", + "description": "

Any argument accepted by Plotly's plot() function.

\n", "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/plotly_chart.py#L74" + "returns": [ + { + "type_name": "element or dict", + "is_generator": false, + "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element. Otherwise, this method\nreturns a dictionary-like object that supports both key and\nattribute notation. The attributes are described by the\nPlotlyState dictionary schema.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L300" }, "streamlit.popover": { "name": "popover", "signature": "st.popover(label, *, help=None, disabled=False, use_container_width=False)", - "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n
\n", "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", "args": [ { @@ -84214,12 +93639,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L485" }, "streamlit.progress": { "name": "progress", "signature": "st.progress(value, text=None)", - "example": "
\n

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n\n \n
\n", + "example": "
\n

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n
\n", "description": "

Display a progress bar.

\n", "args": [ { @@ -84240,12 +93665,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, use_container_width=False)", - "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n   np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n   columns=['lat', 'lon'])\n\nst.pydeck_chart(pdk.Deck(\n    map_style=None,\n    initial_view_state=pdk.ViewState(\n        latitude=37.76,\n        longitude=-122.4,\n        zoom=11,\n        pitch=50,\n    ),\n    layers=[\n        pdk.Layer(\n           'HexagonLayer',\n           data=chart_data,\n           get_position='[lon, lat]',\n           radius=200,\n           elevation_scale=4,\n           elevation_range=[0, 1000],\n           pickable=True,\n           extruded=True,\n        ),\n        pdk.Layer(\n            'ScatterplotLayer',\n            data=chart_data,\n            get_position='[lon, lat]',\n            get_color='[200, 30, 0, 160]',\n            get_radius=200,\n        ),\n    ],\n))\n
\n\n \n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", + "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n   np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n   columns=['lat', 'lon'])\n\nst.pydeck_chart(pdk.Deck(\n    map_style=None,\n    initial_view_state=pdk.ViewState(\n        latitude=37.76,\n        longitude=-122.4,\n        zoom=11,\n        pitch=50,\n    ),\n    layers=[\n        pdk.Layer(\n           'HexagonLayer',\n           data=chart_data,\n           get_position='[lon, lat]',\n           radius=200,\n           elevation_scale=4,\n           elevation_range=[0, 1000],\n           pickable=True,\n           extruded=True,\n        ),\n        pdk.Layer(\n            'ScatterplotLayer',\n            data=chart_data,\n            get_position='[lon, lat]',\n            get_color='[200, 30, 0, 160]',\n            get_radius=200,\n        ),\n    ],\n))\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", "args": [ { @@ -84261,18 +93686,18 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", "notes": "
\n
\n

Note

\n

Deprecation warning. After December 1st, 2020, we will remove the ability\nto specify no arguments in st.pyplot(), as that requires the use of\nMatplotlib's global figure object, which is not thread-safe. So\nplease always pass a figure object as shown in the example section\nabove.

\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", - "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n
\n", "description": "

Display a matplotlib.pyplot figure.

\n", "args": [ { @@ -84288,7 +93713,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, the figure will be cleared after being rendered.\nIf False, the figure will not be cleared after being rendered.\nIf left unspecified, we pick a default based on the value of fig.

\n
    \n
  • If fig is set, defaults to False.
  • \n
  • If fig is not set, defaults to True. This simulates Jupyter's\napproach to matplotlib rendering.
  • \n
\n", + "description": "

If True, the figure will be cleared after being rendered.\nIf False, the figure will not be cleared after being rendered.\nIf left unspecified, we pick a default based on the value of fig.

\n
    \n
  • If fig is set, defaults to False.
  • \n
  • If fig is not set, defaults to True. This simulates Jupyter's\napproach to matplotlib rendering.
  • \n
\n", "default": "based" }, { @@ -84296,8 +93721,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. Defaults to True.

\n", - "default": "s" + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "default": null }, { "name": "**kwargs", @@ -84309,12 +93734,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/pyplot.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/pyplot.py#L35" }, "streamlit.radio": { "name": "radio", "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n\n \n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n
\n", "description": "

Display a radio button widget.

\n", "args": [ { @@ -84430,7 +93855,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/radio.py#L85" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/radio.py#L85" }, "streamlit.rerun": { "name": "rerun", @@ -84438,13 +93863,13 @@ "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L58" }, "streamlit.scatter_chart": { "name": "scatter_chart", - "signature": "st.scatter_chart(data=None, *, x=None, y=None, color=None, size=None, width=0, height=0, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n\n \n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\nchart_data['col4'] = np.random.choice(['A','B','C'], 20)\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y='col2',\n    color='col4',\n    size='col3',\n)\n
\n\n \n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"])\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y=['col2', 'col3'],\n    size='col4',\n    color=['#FF0000', '#0000FF'],  # Optional\n)\n
\n\n \n
\n", - "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's spec. As a result this is easier to use for many "just plot\nthis" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", + "signature": "st.scatter_chart(data=None, *, x=None, y=None, color=None, size=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\nchart_data['col4'] = np.random.choice(['A','B','C'], 20)\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y='col2',\n    color='col4',\n    size='col3',\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"])\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y=['col2', 'col3'],\n    size='col4',\n    color=['#FF0000', '#0000FF'],  # Optional\n)\n
\n
\n", + "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", @@ -84488,18 +93913,18 @@ }, { "name": "width", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart width in pixels. If 0, selects the width automatically.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", "default": null }, { "name": "height", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The chart height in pixels. If 0, selects the height automatically.

\n", + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", "default": null }, { @@ -84507,17 +93932,17 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over the width argument.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_altair.py#L572" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1075" }, "streamlit.select_slider": { "name": "select_slider", "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"])\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"],\n    value=("red", "blue"))\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n\n \n ", + "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"])\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"],\n    value=("red", "blue"))\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n", "description": "

Display a slider widget to select items from a list.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.select_slider and st.slider is that\nselect_slider accepts any datatype and takes an iterable set of\noptions, while st.slider only accepts numerical or date/time data and\ntakes a range as input.

\n", "args": [ { @@ -84617,12 +94042,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/select_slider.py#L106" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/select_slider.py#L106" }, "streamlit.selectbox": { "name": "selectbox", "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"))\n\nst.write("You selected:", option)\n
\n\n \n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"))\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n
\n", "description": "

Display a select widget.

\n", "args": [ { @@ -84730,7 +94155,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/selectbox.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/selectbox.py#L78" }, "streamlit.set_option": { "name": "set_option", @@ -84755,7 +94180,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -84805,12 +94230,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/page_config.py#L119" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/page_config.py#L119" }, "streamlit.slider": { "name": "slider", "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    "Select a range of values",\n    0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    "Select a range of values",\n    0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n
\n", "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -84926,7 +94351,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/slider.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/slider.py#L166" }, "streamlit.snow": { "name": "snow", @@ -84935,7 +94360,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -84953,12 +94378,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", "signature": "st.status(label, *, expanded=False, state=\"running\")", - "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n\n \n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button("Rerun")\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button("Rerun")\n
\n
\n", "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", "args": [ { @@ -84994,7 +94419,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L601" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L601" }, "streamlit.stop": { "name": "stop", @@ -85003,12 +94428,12 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L32" }, "streamlit.subheader": { "name": "subheader", "signature": "st.subheader(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.subheader('This is a subheader with a divider', divider='rainbow')\nst.subheader('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.subheader('This is a subheader with a divider', divider='rainbow')\nst.subheader('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", "description": "

Display text in subheader formatting.

\n", "args": [ { @@ -85045,7 +94470,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L116" }, "streamlit.success": { "name": "success", @@ -85071,12 +94496,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", "signature": "st.switch_page(page)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n\n \n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n
\n", "description": "

Programmatically switch the current page in a multipage app.

\n

When st.switch_page is called, the current page execution stops and\nthe specified page runs as if the user clicked on it in the sidebar\nnavigation. The specified page must be recognized by Streamlit's multipage\narchitecture (your main Python file or a Python file in a pages/\nfolder). Arbitrary Python scripts cannot be passed to st.switch_page.

\n", "args": [ { @@ -85089,12 +94514,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/commands/execution_control.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L98" }, "streamlit.table": { "name": "table", "signature": "st.table(data=None)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5)))\n\nst.table(df)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5)))\n\nst.table(df)\n
\n
\n", "description": "

Display a static table.

\n

This differs from st.dataframe in that the table in this case is\nstatic: its entire contents are laid out directly on the page.

\n", "args": [ { @@ -85107,12 +94532,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L241" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L587" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs)", - "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n\n \n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n\n \n
\n", + "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n
\n", "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", "args": [ { @@ -85132,7 +94557,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/layouts.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L272" }, "streamlit.text": { "name": "text", @@ -85158,12 +94583,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n
\n", "description": "

Display a multi-line text input widget.

\n", "args": [ { @@ -85271,12 +94696,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/text_widgets.py#L385" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/text_widgets.py#L385" }, "streamlit.text_input": { "name": "text_input", "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n
\n", "description": "

Display a single-line text input widget.

\n", "args": [ { @@ -85392,12 +94817,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/text_widgets.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/text_widgets.py#L116" }, "streamlit.time_input": { "name": "time_input", "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00)", - "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n\n \n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n\n \n
\n", + "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n
\n", "description": "

Display a time input widget.

\n", "args": [ { @@ -85489,12 +94914,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/time_widgets.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/time_widgets.py#L290" }, "streamlit.title": { "name": "title", "signature": "st.title(body, anchor=None, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.title('This is a title')\nst.title('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n\n \n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.title('This is a title')\nst.title('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", "description": "

Display text in title formatting.

\n

Each document should have a single st.title(), although this is not\nenforced.

\n", "args": [ { @@ -85523,12 +94948,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/heading.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L189" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -85549,12 +94974,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n\n \n
\n", + "example": "
\n
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n
\n", "description": "

Display a toggle widget.

\n", "args": [ { @@ -85638,13 +95063,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/widgets/checkbox.py#L162" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/checkbox.py#L162" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", - "signature": "st.vega_lite_chart(data=None, spec=None, use_container_width=False, theme=\"streamlit\", **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n\n \n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n
\n", - "description": "

Display a chart using the Vega-Lite library.

\n", + "signature": "st.vega_lite_chart(data=None, spec=None, *, use_container_width=False, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None, **kwargs)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n
\n", + "description": "

Display a chart using the Vega-Lite library.

\n

Vega-Lite is a high-level\ngrammar for defining interactive graphics.

\n", "args": [ { "name": "data", @@ -85659,41 +95084,72 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The Vega-Lite spec for the chart. If the spec was already passed in\nthe previous argument, this must be set to None. See\nhttps://vega.github.io/vega-lite/docs/ for more info.

\n", + "description": "

The Vega-Lite spec for the chart. If spec is None (default),\nStreamlit uses the spec passed in data. You cannot pass a spec\nto both data and spec. See\nhttps://vega.github.io/vega-lite/docs/ for more info.

\n", "default": null }, { "name": "use_container_width", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, - "description": "

If True, set the chart width to the column width. This takes\nprecedence over Vega-Lite's native width value.

\n", + "is_kwarg_only": true, + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null }, { "name": "theme", "type_name": "\"streamlit\" or None", "is_optional": false, - "is_kwarg_only": false, - "description": "

The theme of the chart. Currently, we only support "streamlit" for the Streamlit\ndefined design or None to fallback to the default behavior of the library.

\n", + "is_kwarg_only": true, + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", "default": "behavior" }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use for giving this element a stable\nidentity. If key is None (default), this element's identity\nwill be determined based on the values of the other parameters.

\n

Additionally, if selections are activated and key is provided,\nStreamlit will register the key in Session State to store the\nselection state. The selection state is read-only.

\n", + "default": null + }, + { + "name": "on_select", + "type_name": "\"ignore\", \"rerun\", or callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.vega_lite_chart will\nreturn the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.vega_lite_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the Vega-Lite spec defined in data or\nspec must include selection parameters from the the charting\nlibrary. To learn about defining interactions in Vega-Lite, see\nDynamic Behaviors with Parameters\nin Vega-Lite's documentation.

\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "str or Iterable of str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection parameters Streamlit should use. If\nselection_mode is None (default), Streamlit will use all\nselection parameters defined in the chart's Vega-Lite spec.

\n

When Streamlit uses a selection parameter, selections from that\nparameter will trigger a rerun and be included in the selection\nstate. When Streamlit does not use a selection parameter,\nselections from that parameter will not trigger a rerun and not be\nincluded in the selection state.

\n

Selection parameters are identified by their name property.

\n", + "default": null + }, { "name": "**kwargs", "type_name": "any", "is_optional": false, "is_kwarg_only": true, - "description": "

Same as spec, but as keywords.

\n", + "description": "

The Vega-Lite spec for the chart as keywords. This is an alternative\nto spec.

\n", "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow_vega_lite.py#L36" + "returns": [ + { + "type_name": "element or dict", + "is_generator": false, + "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1444" }, "streamlit.video": { "name": "video", "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False)", - "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n\n \n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n\n \n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", "description": "

Display a video player.

\n", "args": [ { @@ -85762,7 +95218,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/media.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/media.py#L197" }, "streamlit.warning": { "name": "warning", @@ -85788,12 +95244,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", - "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write('Hello, *World!* :sunglasses:')\n
\n\n \n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(pd.DataFrame({\n    'first column': [1, 2, 3, 4],\n    'second column': [10, 20, 30, 40],\n}))\n
\n\n \n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write('1 + 1 = ', 2)\nst.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.')\n
\n\n \n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(\n    np.random.randn(200, 3),\n    columns=['a', 'b', 'c'])\n\nc = alt.Chart(df).mark_circle().encode(\n    x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])\n\nst.write(c)\n
\n\n \n
\n", + "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write('Hello, *World!* :sunglasses:')\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(pd.DataFrame({\n    'first column': [1, 2, 3, 4],\n    'second column': [10, 20, 30, 40],\n}))\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write('1 + 1 = ', 2)\nst.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.')\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(\n    np.random.randn(200, 3),\n    columns=['a', 'b', 'c'])\n\nc = alt.Chart(df).mark_circle().encode(\n    x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])\n\nst.write(c)\n
\n
\n", "description": "

Write arguments to the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit commands,\nwrite() has some unique properties:

\n
    \n
  1. You can pass in multiple arguments, all of which will be written.
  2. \n
  3. Its behavior depends on the input types as follows.
  4. \n
  5. It returns None, so its "slot" in the App cannot be reused.
  6. \n
\n", "args": [ { @@ -85826,12 +95282,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/write.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/write.py#L233" }, "streamlit.write_stream": { "name": "write_stream", "signature": "st.write_stream(stream)", - "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n\n \n
\n", + "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n
\n", "description": "

Stream a generator, iterable, or stream-like sequence to the app.

\n

st.write_stream iterates through the given sequences and writes all\nchunks to the app. String chunks will be written using a typewriter effect.\nOther data types will be written using st.write.

\n", "args": [ { @@ -85851,7 +95307,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/write.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/write.py#L59" }, "streamlit.experimental_memo.clear": { "name": "experimental_memo.clear", @@ -85859,7 +95315,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -85867,7 +95323,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" }, "streamlit.experimental_singleton.clear": { "name": "experimental_singleton.clear", @@ -85875,7 +95331,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -85883,7 +95339,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" }, "streamlit.query_params.clear": { "name": "clear", @@ -85898,7 +95354,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -85916,7 +95372,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L173" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L179" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -85940,7 +95396,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -85955,7 +95411,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L145" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -85980,7 +95436,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/state/query_params_proxy.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -85994,11 +95450,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -86015,11 +95471,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -86035,7 +95491,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L250" }, { "name": "query", @@ -86108,7 +95564,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L124" }, { "name": "reset", @@ -86117,7 +95573,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -86127,7 +95583,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L269" }, { "name": "engine", @@ -86135,7 +95591,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L261" }, { "name": "session", @@ -86144,12 +95600,12 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L277" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L47", - "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", - "description": "

A connection to a SQL database using a SQLAlchemy Engine. Initialize using st.connection("<name>", type="sql").

\n

SQLConnection provides the query() convenience method, which can be used to\nrun simple read-only queries with both caching and simple error handling/retries.\nMore complex DB interactions can be performed by using the .session property\nto receive a regular SQLAlchemy Session.

\n

SQLConnections should always be created using st.connection(), not\ninitialized directly. Connection parameters for a SQLConnection can be specified\nusing either st.secrets or **kwargs. Some frequently used parameters include:

\n
    \n
  • url or arguments for sqlalchemy.engine.URL.create().\nMost commonly it includes a dialect, host, database, username and password.
  • \n
  • create_engine_kwargs can be passed via st.secrets, such as for\nsnowflake-sqlalchemy\nor Google BigQuery.\nThese can also be passed directly as **kwargs to connection().
  • \n
  • autocommit=True to run with isolation level AUTOCOMMIT. Default is False.
  • \n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L48", + "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", + "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], "returns": [] }, @@ -86164,7 +95620,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L263" }, { "name": "query", @@ -86213,7 +95669,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L120" }, { "name": "reset", @@ -86222,7 +95678,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -86230,7 +95686,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L280" }, { "name": "write_pandas", @@ -86245,7 +95701,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L225" } ], "properties": [ @@ -86255,10 +95711,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L271" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L41", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L41", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -86300,7 +95756,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L97" }, { "name": "reset", @@ -86309,7 +95765,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -86318,7 +95774,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L190" } ], "properties": [ @@ -86329,10 +95785,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L167" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L46", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L46", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -86343,7 +95799,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L250" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -86351,7 +95807,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L269" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -86359,7 +95815,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L261" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -86432,7 +95888,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L124" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -86441,7 +95897,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -86450,7 +95906,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/sql_connection.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L277" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -86483,7 +95939,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L97" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -86492,7 +95948,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -86501,7 +95957,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L190" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -86510,7 +95966,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L167" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -86518,7 +95974,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L263" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -86567,7 +96023,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L120" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -86575,7 +96031,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L271" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -86584,7 +96040,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -86592,7 +96048,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L280" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -86607,7 +96063,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L225" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -86616,12 +96072,12 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", "signature": "st.column_config.AreaChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure an area chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -86666,12 +96122,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L948" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", "signature": "st.column_config.BarChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a bar chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -86716,12 +96172,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L787" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", "signature": "st.column_config.CheckboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a checkbox column in st.dataframe or st.data_editor.

\n

This is the default column type for boolean values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a checkbox widget.

\n", "args": [ { @@ -86774,12 +96230,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L606" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L606" }, "streamlit.column_config.Column": { "name": "Column", "signature": "st.column_config.Column(label=None, *, width=None, help=None, disabled=None, required=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n
\n", "description": "

Configure a generic column in st.dataframe or st.data_editor.

\n

The type of the column will be automatically inferred from the data type.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n

To change the type of the column and enable type-specific configuration options,\nuse one of the column types in the st.column_config namespace,\ne.g. st.column_config.NumberColumn.

\n", "args": [ { @@ -86824,12 +96280,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", "signature": "st.column_config.DateColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a date column in st.dataframe or st.data_editor.

\n

This is the default column type for date values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When used\nwith st.data_editor, editing will be enabled with a date picker widget.

\n", "args": [ { @@ -86914,12 +96370,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1400" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", "signature": "st.column_config.DatetimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None, timezone=None)", - "examples": "
\n
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a datetime column in st.dataframe or st.data_editor.

\n

This is the default column type for datetime values. This command needs to be\nused in the column_config parameter of st.dataframe or\nst.data_editor. When used with st.data_editor, editing will be enabled\nwith a datetime picker widget.

\n", "args": [ { @@ -87012,12 +96468,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1165" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", "args": [ { @@ -87046,12 +96502,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", "signature": "st.column_config.LineChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a line chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -87096,12 +96552,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L867" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L867" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None, display_text=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate="^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text="https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate="^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text="https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a link column in st.dataframe or st.data_editor.

\n

The cell values need to be string and will be shown as clickable links.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor. When used with st.data_editor, editing will be enabled\nwith a text input widget.

\n", "args": [ { @@ -87178,12 +96634,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", "args": [ { @@ -87212,12 +96668,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1100" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1100" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", "signature": "st.column_config.NumberColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a number column in st.dataframe or st.data_editor.

\n

This is the default column type for integer and float values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a numeric input widget.

\n", "args": [ { @@ -87302,12 +96758,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, format=None, min_value=None, max_value=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a progress column in st.dataframe or st.data_editor.

\n

Cells need to contain a number. Progress columns are not editable at the moment.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n", "args": [ { @@ -87360,12 +96816,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1513" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1513" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, options=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a selectbox column in st.dataframe or st.data_editor.

\n

This is the default column type for Pandas categorical values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a selectbox widget.

\n", "args": [ { @@ -87426,12 +96882,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L688" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L688" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate="^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate="^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a text column in st.dataframe or st.data_editor.

\n

This is the default column type for string values. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor. When used with\nst.data_editor, editing will be enabled with a text input widget.

\n", "args": [ { @@ -87500,12 +96956,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", "signature": "st.column_config.TimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n\n \n
\n", + "examples": "
\n
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a time column in st.dataframe or st.data_editor.

\n

This is the default column type for time values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When\nused with st.data_editor, editing will be enabled with a time picker widget.

\n", "args": [ { @@ -87590,12 +97046,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/column_types.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1286" }, "streamlit.components.v1.declare_component": { "name": "declare_component", "signature": "st.components.v1.declare_component(name, path=None, url=None)", - "description": "

Create and register a custom component.

\n", + "description": "

Create a custom component and register it if there is a ScriptRun context.

\n

The component is not registered when there is no ScriptRun context; this can happen when CustomComponents are executed as standalone commands, e.g. for testing.

\n", "args": [ { "name": "name", @@ -87630,7 +97086,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/components/v1/component_registry.py#L45" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/components/v1/component_registry.py#L46" }, "streamlit.components.v1.html": { "name": "html", @@ -87671,7 +97127,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/iframe.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/iframe.py#L61" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -87712,7 +97168,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -87738,7 +97194,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/arrow.py#L284" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L630" }, "StatusContainer.update": { "name": "update", @@ -87771,7 +97227,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -87800,7 +97256,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L1000" }, { "name": "run", @@ -87824,7 +97280,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L359" }, { "name": "switch_page", @@ -87848,7 +97304,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L381" } ], "properties": [ @@ -87865,7 +97321,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L435" }, { "name": "caption", @@ -87880,7 +97336,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L450" }, { "name": "chat_input", @@ -87895,7 +97351,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L464" }, { "name": "chat_message", @@ -87910,7 +97366,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L478" }, { "name": "checkbox", @@ -87925,7 +97381,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L492" }, { "name": "code", @@ -87940,7 +97396,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L506" }, { "name": "color_picker", @@ -87955,7 +97411,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L520" }, { "name": "columns", @@ -87970,7 +97426,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L534" }, { "name": "dataframe", @@ -87985,7 +97441,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L551" }, { "name": "date_input", @@ -88000,7 +97456,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L565" }, { "name": "divider", @@ -88015,7 +97471,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L579" }, { "name": "error", @@ -88030,7 +97486,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L593" }, { "name": "exception", @@ -88045,7 +97501,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L607" }, { "name": "expander", @@ -88060,7 +97516,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L621" }, { "name": "header", @@ -88075,7 +97531,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L635" }, { "name": "info", @@ -88090,7 +97546,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L649" }, { "name": "json", @@ -88105,7 +97561,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L663" }, { "name": "latex", @@ -88120,7 +97576,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L677" }, { "name": "main", @@ -88135,7 +97591,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L409" }, { "name": "markdown", @@ -88150,7 +97606,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L691" }, { "name": "metric", @@ -88165,7 +97621,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L705" }, { "name": "multiselect", @@ -88180,7 +97636,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L719" }, { "name": "number_input", @@ -88195,7 +97651,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L733" }, { "name": "radio", @@ -88210,7 +97666,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L747" }, { "name": "select_slider", @@ -88225,7 +97681,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L761" }, { "name": "selectbox", @@ -88240,7 +97696,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L775" }, { "name": "sidebar", @@ -88255,7 +97711,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L422" }, { "name": "slider", @@ -88270,7 +97726,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L789" }, { "name": "status", @@ -88285,7 +97741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L831" }, { "name": "subheader", @@ -88300,7 +97756,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L803" }, { "name": "success", @@ -88315,7 +97771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L817" }, { "name": "table", @@ -88330,7 +97786,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L845" }, { "name": "tabs", @@ -88345,7 +97801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L859" }, { "name": "text", @@ -88360,7 +97816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L879" }, { "name": "text_area", @@ -88375,7 +97831,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L893" }, { "name": "text_input", @@ -88390,7 +97846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L907" }, { "name": "time_input", @@ -88405,7 +97861,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L921" }, { "name": "title", @@ -88420,7 +97876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L935" }, { "name": "toast", @@ -88435,7 +97891,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L949" }, { "name": "toggle", @@ -88450,7 +97906,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L963" }, { "name": "warning", @@ -88465,10 +97921,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L977" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L92", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L92", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -88508,7 +97964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L435" }, "AppTest.caption": { "name": "caption", @@ -88523,7 +97979,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L450" }, "AppTest.chat_input": { "name": "chat_input", @@ -88538,7 +97994,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L464" }, "AppTest.chat_message": { "name": "chat_message", @@ -88553,7 +98009,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L478" }, "AppTest.checkbox": { "name": "checkbox", @@ -88568,7 +98024,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L492" }, "AppTest.code": { "name": "code", @@ -88583,7 +98039,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L506" }, "AppTest.color_picker": { "name": "color_picker", @@ -88598,7 +98054,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L520" }, "AppTest.columns": { "name": "columns", @@ -88613,7 +98069,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L534" }, "AppTest.dataframe": { "name": "dataframe", @@ -88628,7 +98084,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L551" }, "AppTest.date_input": { "name": "date_input", @@ -88643,7 +98099,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L565" }, "AppTest.divider": { "name": "divider", @@ -88658,7 +98114,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L579" }, "AppTest.error": { "name": "error", @@ -88673,7 +98129,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L593" }, "AppTest.exception": { "name": "exception", @@ -88688,7 +98144,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L607" }, "AppTest.expander": { "name": "expander", @@ -88703,7 +98159,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L621" }, "AppTest.from_file": { "name": "from_file", @@ -88735,7 +98191,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L262" }, "AppTest.from_function": { "name": "from_function", @@ -88783,7 +98239,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L215" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L215" }, "AppTest.from_string": { "name": "from_string", @@ -88815,7 +98271,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L172" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L172" }, "AppTest.get": { "name": "get", @@ -88839,7 +98295,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L1000" }, "AppTest.header": { "name": "header", @@ -88854,7 +98310,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L635" }, "AppTest.info": { "name": "info", @@ -88869,7 +98325,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L649" }, "AppTest.json": { "name": "json", @@ -88884,7 +98340,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L663" }, "AppTest.latex": { "name": "latex", @@ -88899,7 +98355,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L677" }, "AppTest.main": { "name": "main", @@ -88914,7 +98370,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L409" }, "AppTest.markdown": { "name": "markdown", @@ -88929,7 +98385,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L691" }, "AppTest.metric": { "name": "metric", @@ -88944,7 +98400,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L705" }, "AppTest.multiselect": { "name": "multiselect", @@ -88959,7 +98415,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L719" }, "AppTest.number_input": { "name": "number_input", @@ -88974,7 +98430,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L733" }, "AppTest.radio": { "name": "radio", @@ -88989,7 +98445,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L747" }, "AppTest.run": { "name": "run", @@ -89013,7 +98469,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L359" }, "AppTest.select_slider": { "name": "select_slider", @@ -89028,7 +98484,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L761" }, "AppTest.selectbox": { "name": "selectbox", @@ -89043,7 +98499,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L775" }, "AppTest.sidebar": { "name": "sidebar", @@ -89058,7 +98514,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L422" }, "AppTest.slider": { "name": "slider", @@ -89073,7 +98529,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L789" }, "AppTest.status": { "name": "status", @@ -89088,7 +98544,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L831" }, "AppTest.subheader": { "name": "subheader", @@ -89103,7 +98559,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L803" }, "AppTest.success": { "name": "success", @@ -89118,7 +98574,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L817" }, "AppTest.switch_page": { "name": "switch_page", @@ -89142,7 +98598,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L381" }, "AppTest.table": { "name": "table", @@ -89157,7 +98613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L845" }, "AppTest.tabs": { "name": "tabs", @@ -89172,7 +98628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L859" }, "AppTest.text": { "name": "text", @@ -89187,7 +98643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L879" }, "AppTest.text_area": { "name": "text_area", @@ -89202,7 +98658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L893" }, "AppTest.text_input": { "name": "text_input", @@ -89217,7 +98673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L907" }, "AppTest.time_input": { "name": "time_input", @@ -89232,7 +98688,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L921" }, "AppTest.title": { "name": "title", @@ -89247,7 +98703,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L935" }, "AppTest.toast": { "name": "toast", @@ -89262,7 +98718,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L949" }, "AppTest.toggle": { "name": "toggle", @@ -89277,7 +98733,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L963" }, "AppTest.warning": { "name": "warning", @@ -89292,7 +98748,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L977" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -89305,7 +98761,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L344" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L344" }, { "name": "run", @@ -89322,7 +98778,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89330,7 +98786,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L339" } ], "properties": [ @@ -89340,10 +98796,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L329" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L329" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L306", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L306", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -89368,7 +98824,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89376,7 +98832,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L361" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L361" } ], "properties": [ @@ -89386,10 +98842,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L374" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L349", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L349", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -89405,7 +98861,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L422" }, { "name": "run", @@ -89422,7 +98878,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89430,7 +98886,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "uncheck", @@ -89438,7 +98894,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L426" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L426" } ], "properties": [ @@ -89448,10 +98904,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L407" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L407" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L385", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L385", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -89467,7 +98923,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L494" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L494" }, { "name": "run", @@ -89484,7 +98940,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89492,7 +98948,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L489" } ], "properties": [ @@ -89502,10 +98958,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L468" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L453", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L453", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -89530,7 +98986,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89538,7 +98994,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L540" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L540" } ], "properties": [ @@ -89548,10 +99004,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L554" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L554" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L520", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L520", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -89576,7 +99032,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" } ], "properties": [ @@ -89586,10 +99042,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -89614,7 +99070,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -89622,7 +99078,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L757" }, { "name": "set_value", @@ -89630,7 +99086,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L751" }, { "name": "unselect", @@ -89638,7 +99094,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L772" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L772" } ], "properties": [ @@ -89648,7 +99104,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L745" }, { "name": "indices", @@ -89656,7 +99112,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L740" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L740" }, { "name": "value", @@ -89664,10 +99120,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L730" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L730" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L701", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L701", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -89683,7 +99139,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L845" }, { "name": "increment", @@ -89691,7 +99147,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L837" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L837" }, { "name": "run", @@ -89708,7 +99164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89716,7 +99172,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L812" } ], "properties": [ @@ -89726,10 +99182,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L825" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L792", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L792", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -89754,7 +99210,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -89762,7 +99218,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L896" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L896" } ], "properties": [ @@ -89772,7 +99228,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L890" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L890" }, { "name": "index", @@ -89780,7 +99236,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L873" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L873" }, { "name": "value", @@ -89788,10 +99244,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L880" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L880" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L854", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L854", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -89816,7 +99272,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -89824,7 +99280,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1042" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1042" }, { "name": "set_value", @@ -89832,7 +99288,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1004" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1004" } ], "properties": [ @@ -89842,7 +99298,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1036" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1036" }, { "name": "value", @@ -89850,10 +99306,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1025" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1025" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L986", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L986", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -89878,7 +99334,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -89886,7 +99342,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "select_index", @@ -89894,7 +99350,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L967" }, { "name": "set_value", @@ -89902,7 +99358,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L958" } ], "properties": [ @@ -89912,7 +99368,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L952" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L952" }, { "name": "index", @@ -89920,7 +99376,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L932" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L932" }, { "name": "value", @@ -89928,10 +99384,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L942" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L942" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L914", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L914", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -89956,7 +99412,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -89964,7 +99420,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1095" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1095" }, { "name": "set_value", @@ -89972,7 +99428,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1066" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1066" } ], "properties": [ @@ -89982,10 +99438,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1084" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1084" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1047", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1047", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -90001,7 +99457,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "run", @@ -90018,7 +99474,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -90026,7 +99482,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1152" } ], "properties": [ @@ -90036,10 +99492,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1134", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1134", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -90055,7 +99511,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1229" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1229" }, { "name": "run", @@ -90072,7 +99528,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -90080,7 +99536,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1205" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1205" } ], "properties": [ @@ -90090,10 +99546,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1218" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1218" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1187", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1187", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -90109,7 +99565,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1294" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1294" }, { "name": "increment", @@ -90117,7 +99573,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1287" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1287" }, { "name": "run", @@ -90134,7 +99590,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -90142,7 +99598,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1259" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1259" } ], "properties": [ @@ -90152,10 +99608,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1275" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1275" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1243", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1243", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -90180,7 +99636,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -90188,7 +99644,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1351" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1351" } ], "properties": [ @@ -90198,10 +99654,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1341" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1341" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L1318", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1318", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -90226,7 +99682,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -90234,7 +99690,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L195" } ], "properties": [ @@ -90244,10 +99700,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/testing/v1/element_tree.py#L180", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L180", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -90265,7 +99721,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L84" }, "CachedFunc.clear": { "name": "clear", @@ -90291,7 +99747,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/runtime/caching/cache_utils.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_utils.py#L306" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -90311,11 +99767,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.34.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -90327,9 +99783,193 @@ } ], "returns": [] + }, + "PlotlyState": { + "name": "PlotlyState", + "signature": "PlotlyState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L169", + "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", + "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "args": [ + { + "name": "selection", + "type_name": "dict", + "is_optional": false, + "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The attributes are described by the\nPlotlySelectionState dictionary schema.
\n
\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true + }, + "PlotlySelectionState": { + "name": "PlotlySelectionState", + "signature": "PlotlySelectionState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L81", + "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", + "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", + "args": [ + { + "name": "points", + "type_name": "list[dict[str, Any]]", + "is_optional": false, + "description": "

The selected data points in the chart, including the data points\nselected by the box and lasso mode. The data includes the values\nassociated to each point and a point index used to populate\npoint_indices. If additional information has been assigned to your\npoints, such as size or legend group, this is also included.

\n", + "default": null + }, + { + "name": "point_indices", + "type_name": "list[int]", + "is_optional": false, + "description": "

The numerical indices of all selected data points in the chart. The\ndetails of each identified point are included in points.

\n", + "default": null + }, + { + "name": "box", + "type_name": "list[dict[str, Any]]", + "is_optional": false, + "description": "

The metadata related to the box selection. This includes the\ncoordinates of the selected area.

\n", + "default": null + }, + { + "name": "lasso", + "type_name": "list[dict[str, Any]]", + "is_optional": false, + "description": "

The metadata related to the lasso selection. This includes the\ncoordinates of the selected area.

\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true + }, + "VegaLiteState": { + "name": "VegaLiteState", + "signature": "VegaLiteState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L98", + "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point seleciton parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(st.session_state.data, spec, key="vega_chart", on_select="rerun")\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", + "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "args": [ + { + "name": "selection", + "type_name": "dict", + "is_optional": false, + "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The name of each Vega-Lite selection parameter becomes an\nattribute in the selection dictionary. The format of the data\nwithin each attribute is determined by the selection parameter\ndefinition within Vega-Lite.
\n
\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true + }, + "DataframeState": { + "name": "DataframeState", + "signature": "DataframeState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L137", + "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "args": [ + { + "name": "selection", + "type_name": "dict", + "is_optional": false, + "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The attributes are described by the\nDataframeSelectionState dictionary schema.
\n
\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true + }, + "DataframeSelectionState": { + "name": "DataframeSelectionState", + "signature": "DataframeSelectionState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L86", + "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", + "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", + "args": [ + { + "name": "rows", + "type_name": "list[int]", + "is_optional": false, + "description": "

The selected rows, identified by their positional index. The positional\nindices match the original dataframe, even if the user sorts the\ndataframe in their browser.

\n", + "default": null + }, + { + "name": "columns", + "type_name": "list[str]", + "is_optional": false, + "description": "

The selected columns, identified by their names.

\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true } }, - "1.35.0": { + "1.36.0": { + "streamlit.Page": { + "name": "Page", + "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", + "example": "
\n
\nimport streamlit as st\n\ndef page2():\n    st.title("Second page")\n\npg = st.navigation([\n    st.Page("page1.py", title="First page", icon="\ud83d\udd25"),\n    st.Page(page2, title="Second page", icon=":material/favorite:"),\n])\npg.run()\n
\n
\n", + "description": "

Configure a page for st.navigation in a multipage app.

\n

Call st.Page to initialize a StreamlitPage object, and pass it to\nst.navigation to declare a page in your app.

\n

When a user navigates to a page, st.navigation returns the selected\nStreamlitPage object. Call StreamlitPage.run() on the returned page\nto execute the page. You can only run the page returned by\nst.navigation, and you can only run it once per app rerun.

\n

A page can be defined by a Python file or Callable.

\n", + "args": [ + { + "name": "page", + "type_name": "str, Path, or callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The page source as a Callable or path to a Python file. If the page\nsource is defined by a Python file, the path can be a string or\npathlib.Path object, but must be declared relative to the\nentrypoint file. If the page source is defined by a Callable, the\nCallable can't accept arguments.

\n", + "default": null + }, + { + "name": "title", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The title of the page. If this is None (default), the page title\n(in the browser tab) and label (in the navigation menu) will be\ninferred from the filename or callable name in page. For more\ninformation, see Overview of multipage apps.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the page title and label.\nIf icon is None (default), no icon is displayed next to the\npage label in the navigation menu, and a Streamlit icon is displayed\nnext to the title (in the browser tab). If icon is a string, the\nfollowing options are valid:

\n
    \n
  • \n
    A single-character emoji. For example, you can set icon="\ud83d\udea8"
    \n

    or icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
    \n
    \n
  • \n
  • \n
    An icon from the Material Symbols library (outlined style) in the
    \n

    format ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
    \n
    \n
  • \n
\n", + "default": null + }, + { + "name": "url_path", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The page's URL pathname, which is the path relative to the app's root\nURL. If this is None (default), the URL pathname will be inferred\nfrom the filename or callable name in page. For more information,\nsee Overview of multipage apps.

\n

The default page will have a pathname of "", indicating the root\nURL of the app. If you set default=True, url_path is ignored.

\n", + "default": "page" + }, + { + "name": "default", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether this page is the default page to be shown when the app is\nloaded. If default is False (default), the page will have a\nnonempty URL pathname. However, if no default page is passed to\nst.navigation and this is the first page, this page will become the\ndefault page. If default is True, then the page will have\nan empty pathname and url_path will be ignored.

\n", + "default": "page" + } + ], + "returns": [ + { + "type_name": "StreamlitPage", + "is_generator": false, + "description": "

The page object associated to the given script.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L29" + }, "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, *, use_container_width=False, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", @@ -90393,17 +100033,17 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1288" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1400" }, "streamlit.area_chart": { "name": "area_chart", - "signature": "st.area_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", + "signature": "st.area_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.area_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -90414,7 +100054,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "description": "

Column name or key associated to the x-axis data. If x is\nNone (default), Streamlit uses the data index for the x-axis\nvalues.

\n", "default": null }, { @@ -90422,7 +100062,23 @@ "type_name": "str, Sequence of str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "description": "

Column name(s) or key(s) associated to the y-axis data. If this is\nNone (default), Streamlit draws the data of all remaining\ncolumns as data series. If this is a Sequence of strings,\nStreamlit draws several series on the same chart by melting your\nwide-format table into a long-format table behind the scenes.

\n", + "default": null + }, + { + "name": "x_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the x-axis. If this is None (default), Streamlit\nwill use the column name specified in x if available, or else\nno label will be displayed.

\n", + "default": null + }, + { + "name": "y_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the y-axis. If this is None (default), Streamlit\nwill use the column name(s) specified in y if available, or\nelse no label will be displayed.

\n", "default": null }, { @@ -90438,7 +100094,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", "default": null }, { @@ -90454,12 +100110,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is True (default),\nStreamlit sets the width of the chart to match the width of the\nparent container. If use_container_width is False,\nStreamlit sets the chart's width according to width.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L756" }, "streamlit.audio": { "name": "audio", @@ -90525,7 +100181,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/media.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/media.py#L64" }, "streamlit.balloons": { "name": "balloons", @@ -90534,17 +100190,17 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", - "signature": "st.bar_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "signature": "st.bar_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, horizontal=False, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n
\n", "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -90555,7 +100211,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "description": "

Column name or key associated to the x-axis data. If x is\nNone (default), Streamlit uses the data index for the x-axis\nvalues.

\n", "default": null }, { @@ -90563,7 +100219,23 @@ "type_name": "str, Sequence of str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "description": "

Column name(s) or key(s) associated to the y-axis data. If this is\nNone (default), Streamlit draws the data of all remaining\ncolumns as data series. If this is a Sequence of strings,\nStreamlit draws several series on the same chart by melting your\nwide-format table into a long-format table behind the scenes.

\n", + "default": null + }, + { + "name": "x_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the x-axis. If this is None (default), Streamlit\nwill use the column name specified in x if available, or else\nno label will be displayed.

\n", + "default": null + }, + { + "name": "y_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the y-axis. If this is None (default), Streamlit\nwill use the column name(s) specified in y if available, or\nelse no label will be displayed.

\n", "default": null }, { @@ -90574,12 +100246,20 @@ "description": "

The color to use for different series in this chart.

\n

For a bar chart with just one series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", "default": "color" }, + { + "name": "horizontal", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to make the bars horizontal. If this is False\n(default), the bars display vertically. If this is True,\nStreamlit swaps the x-axis and y-axis and the bars display\nhorizontally.

\n", + "default": null + }, { "name": "width", "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", "default": null }, { @@ -90595,12 +100275,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is True (default),\nStreamlit sets the width of the chart to match the width of the\nparent container. If use_container_width is False,\nStreamlit sets the chart's width according to width.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L901" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L949" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -90626,7 +100306,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -90703,7 +100383,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the button stretch its width to match the parent container.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", "default": null } ], @@ -90715,20 +100395,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L67" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L75" }, "streamlit.cache": { "name": "cache", "signature": "st.cache(func=None, persist=False, allow_output_mutation=False, show_spinner=True, suppress_st_warning=False, hash_funcs=None, max_entries=None, ttl=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to True:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id) like this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n
\n", - "description": "

Function decorator to memoize function executions.

\n", + "description": "

Legacy caching decorator (deprecated).

\n

Legacy caching with st.cache has been removed from Streamlit. This is\nnow an alias for st.cache_data and st.cache_resource.

\n", "args": [ { "name": "func", "type_name": "callable", "is_optional": false, "is_kwarg_only": false, - "description": "

The function to cache. Streamlit hashes the function and dependent code.

\n", + "description": "

The function to cache. Streamlit hashes the function's source code.

\n", "default": null }, { @@ -90744,7 +100424,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Streamlit shows a warning when return values are mutated, as that\ncan have unintended consequences. This is done by hashing the return value internally.

\n

If you know what you're doing and would like to override this warning, set this to True.

\n", + "description": "

Whether to use st.cache_data or st.cache_resource. If this is\nFalse (default), the arguments are passed to st.cache_data. If\nthis is True, the arguments are passed to st.cache_resource.

\n", "default": null }, { @@ -90752,15 +100432,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Enable the spinner. Default is True to show a spinner when there is\na cache miss.

\n", - "default": "True" + "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached data is being created.

\n", + "default": "is" }, { "name": "suppress_st_warning", "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Suppress warnings about calling Streamlit commands from within\nthe cached function.

\n", + "description": "

This is not used.

\n", "default": null }, { @@ -90776,8 +100456,8 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", - "default": "None" + "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", + "default": "is" }, { "name": "ttl", @@ -90789,13 +100469,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/legacy_caching/caching.py#L431" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", - "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -90842,8 +100522,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", - "default": "False" + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "default": "False", + "deprecated": { + "deprecated": true, + "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + } }, { "name": "hash_funcs", @@ -90855,13 +100539,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L396" }, "streamlit.cache_resource": { "name": "cache_resource", "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", - "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -90908,8 +100592,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", - "default": "False" + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "default": "False", + "deprecated": { + "deprecated": true, + "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + } }, { "name": "hash_funcs", @@ -90921,7 +100609,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L265" }, "streamlit.camera_input": { "name": "camera_input", @@ -91002,7 +100690,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/camera_input.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/camera_input.py#L84" }, "streamlit.caption": { "name": "caption", @@ -91023,7 +100711,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

By default, any HTML tags found in strings will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write secure\nHTML, so by using this argument you may be compromising your users'\nsecurity. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", + "description": "

Whether to render HTML within body. If this is False\n(default), any HTML tags found in body will be escaped and\ntherefore treated as raw text. If this is True, any HTML\nexpressions within body will be rendered.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability.

\n
\n

Note

\n

If you only want to insert HTML or CSS without Markdown text,\nwe recommend using st.html instead.

\n
\n", "default": null }, { @@ -91036,7 +100724,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L151" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L153" }, "streamlit.chat_input": { "name": "chat_input", @@ -91109,7 +100797,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/chat.py#L231" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/chat.py#L237" }, "streamlit.chat_message": { "name": "chat_message", @@ -91142,7 +100830,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/chat.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/chat.py#L126" }, "streamlit.checkbox": { "name": "checkbox", @@ -91231,7 +100919,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/checkbox.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/checkbox.py#L57" }, "streamlit.code": { "name": "code", @@ -91265,7 +100953,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -91354,13 +101042,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/color_picker.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/color_picker.py#L59" }, "streamlit.columns": { "name": "columns", - "signature": "st.columns(spec, *, gap=\"small\")", - "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n
\n", - "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app.

\n
\n", + "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\")", + "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n
\n", + "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This\nis only possible in the main area of the app.

\n
\n", "args": [ { "name": "spec", @@ -91375,8 +101063,16 @@ "type_name": "\"small\", \"medium\", or \"large\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The size of the gap between the columns. Defaults to "small".

\n", - "default": "s" + "description": "

The size of the gap between the columns. The default is "small".

\n", + "default": "is" + }, + { + "name": "vertical_alignment", + "type_name": "\"top\", \"center\", or \"bottom\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The vertical alignment of the content inside the columns. The\ndefault is "top".

\n", + "default": "is" } ], "returns": [ @@ -91387,7 +101083,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L145" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L147" }, "streamlit.connection": { "name": "connection", @@ -91444,7 +101140,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -91470,7 +101166,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L35" }, "streamlit.data_editor": { "name": "data_editor", @@ -91531,7 +101227,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", "default": null }, { @@ -91591,7 +101287,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/data_editor.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/data_editor.py#L583" }, "streamlit.dataframe": { "name": "dataframe", @@ -91652,7 +101348,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", "default": null }, { @@ -91688,7 +101384,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L269" }, "streamlit.date_input": { "name": "date_input", @@ -91801,7 +101497,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/time_widgets.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/time_widgets.py#L518" }, "streamlit.divider": { "name": "divider", @@ -91810,13 +101506,13 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L270" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n
\n", - "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n", + "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ { "name": "label", @@ -91911,7 +101607,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the button stretch its width to match the\nparent container.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", "default": null } ], @@ -91923,7 +101619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L179" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L193" }, "streamlit.echo": { "name": "echo", @@ -91941,7 +101637,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -91950,7 +101646,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -91976,7 +101672,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -91994,11 +101690,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/exception.py#L50" }, "streamlit.expander": { "name": "expander", - "signature": "st.expander(label, expanded=False)", + "signature": "st.expander(label, expanded=False, *, icon=None)", "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n
\n", "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", "args": [ @@ -92017,10 +101713,18 @@ "is_kwarg_only": false, "description": "

If True, initializes the expander in "expanded" state. Defaults to\nFalse (collapsed).

\n", "default": "s" + }, + { + "name": "icon", + "type_name": "str, None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the expander label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L387" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L445" }, "streamlit.experimental_connection": { "name": "experimental_connection", @@ -92077,7 +101781,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/connection_factory.py#L203" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.experimental_data_editor": { "name": "experimental_data_editor", @@ -92138,7 +101842,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", "default": null }, { @@ -92198,13 +101902,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/data_editor.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/data_editor.py#L583" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", "signature": "st.experimental_dialog(title, *, width=\"small\")", "examples": "
\n

The following example demonstrates the basic usage of @st.experimental_dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.experimental_dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n
\n", - "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.experimental_dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing``ESC`` on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.experimental_dialog inherits behavior from st.experimental_fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

A dialog may not open another dialog. Only one dialog function may be\ncalled in a script run, which means that only one dialog can be open at\nany given time.

\n
\n", + "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.experimental_dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing``ESC`` on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.experimental_dialog inherits behavior from st.experimental_fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time. Since a dialog is\nalso a fragment, all fragment limitations apply. Dialogs can't contain\nfragments, and fragments can't contain dialogs. Using dialogs in widget\ncallback functions is not supported.

\n
\n", "args": [ { "name": "title", @@ -92224,13 +101928,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/dialog_decorator.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/dialog_decorator.py#L97" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", "signature": "st.experimental_fragment(func=None, *, run_every=None)", - "examples": "
\n

The following example demonstrates basic usage of @st.experimental_fragment. In\nthis app, clicking "Rerun full script" will increment both counters and\nupdate all values displayed in the app. In contrast, clicking "Rerun fragment"\nwill only increment the counter within the fragment. In this case, the\nst.write command inside the fragment will update the app's frontend,\nbut the two st.write commands outside the fragment will not update the\nfrontend.

\n
\nimport streamlit as st\n\nif "script_runs" not in st.session_state:\n    st.session_state.script_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.script_runs += 1\nfragment()\nst.button("Rerun full script")\nst.write(f"Full script says it ran {st.session_state.script_runs} times.")\nst.write(f"Full script sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger a full-script rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", - "description": "

Decorator to turn a function into a fragment which can rerun independently of the full script.

\n

When a user interacts with an input widget created by a fragment, Streamlit\nonly reruns the fragment instead of the full script. If run_every is set,\nStreamlit will also rerun the fragment at the specified interval while the\nsession is active, even if the user is not interacting with your app.

\n

To trigger a full script rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each full-script rerun. The rest of the app is\npersisted during a fragment rerun. When a fragment renders elements into\nexternally created containers, the elements will not be cleared with each\nfragment rerun. In this case, elements will accumulate in those containers\nwith each fragment rerun, until the next full-script rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n", + "examples": "
\n

The following example demonstrates basic usage of\n@st.experimental_fragment. As an anology, "inflating balloons" is a\nslow process that happens outside of the fragment. "Releasing balloons" is\na quick process that happens inside of the fragment.

\n
\nimport streamlit as st\nimport time\n\n@st.experimental_fragment\ndef release_the_balloons():\n    st.button("Release the balloons", help="Fragment rerun")\n    st.balloons()\n\nwith st.spinner("Inflating balloons..."):\n    time.sleep(5)\nrelease_the_balloons()\nst.button("Inflate more balloons", help="Full rerun")\n
\n

This next example demonstrates how elements both inside and outside of a\nfragement update with each app or fragment rerun. In this app, clicking\n"Rerun full app" will increment both counters and update all values\ndisplayed in the app. In contrast, clicking "Rerun fragment" will only\nincrement the counter within the fragment. In this case, the st.write\ncommand inside the fragment will update the app's frontend, but the two\nst.write commands outside the fragment will not update the frontend.

\n
\nimport streamlit as st\n\nif "app_runs" not in st.session_state:\n    st.session_state.app_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.app_runs += 1\nfragment()\nst.button("Rerun full app")\nst.write(f"Full app says it ran {st.session_state.app_runs} times.")\nst.write(f"Full app sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger an app rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", + "description": "

Decorator to turn a function into a fragment which can rerun independently of the full app.

\n

When a user interacts with an input widget created inside a fragment,\nStreamlit only reruns the fragment instead of the full app. If\nrun_every is set, Streamlit will also rerun the fragment at the\nspecified interval while the session is active, even if the user is not\ninteracting with your app.

\n

To trigger an app rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each app rerun. The rest of the app is persisted\nduring a fragment rerun. When a fragment renders elements into externally\ncreated containers, the elements will not be cleared with each fragment\nrerun. Instead, elements will accumulate in those containers with each\nfragment rerun, until the next app rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n
\n

Warning

\n
    \n
  • Fragments can't contain other fragments. Additionally, using\nfragments in widget callback functions is not supported.
  • \n
  • Fragments can only contain widgets in their main body. Fragments\ncan't render widgets to externally created containers.
  • \n
\n
\n", "args": [ { "name": "func", @@ -92250,7 +101954,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/fragment.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/fragment.py#L223" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -92266,13 +101970,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_memo": { "name": "experimental_memo", "signature": "st.experimental_memo(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", - "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/library/advanced-features/caching.

\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -92319,8 +102023,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", - "default": "False" + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "default": "False", + "deprecated": { + "deprecated": true, + "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + } }, { "name": "hash_funcs", @@ -92332,7 +102040,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L396" }, "streamlit.experimental_rerun": { "name": "experimental_rerun", @@ -92340,7 +102048,7 @@ "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L82" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -92358,13 +102066,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.experimental_singleton": { "name": "experimental_singleton", "signature": "st.experimental_singleton(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", - "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/library/advanced-features/caching.

\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -92411,8 +102119,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.\nWe may remove support for this option at any time without notice.

\n", - "default": "False" + "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "default": "False", + "deprecated": { + "deprecated": true, + "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + } }, { "name": "hash_funcs", @@ -92424,13 +102136,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L265" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n
\n", - "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration#set-configuration-options

\n", + "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml

\n", "args": [ { "name": "label", @@ -92521,7 +102233,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/file_uploader.py#L229" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/file_uploader.py#L226" }, "streamlit.form": { "name": "form", @@ -92555,7 +102267,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/form.py#L115" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -92623,7 +102335,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the button stretch its width to match the parent container.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", "default": null } ], @@ -92635,7 +102347,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/form.py#L230" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/form.py#L230" }, "streamlit.get_option": { "name": "get_option", @@ -92652,7 +102364,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/config.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/config.py#L128" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -92678,7 +102390,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/graphviz_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/graphviz_chart.py#L39" }, "streamlit.header": { "name": "header", @@ -92720,7 +102432,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", @@ -92738,12 +102450,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", "signature": "st.html(body)", - "example": "
\n
\nimport streamlit as st\n\ncode = """\n<style>\n    p {\n        color: red;\n    }\n</style>\n"""\nst.html(code)\nst.markdown("Lorem ipsum")\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.html("<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>")\n
\n
\n", "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", "args": [ { @@ -92756,7 +102468,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", @@ -92822,7 +102534,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -92848,7 +102560,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", @@ -92874,7 +102586,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/json.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/json.py#L37" }, "streamlit.latex": { "name": "latex", @@ -92900,17 +102612,17 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L222" }, "streamlit.line_chart": { "name": "line_chart", - "signature": "st.line_chart(data=None, *, x=None, y=None, color=None, width=None, height=None, use_container_width=True)", + "signature": "st.line_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.line_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -92921,7 +102633,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "description": "

Column name or key associated to the x-axis data. If x is\nNone (default), Streamlit uses the data index for the x-axis\nvalues.

\n", "default": null }, { @@ -92929,7 +102641,23 @@ "type_name": "str, Sequence of str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "description": "

Column name(s) or key(s) associated to the y-axis data. If this is\nNone (default), Streamlit draws the data of all remaining\ncolumns as data series. If this is a Sequence of strings,\nStreamlit draws several series on the same chart by melting your\nwide-format table into a long-format table behind the scenes.

\n", + "default": null + }, + { + "name": "x_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the x-axis. If this is None (default), Streamlit\nwill use the column name specified in x if available, or else\nno label will be displayed.

\n", + "default": null + }, + { + "name": "y_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the y-axis. If this is None (default), Streamlit\nwill use the column name(s) specified in y if available, or\nelse no label will be displayed.

\n", "default": null }, { @@ -92945,7 +102673,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", "default": null }, { @@ -92961,12 +102689,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is True (default),\nStreamlit sets the width of the chart to match the width of the\nparent container. If use_container_width is False,\nStreamlit sets the chart's width according to width.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L557" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L563" }, "streamlit.link_button": { "name": "link_button", @@ -93019,12 +102747,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the button stretch its width to match the\nparent container.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L352" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L374" }, "streamlit.logo": { "name": "logo", @@ -93058,13 +102786,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/logo.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/logo.py#L31" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=['lat', 'lon'])\n\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color='#0044ff')\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n    "col1": np.random.randn(1000) / 50 + 37.76,\n    "col2": np.random.randn(1000) / 50 + -122.4,\n    "col3": np.random.randn(1000) * 100,\n    "col4": np.random.rand(1000, 4).tolist(),\n})\n\nst.map(df,\n    latitude='col1',\n    longitude='col2',\n    size='col3',\n    color='col4')\n
\n
\n", - "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", + "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { "name": "data", @@ -93119,12 +102847,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override the map's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the map to match the width of the parent container.

\n", + "description": "

Whether to override the map's native width with the width of\nthe parent container. If use_container_width is True\n(default), Streamlit sets the width of the map to match the width\nof the parent container. If use_container_width is False,\nStreamlit sets the width of the chart to fit its contents according\nto the plotting library, up to the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/map.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/map.py#L84" }, "streamlit.markdown": { "name": "markdown", @@ -93145,7 +102873,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

By default, any HTML tags found in the body will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write\nsecure HTML, so by using this argument you may be compromising your\nusers' security. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", + "description": "

Whether to render HTML within body. If this is False\n(default), any HTML tags found in body will be escaped and\ntherefore treated as raw text. If this is True, any HTML\nexpressions within body will be rendered.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability.

\n
\n

Note

\n

If you only want to insert HTML or CSS without Markdown text,\nwe recommend using st.html instead.

\n
\n", "default": null }, { @@ -93158,7 +102886,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -93216,7 +102944,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/metric.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/metric.py#L48" }, "streamlit.multiselect": { "name": "multiselect", @@ -93337,7 +103065,40 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/multiselect.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/multiselect.py#L145" + }, + "streamlit.navigation": { + "name": "navigation", + "signature": "st.navigation(pages, *, position=\"sidebar\")", + "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

You can declare pages from callables or file paths.

\n
\nimport streamlit as st\nfrom page_functions import page1\n\npg = st.navigation([st.Page(page1), st.Page("page2.py")])\npg.run()\n
\n

Use a dictionary to create sections within your navigation menu.

\n
\nimport streamlit as st\n\npages = {\n    "Your account" : [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account")\n    ],\n    "Resources" : [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out")\n    ]\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation(st.Page(page1), st.Page(page2))\npg.run()\n
\n", + "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe page object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", + "args": [ + { + "name": "pages", + "type_name": "list[StreamlitPage] or dict[str, list[StreamlitPage]]", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The available pages for the app.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of StreamlitPage objects for\nthat section.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of StreamlitPage objects.

\n

Use st.Page to create StreamlitPage objects.

\n", + "default": null + }, + { + "name": "position", + "type_name": "\"sidebar\" or \"hidden\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The position of the navigation menu. If position is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nposition is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", + "default": null + } + ], + "returns": [ + { + "type_name": "StreamlitPage", + "is_generator": false, + "description": "

The current page selected by the user.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/navigation.py#L55" }, "streamlit.number_input": { "name": "number_input", @@ -93466,20 +103227,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/number_input.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/number_input.py#L116" }, "streamlit.page_link": { "name": "page_link", "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n
\n", + "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n
\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ { "name": "page", - "type_name": "str", + "type_name": "str or st.Page", "is_optional": false, "is_kwarg_only": false, - "description": "

The file path (relative to the main script) of the page to switch to.\nAlternatively, this can be the URL to an external page (must start\nwith "http://" or "https://").

\n", + "description": "

The file path (relative to the main script) or an st.Page indicating\nthe page to switch to. Alternatively, this can be the URL to an\nexternal page (must start with "http://" or "https://").

\n", "default": null }, { @@ -93519,12 +103280,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the link stretch its width to\nmatch the parent container. The default is True for page links\nin the sidebar, and False for those in the main app.

\n", + "description": "

Whether to expand the link's width to fill its parent container.\nThe default is True for page links in the sidebar and False\nfor those in the main app.

\n", "default": "is" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/button.py#L438" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L465" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -93597,7 +103358,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L300" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L310" }, "streamlit.popover": { "name": "popover", @@ -93634,12 +103395,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which makes the popover button stretch its width\nto match the parent container. This only affects the button and not\nthe width of the popover container.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n

The popover containter's minimimun width matches the width of its\nbutton. The popover container may be wider than its button to fit\nthe container's contents.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L569" }, "streamlit.progress": { "name": "progress", @@ -93665,13 +103426,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, use_container_width=False)", "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n   np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n   columns=['lat', 'lon'])\n\nst.pydeck_chart(pdk.Deck(\n    map_style=None,\n    initial_view_state=pdk.ViewState(\n        latitude=37.76,\n        longitude=-122.4,\n        zoom=11,\n        pitch=50,\n    ),\n    layers=[\n        pdk.Layer(\n           'HexagonLayer',\n           data=chart_data,\n           get_position='[lon, lat]',\n           radius=200,\n           elevation_scale=4,\n           elevation_range=[0, 1000],\n           pickable=True,\n           extruded=True,\n        ),\n        pdk.Layer(\n            'ScatterplotLayer',\n            data=chart_data,\n            get_position='[lon, lat]',\n            get_color='[200, 30, 0, 160]',\n            get_radius=200,\n        ),\n    ],\n))\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", - "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/library/advanced-features/configuration

\n", + "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { "name": "pydeck_obj", @@ -93691,7 +103452,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", @@ -93721,7 +103482,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is True\n(default), Streamlit sets the width of the figure to match the\nwidth of the parent container. If use_container_width is\nFalse, Streamlit sets the width of the chart to fit its\ncontents according to the plotting library, up to the width of the\nparent container.

\n", "default": null }, { @@ -93734,7 +103495,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/pyplot.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/pyplot.py#L35" }, "streamlit.radio": { "name": "radio", @@ -93855,7 +103616,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/radio.py#L85" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/radio.py#L88" }, "streamlit.rerun": { "name": "rerun", @@ -93863,17 +103624,17 @@ "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L58" }, "streamlit.scatter_chart": { "name": "scatter_chart", - "signature": "st.scatter_chart(data=None, *, x=None, y=None, color=None, size=None, width=None, height=None, use_container_width=True)", + "signature": "st.scatter_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, size=None, width=None, height=None, use_container_width=True)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\nchart_data['col4'] = np.random.choice(['A','B','C'], 20)\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y='col2',\n    color='col4',\n    size='col3',\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"])\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y=['col2', 'col3'],\n    size='col4',\n    color=['#FF0000', '#0000FF'],  # Optional\n)\n
\n
\n", "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -93884,7 +103645,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name to use for the x-axis. If None, uses the data index for the x-axis.

\n", + "description": "

Column name or key associated to the x-axis data. If x is\nNone (default), Streamlit uses the data index for the x-axis\nvalues.

\n", "default": null }, { @@ -93892,7 +103653,23 @@ "type_name": "str, Sequence of str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Column name(s) to use for the y-axis. If a Sequence of strings,\ndraws several series on the same chart by melting your wide-format\ntable into a long-format table behind the scenes. If None, draws\nthe data of all remaining columns as data series.

\n", + "description": "

Column name(s) or key(s) associated to the y-axis data. If this is\nNone (default), Streamlit draws the data of all remaining\ncolumns as data series. If this is a Sequence of strings,\nStreamlit draws several series on the same chart by melting your\nwide-format table into a long-format table behind the scenes.

\n", + "default": null + }, + { + "name": "x_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the x-axis. If this is None (default), Streamlit\nwill use the column name specified in x if available, or else\nno label will be displayed.

\n", + "default": null + }, + { + "name": "y_label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The label for the y-axis. If this is None (default), Streamlit\nwill use the column name(s) specified in y if available, or\nelse no label will be displayed.

\n", "default": null }, { @@ -93916,7 +103693,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n", + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", "default": null }, { @@ -93932,12 +103709,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the chart's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe chart to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is True (default),\nStreamlit sets the width of the chart to match the width of the\nparent container. If use_container_width is False,\nStreamlit sets the chart's width according to width.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1075" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1168" }, "streamlit.select_slider": { "name": "select_slider", @@ -94042,7 +103819,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/select_slider.py#L106" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/select_slider.py#L108" }, "streamlit.selectbox": { "name": "selectbox", @@ -94155,7 +103932,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/selectbox.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/selectbox.py#L81" }, "streamlit.set_option": { "name": "set_option", @@ -94180,7 +103957,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -94230,7 +104007,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/page_config.py#L119" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/page_config.py#L119" }, "streamlit.slider": { "name": "slider", @@ -94351,7 +104128,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/slider.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/slider.py#L167" }, "streamlit.snow": { "name": "snow", @@ -94360,7 +104137,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -94378,7 +104155,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -94419,7 +104196,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L601" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L693" }, "streamlit.stop": { "name": "stop", @@ -94428,7 +104205,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L32" }, "streamlit.subheader": { "name": "subheader", @@ -94470,7 +104247,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L116" }, "streamlit.success": { "name": "success", @@ -94496,7 +104273,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -94506,15 +104283,15 @@ "args": [ { "name": "page", - "type_name": "str", + "type_name": "str or st.Page", "is_optional": false, "is_kwarg_only": false, - "description": "

The file path (relative to the main script) of the page to switch to.

\n", + "description": "

The file path (relative to the main script) or an st.Page indicating\nthe page to switch to.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/commands/execution_control.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L98" }, "streamlit.table": { "name": "table", @@ -94532,7 +104309,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L588" }, "streamlit.tabs": { "name": "tabs", @@ -94557,7 +104334,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/layouts.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L330" }, "streamlit.text": { "name": "text", @@ -94583,7 +104360,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -94696,7 +104473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/text_widgets.py#L385" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/text_widgets.py#L388" }, "streamlit.text_input": { "name": "text_input", @@ -94817,7 +104594,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/text_widgets.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -94914,7 +104691,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/time_widgets.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/time_widgets.py#L291" }, "streamlit.title": { "name": "title", @@ -94948,13 +104725,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/heading.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L189" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", - "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", + "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { "name": "body", @@ -94974,7 +104751,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -95063,7 +104840,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/widgets/checkbox.py#L162" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/checkbox.py#L163" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -95144,7 +104921,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L1444" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1554" }, "streamlit.video": { "name": "video", @@ -95218,7 +104995,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/media.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/media.py#L197" }, "streamlit.warning": { "name": "warning", @@ -95244,7 +105021,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -95265,8 +105042,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

This is a keyword-only argument that defaults to False.

\n

By default, any HTML tags found in strings will be escaped and\ntherefore treated as pure text. This behavior may be turned off by\nsetting this argument to True.

\n

That said, we strongly advise against it. It is hard to write secure\nHTML, so by using this argument you may be compromising your users'\nsecurity. For more information, see:

\n

https://github.com/streamlit/streamlit/issues/152

\n", - "default": "False" + "description": "

Whether to render HTML within *args. This only applies to\nstrings or objects falling back on _repr_html_(). If this is\nFalse (default), any HTML tags found in body will be\nescaped and therefore treated as raw text. If this is True, any\nHTML expressions within body will be rendered.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability.

\n
\n

Note

\n

If you only want to insert HTML or CSS without Markdown text,\nwe recommend using st.html instead.

\n
\n", + "default": null }, { "name": "**kwargs", @@ -95282,12 +105059,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/write.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/write.py#L233" }, "streamlit.write_stream": { "name": "write_stream", "signature": "st.write_stream(stream)", - "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n
\n", + "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n
\n", "description": "

Stream a generator, iterable, or stream-like sequence to the app.

\n

st.write_stream iterates through the given sequences and writes all\nchunks to the app. String chunks will be written using a typewriter effect.\nOther data types will be written using st.write.

\n", "args": [ { @@ -95307,7 +105084,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/write.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/write.py#L59" }, "streamlit.experimental_memo.clear": { "name": "experimental_memo.clear", @@ -95315,7 +105092,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L608" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -95323,7 +105100,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_data_api.py#L590" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L608" }, "streamlit.experimental_singleton.clear": { "name": "experimental_singleton.clear", @@ -95331,7 +105108,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L457" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -95339,7 +105116,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_resource_api.py#L449" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L457" }, "streamlit.query_params.clear": { "name": "clear", @@ -95354,7 +105131,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -95372,7 +105149,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L179" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -95396,7 +105173,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -95411,7 +105188,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -95436,7 +105213,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -95450,11 +105227,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -95471,11 +105248,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -95491,7 +105268,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L250" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L251" }, { "name": "query", @@ -95564,7 +105341,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L125" }, { "name": "reset", @@ -95573,7 +105350,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -95583,7 +105360,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L269" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L270" }, { "name": "engine", @@ -95591,7 +105368,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L261" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L262" }, { "name": "session", @@ -95600,10 +105377,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L278" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L49", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -95620,7 +105397,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L264" }, { "name": "query", @@ -95669,7 +105446,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L121" }, { "name": "reset", @@ -95678,7 +105455,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -95686,7 +105463,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L281" }, { "name": "write_pandas", @@ -95701,7 +105478,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L226" } ], "properties": [ @@ -95711,10 +105488,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L272" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L41", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -95756,7 +105533,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -95765,7 +105542,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -95774,7 +105551,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -95785,10 +105562,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L46", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -95799,7 +105576,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L250" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L251" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -95807,7 +105584,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L269" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L270" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -95815,7 +105592,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L261" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L262" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -95888,7 +105665,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L125" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -95897,7 +105674,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -95906,7 +105683,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/sql_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L278" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -95939,7 +105716,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -95948,7 +105725,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -95957,7 +105734,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -95966,7 +105743,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowpark_connection.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -95974,7 +105751,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L264" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -96023,7 +105800,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L120" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -96031,7 +105808,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L272" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -96040,7 +105817,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -96048,7 +105825,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L280" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L281" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -96063,7 +105840,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/snowflake_connection.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L226" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -96072,7 +105849,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -96122,7 +105899,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L948" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -96172,7 +105949,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L787" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -96230,7 +106007,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L606" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L606" }, "streamlit.column_config.Column": { "name": "Column", @@ -96280,7 +106057,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -96370,7 +106147,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1400" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -96468,13 +106245,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1165" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", - "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", + "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", "args": [ { "name": "label", @@ -96502,7 +106279,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -96552,7 +106329,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L867" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L867" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -96634,7 +106411,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -96668,7 +106445,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1100" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1100" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -96758,7 +106535,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -96816,7 +106593,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1513" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1513" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -96882,7 +106659,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L688" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L688" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -96956,7 +106733,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -97046,19 +106823,19 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/column_types.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1286" }, "streamlit.components.v1.declare_component": { "name": "declare_component", "signature": "st.components.v1.declare_component(name, path=None, url=None)", - "description": "

Create a custom component and register it if there is a ScriptRun context.

\n

The component is not registered when there is no ScriptRun context; this can happen when CustomComponents are executed as standalone commands, e.g. for testing.

\n", + "description": "

Create a custom component and register it if there is a ScriptRunContext.

\n

The component is not registered when there is no ScriptRunContext.\nThis can happen when a CustomComponent is executed as standalone\ncommand (e.g. for testing).

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.declare_component directly (instead of\nimporting its module) is deprecated and will be disallowd in a later\nversion.

\n
\n", "args": [ { "name": "name", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short, descriptive name for the component. Like, "slider".

\n", + "description": "

A short, descriptive name for the component, like "slider".

\n", "default": null }, { @@ -97066,7 +106843,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The path to serve the component's frontend files from. Either\npath or url must be specified, but not both.

\n", + "description": "

The path to serve the component's frontend files from. If path is\nNone (default), Streamlit will server the component from the\nlocation in url. Either path or url must be specified, but\nnot both.

\n", "default": null }, { @@ -97074,7 +106851,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The URL that the component is served from. Either path or url\nmust be specified, but not both.

\n", + "description": "

The URL that the component is served from. If url is None\n(default), Streamlit will server the component from the location in\npath. Either path or url must be specified, but not both.

\n", "default": null } ], @@ -97082,16 +106859,17 @@ { "type_name": "CustomComponent", "is_generator": false, - "description": "

A CustomComponent that can be called like a function.\nCalling the component will create a new instance of the component\nin the Streamlit app.

\n", + "description": "

A CustomComponent that can be called like a function.\nCalling the component will create a new instance of the component\nin the Streamlit app.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/components/v1/component_registry.py#L46" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/components/v1/component_registry.py#L50" }, "streamlit.components.v1.html": { "name": "html", "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False)", - "description": "

Display an HTML string in an iframe.

\n", + "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n
\n", + "description": "

Display an HTML string in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n

If you want to insert HTML text into your app without an iframe, try\nst.html instead.

\n
\n

Warning

\n

Using st.components.v1.html directly (instead of importing\nits module) is deprecated and will be disallowd in a later version.

\n
\n", "args": [ { "name": "html", @@ -97106,33 +106884,34 @@ "type_name": "int", "is_optional": false, "is_kwarg_only": false, - "description": "

The width of the frame in CSS pixels. Defaults to the app's\ndefault element width.

\n", - "default": "the" + "description": "

The width of the iframe in CSS pixels. By default, this is the\napp's default element width.

\n", + "default": "element" }, { "name": "height", "type_name": "int", "is_optional": false, "is_kwarg_only": false, - "description": "

The height of the frame in CSS pixels. Defaults to 150.

\n", - "default": "150" + "description": "

The height of the frame in CSS pixels. By default, this is 150.

\n", + "default": null }, { "name": "scrolling", "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, show a scrollbar when the content is larger than the iframe.\nOtherwise, do not show a scrollbar. Defaults to False.

\n", - "default": "False" + "description": "

Whether to allow scrolling in the iframe. If this False\n(default), Streamlit crops any content larger than the iframe and\ndoes not show a scrollbar. If this is True, Streamlit shows a\nscrollbar when the content is larger than the iframe.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/iframe.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False)", - "description": "

Load a remote URL in an iframe.

\n", + "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.iframe("https://example.com", height=500)\n
\n
\n", + "description": "

Load a remote URL in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.iframe directly (instead of importing\nits module) is deprecated and will be disallowd in a later version.

\n
\n", "args": [ { "name": "src", @@ -97147,28 +106926,28 @@ "type_name": "int", "is_optional": false, "is_kwarg_only": false, - "description": "

The width of the frame in CSS pixels. Defaults to the app's\ndefault element width.

\n", - "default": "the" + "description": "

The width of the iframe in CSS pixels. By default, this is the\napp's default element width.

\n", + "default": "element" }, { "name": "height", "type_name": "int", "is_optional": false, "is_kwarg_only": false, - "description": "

The height of the frame in CSS pixels. Defaults to 150.

\n", - "default": "150" + "description": "

The height of the frame in CSS pixels. By default, this is 150.

\n", + "default": null }, { "name": "scrolling", "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, show a scrollbar when the content is larger than the iframe.\nOtherwise, do not show a scrollbar. Defaults to False.

\n", - "default": "False" + "description": "

Whether to allow scrolling in the iframe. If this False\n(default), Streamlit crops any content larger than the iframe and\ndoes not show a scrollbar. If this is True, Streamlit shows a\nscrollbar when the content is larger than the iframe.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -97194,7 +106973,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L630" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L631" }, "StatusContainer.update": { "name": "update", @@ -97227,7 +107006,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/lib/mutable_status_container.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/mutable_status_container.py#L98" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -97256,7 +107035,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L1009" }, { "name": "run", @@ -97265,10 +107044,10 @@ "args": [ { "name": "timeout", - "type_name": null, - "is_optional": null, + "type_name": "float or None", + "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of seconds to run the script. None means\nuse the default timeout set for the instance of AppTest.

\n", + "description": "

The maximum number of seconds to run the script. If timeout is\nNone (default), Streamlit uses the default timeout set for the\ninstance of AppTest.

\n", "default": "timeout" } ], @@ -97280,7 +107059,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L367" }, { "name": "switch_page", @@ -97304,7 +107083,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L390" } ], "properties": [ @@ -97321,7 +107100,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L444" }, { "name": "caption", @@ -97336,7 +107115,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L459" }, { "name": "chat_input", @@ -97351,7 +107130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L473" }, { "name": "chat_message", @@ -97366,7 +107145,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L487" }, { "name": "checkbox", @@ -97381,7 +107160,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L501" }, { "name": "code", @@ -97396,7 +107175,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L515" }, { "name": "color_picker", @@ -97411,7 +107190,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L529" }, { "name": "columns", @@ -97426,7 +107205,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L543" }, { "name": "dataframe", @@ -97441,7 +107220,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L560" }, { "name": "date_input", @@ -97456,7 +107235,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L574" }, { "name": "divider", @@ -97471,7 +107250,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L588" }, { "name": "error", @@ -97486,7 +107265,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L602" }, { "name": "exception", @@ -97501,7 +107280,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L616" }, { "name": "expander", @@ -97516,7 +107295,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L630" }, { "name": "header", @@ -97531,7 +107310,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L644" }, { "name": "info", @@ -97546,7 +107325,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L658" }, { "name": "json", @@ -97561,7 +107340,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L672" }, { "name": "latex", @@ -97576,7 +107355,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L686" }, { "name": "main", @@ -97591,7 +107370,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L418" }, { "name": "markdown", @@ -97606,7 +107385,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L700" }, { "name": "metric", @@ -97621,7 +107400,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L714" }, { "name": "multiselect", @@ -97636,7 +107415,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L728" }, { "name": "number_input", @@ -97651,7 +107430,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L742" }, { "name": "radio", @@ -97666,7 +107445,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L756" }, { "name": "select_slider", @@ -97681,7 +107460,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L770" }, { "name": "selectbox", @@ -97696,7 +107475,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L784" }, { "name": "sidebar", @@ -97711,7 +107490,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L431" }, { "name": "slider", @@ -97726,7 +107505,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L798" }, { "name": "status", @@ -97741,7 +107520,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L840" }, { "name": "subheader", @@ -97756,7 +107535,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L812" }, { "name": "success", @@ -97771,7 +107550,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L826" }, { "name": "table", @@ -97786,7 +107565,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L854" }, { "name": "tabs", @@ -97801,7 +107580,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L868" }, { "name": "text", @@ -97816,7 +107595,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L888" }, { "name": "text_area", @@ -97831,7 +107610,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L902" }, { "name": "text_input", @@ -97846,7 +107625,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L916" }, { "name": "time_input", @@ -97861,7 +107640,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L930" }, { "name": "title", @@ -97876,7 +107655,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L944" }, { "name": "toast", @@ -97891,7 +107670,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L958" }, { "name": "toggle", @@ -97906,7 +107685,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L972" }, { "name": "warning", @@ -97921,10 +107700,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L986" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L92", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L95", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -97964,7 +107743,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L444" }, "AppTest.caption": { "name": "caption", @@ -97979,7 +107758,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L459" }, "AppTest.chat_input": { "name": "chat_input", @@ -97994,7 +107773,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L473" }, "AppTest.chat_message": { "name": "chat_message", @@ -98009,7 +107788,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L487" }, "AppTest.checkbox": { "name": "checkbox", @@ -98024,7 +107803,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L492" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L501" }, "AppTest.code": { "name": "code", @@ -98039,7 +107818,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L515" }, "AppTest.color_picker": { "name": "color_picker", @@ -98054,7 +107833,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L529" }, "AppTest.columns": { "name": "columns", @@ -98069,7 +107848,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L534" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L543" }, "AppTest.dataframe": { "name": "dataframe", @@ -98084,7 +107863,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L560" }, "AppTest.date_input": { "name": "date_input", @@ -98099,7 +107878,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L565" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L574" }, "AppTest.divider": { "name": "divider", @@ -98114,7 +107893,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L588" }, "AppTest.error": { "name": "error", @@ -98129,7 +107908,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L602" }, "AppTest.exception": { "name": "exception", @@ -98144,7 +107923,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L607" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L616" }, "AppTest.expander": { "name": "expander", @@ -98159,7 +107938,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L621" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L630" }, "AppTest.from_file": { "name": "from_file", @@ -98191,7 +107970,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L265" }, "AppTest.from_function": { "name": "from_function", @@ -98239,7 +108018,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L215" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L218" }, "AppTest.from_string": { "name": "from_string", @@ -98271,7 +108050,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L172" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L175" }, "AppTest.get": { "name": "get", @@ -98295,7 +108074,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L1009" }, "AppTest.header": { "name": "header", @@ -98310,7 +108089,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L635" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L644" }, "AppTest.info": { "name": "info", @@ -98325,7 +108104,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L658" }, "AppTest.json": { "name": "json", @@ -98340,7 +108119,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L672" }, "AppTest.latex": { "name": "latex", @@ -98355,7 +108134,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L686" }, "AppTest.main": { "name": "main", @@ -98370,7 +108149,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L409" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L418" }, "AppTest.markdown": { "name": "markdown", @@ -98385,7 +108164,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L691" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L700" }, "AppTest.metric": { "name": "metric", @@ -98400,7 +108179,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L705" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L714" }, "AppTest.multiselect": { "name": "multiselect", @@ -98415,7 +108194,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L728" }, "AppTest.number_input": { "name": "number_input", @@ -98430,7 +108209,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L742" }, "AppTest.radio": { "name": "radio", @@ -98445,7 +108224,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L756" }, "AppTest.run": { "name": "run", @@ -98454,10 +108233,10 @@ "args": [ { "name": "timeout", - "type_name": null, - "is_optional": null, + "type_name": "float or None", + "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of seconds to run the script. None means\nuse the default timeout set for the instance of AppTest.

\n", + "description": "

The maximum number of seconds to run the script. If timeout is\nNone (default), Streamlit uses the default timeout set for the\ninstance of AppTest.

\n", "default": "timeout" } ], @@ -98469,7 +108248,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L359" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L367" }, "AppTest.select_slider": { "name": "select_slider", @@ -98484,7 +108263,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L761" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L770" }, "AppTest.selectbox": { "name": "selectbox", @@ -98499,7 +108278,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L775" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L784" }, "AppTest.sidebar": { "name": "sidebar", @@ -98514,7 +108293,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L431" }, "AppTest.slider": { "name": "slider", @@ -98529,7 +108308,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L798" }, "AppTest.status": { "name": "status", @@ -98544,7 +108323,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L840" }, "AppTest.subheader": { "name": "subheader", @@ -98559,7 +108338,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L812" }, "AppTest.success": { "name": "success", @@ -98574,7 +108353,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L826" }, "AppTest.switch_page": { "name": "switch_page", @@ -98598,7 +108377,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L390" }, "AppTest.table": { "name": "table", @@ -98613,7 +108392,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L854" }, "AppTest.tabs": { "name": "tabs", @@ -98628,7 +108407,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L859" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L868" }, "AppTest.text": { "name": "text", @@ -98643,7 +108422,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L879" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L888" }, "AppTest.text_area": { "name": "text_area", @@ -98658,7 +108437,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L902" }, "AppTest.text_input": { "name": "text_input", @@ -98673,7 +108452,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L916" }, "AppTest.time_input": { "name": "time_input", @@ -98688,7 +108467,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L921" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L930" }, "AppTest.title": { "name": "title", @@ -98703,7 +108482,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L935" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L944" }, "AppTest.toast": { "name": "toast", @@ -98718,7 +108497,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L958" }, "AppTest.toggle": { "name": "toggle", @@ -98733,7 +108512,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L972" }, "AppTest.warning": { "name": "warning", @@ -98748,7 +108527,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/app_test.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L986" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -98761,7 +108540,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L344" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -98778,7 +108557,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -98786,7 +108565,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -98796,10 +108575,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L329" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L306", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -98824,7 +108603,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -98832,7 +108611,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L361" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -98842,10 +108621,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L349", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -98861,7 +108640,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -98878,7 +108657,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -98886,7 +108665,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -98894,7 +108673,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L426" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -98904,10 +108683,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L407" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L385", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -98923,7 +108702,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L494" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -98940,7 +108719,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -98948,7 +108727,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -98958,10 +108737,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L453", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -98986,7 +108765,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -98994,7 +108773,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L540" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -99004,10 +108783,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L554" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L520", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -99032,7 +108811,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -99042,10 +108821,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -99070,7 +108849,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -99078,7 +108857,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L753" }, { "name": "set_value", @@ -99086,7 +108865,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L747" }, { "name": "unselect", @@ -99094,7 +108873,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L772" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L768" } ], "properties": [ @@ -99104,7 +108883,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L741" }, { "name": "indices", @@ -99112,7 +108891,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L740" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L736" }, { "name": "value", @@ -99120,10 +108899,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L730" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L726" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L701", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -99139,7 +108918,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L845" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L841" }, { "name": "increment", @@ -99147,7 +108926,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L837" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L833" }, { "name": "run", @@ -99164,7 +108943,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99172,7 +108951,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L808" } ], "properties": [ @@ -99182,10 +108961,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L821" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L792", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L788", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -99210,7 +108989,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99218,7 +108997,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L896" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L892" } ], "properties": [ @@ -99228,7 +109007,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L890" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L886" }, { "name": "index", @@ -99236,7 +109015,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L873" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L869" }, { "name": "value", @@ -99244,10 +109023,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L880" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L876" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L854", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L850", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -99272,7 +109051,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -99280,7 +109059,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1042" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1038" }, { "name": "set_value", @@ -99288,7 +109067,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1004" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1000" } ], "properties": [ @@ -99298,7 +109077,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1036" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1032" }, { "name": "value", @@ -99306,10 +109085,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1025" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1021" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L986", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L982", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -99334,7 +109113,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -99342,7 +109121,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L959" }, { "name": "select_index", @@ -99350,7 +109129,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "set_value", @@ -99358,7 +109137,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L954" } ], "properties": [ @@ -99368,7 +109147,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L952" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L948" }, { "name": "index", @@ -99376,7 +109155,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L932" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L928" }, { "name": "value", @@ -99384,10 +109163,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L942" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L938" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L914", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L910", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -99412,7 +109191,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -99420,7 +109199,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1095" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1091" }, { "name": "set_value", @@ -99428,7 +109207,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1066" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1062" } ], "properties": [ @@ -99438,10 +109217,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1084" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1080" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1047", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1043", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -99457,7 +109236,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1172" }, { "name": "run", @@ -99474,7 +109253,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99482,7 +109261,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1148" } ], "properties": [ @@ -99492,10 +109271,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1161" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1134", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1130", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -99511,7 +109290,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1229" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1225" }, { "name": "run", @@ -99528,7 +109307,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99536,7 +109315,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1205" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1201" } ], "properties": [ @@ -99546,10 +109325,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1218" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1214" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1187", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1183", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -99565,7 +109344,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1294" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1290" }, { "name": "increment", @@ -99573,7 +109352,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1287" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1283" }, { "name": "run", @@ -99590,7 +109369,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99598,7 +109377,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1259" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1255" } ], "properties": [ @@ -99608,10 +109387,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1275" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1271" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1243", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1239", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -99636,7 +109415,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99644,7 +109423,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1351" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1347" } ], "properties": [ @@ -99654,10 +109433,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1341" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1337" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L1318", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1314", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -99682,7 +109461,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -99690,7 +109469,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -99700,10 +109479,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/testing/v1/element_tree.py#L180", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -99721,7 +109500,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L84" }, "CachedFunc.clear": { "name": "clear", @@ -99747,7 +109526,106 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/runtime/caching/cache_utils.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_utils.py#L309" + }, + "StreamlitPage": { + "name": "StreamlitPage", + "signature": "StreamlitPage(page, *, title=None, icon=None, url_path=None, default=False)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": ".run.run()", + "description": "

Execute the page.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L254" + } + ], + "properties": [ + { + "name": "icon", + "signature": ".icon.icon", + "description": "

The icon of the page.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L231" + }, + { + "name": "title", + "signature": ".title.title", + "description": "

The title of the page.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L220" + }, + { + "name": "url_path", + "signature": ".url_path.url_path", + "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L239" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L127", + "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", + "args": [ + { + "name": "icon", + "type_name": "str", + "is_optional": false, + "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", + "default": null + }, + { + "name": "title", + "type_name": "str", + "is_optional": false, + "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", + "default": null + }, + { + "name": "url_path", + "type_name": "str", + "is_optional": false, + "description": "

The page's URL pathname, which is the path relative to the app's root\nURL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", + "default": "page" + } + ], + "returns": [] + }, + "StreamlitPage.icon": { + "name": "icon", + "signature": "StreamlitPage.icon", + "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L231" + }, + "StreamlitPage.run": { + "name": "run", + "signature": "StreamlitPage.run()", + "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L254" + }, + "StreamlitPage.title": { + "name": "title", + "signature": "StreamlitPage.title", + "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L220" + }, + "StreamlitPage.url_path": { + "name": "url_path", + "signature": "StreamlitPage.url_path", + "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L239" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -99767,11 +109645,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -99789,7 +109667,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L169", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L175", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -99797,7 +109675,7 @@ "name": "selection", "type_name": "dict", "is_optional": false, - "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The attributes are described by the\nPlotlySelectionState dictionary schema.
\n
\n", + "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the PlotlySelectionState dictionary\nschema.

\n", "default": null } ], @@ -99809,7 +109687,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/plotly_chart.py#L81", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L87", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -99850,7 +109728,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/vega_charts.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L104", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point seleciton parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(st.session_state.data, spec, key="vega_chart", on_select="rerun")\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -99858,7 +109736,7 @@ "name": "selection", "type_name": "dict", "is_optional": false, - "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The name of each Vega-Lite selection parameter becomes an\nattribute in the selection dictionary. The format of the data\nwithin each attribute is determined by the selection parameter\ndefinition within Vega-Lite.
\n
\n", + "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe name of each Vega-Lite selection parameter becomes an attribute in\nthe selection dictionary. The format of the data within each\nattribute is determined by the selection parameter definition within\nVega-Lite.

\n", "default": null } ], @@ -99870,14 +109748,14 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L137", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L148", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { "name": "selection", "type_name": "dict", "is_optional": false, - "description": "
\n
The state of the on_select event. This attribure returns a
\n
dictionary-like object that supports both key and attribute\nnotation. The attributes are described by the\nDataframeSelectionState dictionary schema.
\n
\n", + "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the DataframeSelectionState\ndictionary schema.

\n", "default": null } ], @@ -99889,15 +109767,15 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.35.0/lib/streamlit/elements/arrow.py#L86", + "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L90", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", - "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", + "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ { "name": "rows", "type_name": "list[int]", "is_optional": false, - "description": "

The selected rows, identified by their positional index. The positional\nindices match the original dataframe, even if the user sorts the\ndataframe in their browser.

\n", + "description": "

The selected rows, identified by their integer position. The integer\npositions match the original dataframe, even if the user sorts the\ndataframe in their browser. For a pandas.DataFrame, you can\nretrieve data from its interger position using methods like .iloc[]\nor .iat[].

\n", "default": null }, { @@ -99912,12 +109790,12 @@ "is_attribute_dict": true } }, - "1.36.0": { + "1.37.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", "example": "
\n
\nimport streamlit as st\n\ndef page2():\n    st.title("Second page")\n\npg = st.navigation([\n    st.Page("page1.py", title="First page", icon="\ud83d\udd25"),\n    st.Page(page2, title="Second page", icon=":material/favorite:"),\n])\npg.run()\n
\n
\n", - "description": "

Configure a page for st.navigation in a multipage app.

\n

Call st.Page to initialize a StreamlitPage object, and pass it to\nst.navigation to declare a page in your app.

\n

When a user navigates to a page, st.navigation returns the selected\nStreamlitPage object. Call StreamlitPage.run() on the returned page\nto execute the page. You can only run the page returned by\nst.navigation, and you can only run it once per app rerun.

\n

A page can be defined by a Python file or Callable.

\n", + "description": "

Configure a page for st.navigation in a multipage app.

\n

Call st.Page to initialize a StreamlitPage object, and pass it to\nst.navigation to declare a page in your app.

\n

When a user navigates to a page, st.navigation returns the selected\nStreamlitPage object. Call .run() on the returned StreamlitPage\nobject to execute the page. You can only run the page returned by\nst.navigation, and you can only run it once per app rerun.

\n

A page can be defined by a Python file or Callable. Python files used\nas a StreamlitPage source will have __name__ == "__page__".\nFunctions used as a StreamlitPage source will have __name__\ncorresponding to the module they were imported from. Only the entrypoint\nfile and functions defined within the entrypoint file have\n__name__ == "__main__" to adhere to Python convention.

\n", "args": [ { "name": "page", @@ -99940,7 +109818,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the page title and label.\nIf icon is None (default), no icon is displayed next to the\npage label in the navigation menu, and a Streamlit icon is displayed\nnext to the title (in the browser tab). If icon is a string, the\nfollowing options are valid:

\n
    \n
  • \n
    A single-character emoji. For example, you can set icon="\ud83d\udea8"
    \n

    or icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
    \n
    \n
  • \n
  • \n
    An icon from the Material Symbols library (outlined style) in the
    \n

    format ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
    \n
    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the page title and label.\nIf icon is None (default), no icon is displayed next to the\npage label in the navigation menu, and a Streamlit icon is displayed\nnext to the title (in the browser tab). If icon is a string, the\nfollowing options are valid:

\n
    \n
  • \n
    A single-character emoji. For example, you can set icon="\ud83d\udea8"
    \n

    or icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
    \n
    \n
  • \n
  • \n
    An icon from the Material Symbols library (rounded style) in the
    \n

    format ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
    \n
    \n
  • \n
\n", "default": null }, { @@ -99968,7 +109846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -100033,12 +109911,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1489" }, "streamlit.area_chart": { "name": "area_chart", - "signature": "st.area_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.area_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "signature": "st.area_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, stack=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.area_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can adjust the stacking behavior by setting stack. Create a\nsteamgraph:

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.unemployment_across_industries()\n\nst.area_chart(source, x="date", y="count", color="series", stack="center")\n
\n
\n", "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -100089,6 +109967,14 @@ "description": "

The color to use for different series in this chart.

\n

For an area chart with just 1 series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", "default": "color" }, + { + "name": "stack", + "type_name": "bool, \"normalize\", \"center\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to stack the areas. If this is None (default),\nStreamlit uses Vega's default. Other values can be as follows:

\n
    \n
  • True: The areas form a non-overlapping, additive stack within\nthe chart.
  • \n
  • False: The areas overlap each other without stacking.
  • \n
  • "normalize": The areas are stacked and the total height is\nnormalized to 100% of the height of the chart.
  • \n
  • "center": The areas are stacked and shifted to center their\nbaseline, which creates a steamgraph.
  • \n
\n", + "default": null + }, { "name": "width", "type_name": "int or None", @@ -100115,7 +110001,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L756" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L748" }, "streamlit.audio": { "name": "audio", @@ -100144,7 +110030,7 @@ "type_name": "int, float, timedelta, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An``int`` or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", + "description": "

The time from which the element should start playing. This can be\none of the following:

\n
    \n
  • None (default): The element plays from the beginning.
  • \n
  • An int or float specifying the time in seconds. float\nvalues are rounded down to whole seconds.
  • \n
  • A string specifying the time in a format supported by Pandas'\nTimedelta constructor,\ne.g. "2 minute", "20s", or "1m14s".
  • \n
  • A timedelta object from Python's built-in datetime library,\ne.g. timedelta(seconds=70).
  • \n
\n", "default": null }, { @@ -100181,7 +110067,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/media.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/media.py#L64" }, "streamlit.balloons": { "name": "balloons", @@ -100190,12 +110076,12 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", - "signature": "st.bar_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, horizontal=False, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": list(range(20)) * 3,\n       "col2": np.random.randn(60),\n       "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n   }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {"col1": list(range(20)), "col2": np.random.randn(20), "col3": np.random.randn(20)}\n)\n\nst.bar_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n
\n", + "signature": "st.bar_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, horizontal=False, stack=None, width=None, height=None, use_container_width=True)", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": np.random.randn(60),\n        "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n    }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": np.random.randn(20),\n        "col3": np.random.randn(20),\n    }\n)\n\nst.bar_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n

You can unstack your bar charts.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="year", y="yield", color="site", stack=False)\n
\n
\n", "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -100254,6 +110140,14 @@ "description": "

Whether to make the bars horizontal. If this is False\n(default), the bars display vertically. If this is True,\nStreamlit swaps the x-axis and y-axis and the bars display\nhorizontally.

\n", "default": null }, + { + "name": "stack", + "type_name": "bool, \"normalize\", \"center\", \"layered\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to stack the bars. If this is None (default),\nStreamlit uses Vega's default. Other values can be as follows:

\n
    \n
  • True: The bars form a non-overlapping, additive stack within\nthe chart.
  • \n
  • False: The bars display side by side.
  • \n
  • "layered": The bars overlap each other without stacking.
  • \n
  • "normalize": The bars are stacked and the total height is\nnormalized to 100% of the height of the chart.
  • \n
  • "center": The bars are stacked and shifted to center the\ntotal height around an axis.
  • \n
\n", + "default": null + }, { "name": "width", "type_name": "int or None", @@ -100280,12 +110174,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L949" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L986" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", "signature": "st.bokeh_chart(figure, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(\n    title='simple line example',\n    x_axis_label='x',\n    y_axis_label='y')\n\np.line(x, y, legend_label='Trend', line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n
\n", "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n", "args": [ { @@ -100306,7 +110200,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -100319,7 +110213,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -100395,7 +110289,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L75" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L78" }, "streamlit.cache": { "name": "cache", @@ -100469,7 +110363,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -100539,7 +110433,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_data_api.py#L387" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -100609,7 +110503,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_resource_api.py#L256" }, "streamlit.camera_input": { "name": "camera_input", @@ -100622,7 +110516,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -100690,12 +110584,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/camera_input.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", "signature": "st.caption(body, unsafe_allow_html=False, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.caption('This is a string that explains something above.')\nst.caption('A caption with _italics_ :blue[colors] and emojis :sunglasses:')\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.caption("This is a string that explains something above.")\nst.caption("A caption with _italics_ :blue[colors] and emojis :sunglasses:")\n
\n
\n", "description": "

Display text in small font.

\n

This should be used for captions, asides, footnotes, sidenotes, and\nother explanatory text.

\n", "args": [ { @@ -100703,7 +110597,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -100724,12 +110618,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L153" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L159" }, "streamlit.chat_input": { "name": "chat_input", "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, disabled=False, on_submit=None, args=None, kwargs=None)", - "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc). Create chat\ninterfaces embedded next to other content or have multiple chat bots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n
\n", + "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n
\n", "description": "

Display a chat input widget.

\n", "args": [ { @@ -100797,7 +110691,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/chat.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/chat.py#L232" }, "streamlit.chat_message": { "name": "chat_message", @@ -100818,7 +110712,7 @@ "type_name": "Anything supported by st.image, str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": "user" } ], @@ -100830,7 +110724,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/chat.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/chat.py#L121" }, "streamlit.checkbox": { "name": "checkbox", @@ -100843,7 +110737,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -100919,12 +110813,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/checkbox.py#L57" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", "signature": "st.code(body, language=\"python\", line_numbers=False)", - "example": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language='python')\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ { @@ -100953,7 +110847,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -100966,7 +110860,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -101042,12 +110936,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/color_picker.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\")", - "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n
\n", "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This\nis only possible in the main area of the app.

\n
\n", "args": [ { @@ -101083,12 +110977,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L147" }, "streamlit.connection": { "name": "connection", "signature": "st.connection(name, type=None, max_entries=None, ttl=None, **kwargs)", - "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql") # Config section defined in [connections.sql] in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection("my_sql_connection", type="sql") # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection("my_other_sql_connection") # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection("my_sql_connection", type="streamlit.connections.SQLConnection")\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", + "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql")  # [connections.sql] section in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection(\n    "my_sql_connection", type="sql"\n)  # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection(\n    "my_other_sql_connection"\n)  # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection(\n    "my_sql_connection", type="streamlit.connections.SQLConnection"\n)\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Config options, credentials, secrets, etc. for connections are taken from various\nsources:

\n
    \n
  • Any connection-specific configuration files.
  • \n
  • An app's secrets.toml files.
  • \n
  • The kwargs passed to this function.
  • \n
\n", "args": [ { @@ -101140,12 +111034,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", "signature": "st.container(*, height=None, border=None)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n   st.write("This is inside the container")\n\n   # You can call any Streamlit command, including custom components:\n   st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n
\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n
\n", "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ { @@ -101166,13 +111060,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L35" }, "streamlit.data_editor": { "name": "data_editor", "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n
\n", - "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", + "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n", "args": [ { "name": "data", @@ -101287,7 +111181,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/data_editor.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/data_editor.py#L578" }, "streamlit.dataframe": { "name": "dataframe", @@ -101384,7 +111278,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L269" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L246" }, "streamlit.date_input": { "name": "date_input", @@ -101397,7 +111291,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -101497,7 +111391,33 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/time_widgets.py#L518" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/time_widgets.py#L520" + }, + "streamlit.dialog": { + "name": "dialog", + "signature": "st.dialog(title, *, width=\"small\")", + "examples": "
\n

The following example demonstrates the basic usage of @st.dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n
\n", + "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing ESC on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.dialog inherits behavior from st.fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time.

\n
\n", + "args": [ + { + "name": "title", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The title to display at the top of the modal dialog. It cannot be empty.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"large\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the modal dialog. If width is "small (default), the\nmodal dialog will be 500 pixels wide. If width is "large", the\nmodal dialog will be about 750 pixels wide.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/dialog_decorator.py#L112" }, "streamlit.divider": { "name": "divider", @@ -101506,12 +111426,12 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L270" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L265" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n            label="Download image",\n            data=file,\n            file_name="flower.png",\n            mime="image/png"\n          )\n
\n
\n", + "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ { @@ -101519,7 +111439,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -101619,7 +111539,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L195" }, "streamlit.echo": { "name": "echo", @@ -101637,7 +111557,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -101646,7 +111566,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -101667,17 +111587,17 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", "signature": "st.exception(exception)", - "example": "
\n
\nimport streamlit as st\n\ne = RuntimeError('This is an exception of type RuntimeError')\nst.exception(e)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n
\n", "description": "

Display an exception.

\n", "args": [ { @@ -101690,7 +111610,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/exception.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -101703,7 +111623,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A string to use as the header for the expander. The label can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A string to use as the header for the expander. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -101719,242 +111639,28 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the expander label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the expander label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L445" - }, - "streamlit.experimental_connection": { - "name": "experimental_connection", - "signature": "st.experimental_connection(name, type=None, max_entries=None, ttl=None, **kwargs)", - "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql") # Config section defined in [connections.sql] in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection("my_sql_connection", type="sql") # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection("my_other_sql_connection") # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection("my_sql_connection", type="streamlit.connections.SQLConnection")\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", - "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Config options, credentials, secrets, etc. for connections are taken from various\nsources:

\n
    \n
  • Any connection-specific configuration files.
  • \n
  • An app's secrets.toml files.
  • \n
  • The kwargs passed to this function.
  • \n
\n", - "args": [ - { - "name": "name", - "type_name": "str", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The connection name used for secrets lookup in [connections.<name>].\nType will be inferred from passing "sql", "snowflake", or "snowpark".

\n", - "default": null - }, - { - "name": "type", - "type_name": "str, connection class, or None", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The type of connection to create. It can be a keyword ("sql", "snowflake",\nor "snowpark"), a path to an importable class, or an imported class reference.\nAll classes must extend st.connections.BaseConnection and implement the\n_connect() method. If the type kwarg is None, a type field must be set in\nthe connection's section in secrets.toml.

\n", - "default": null - }, - { - "name": "max_entries", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The maximum number of connections to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", - "default": "None" - }, - { - "name": "ttl", - "type_name": "float, timedelta, or None", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", - "default": "None" - }, - { - "name": "**kwargs", - "type_name": "any", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Additional connection specific kwargs that are passed to the Connection's\n_connect() method. Learn more from the specific Connection's documentation.

\n", - "default": null - } - ], - "returns": [ - { - "type_name": "Connection object", - "is_generator": false, - "description": "

An initialized Connection object of the specified type.

\n", - "return_name": null - } - ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/connection_factory.py#L205" - }, - "streamlit.experimental_data_editor": { - "name": "experimental_data_editor", - "signature": "st.experimental_data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n
\n", - "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n
\n

Warning

\n

When going from st.experimental_data_editor to st.data_editor in\n1.23.0, the data editor's representation in st.session_state was changed.\nThe edited_cells dictionary is now called edited_rows and uses a\ndifferent format ({0: {"column name": "edited value"}} instead of\n{"0:1": "edited value"}). You may need to adjust the code if your app uses\nst.experimental_data_editor in combination with st.session_state.

\n
\n", - "args": [ - { - "name": "data", - "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.DataFrame, list, set, tuple, dict, or None", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray, memoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and pandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing datetime.timedelta\nand pandas.Timedelta values will default to uneditable but this can be\nchanged through column configuration.
  • \n
\n
\n", - "default": "to" - }, - { - "name": "width", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Desired width of the data editor expressed in pixels. If width\nis None (default), Streamlit sets the data editor width to fit\nits contents up to the width of the parent container. If width\nis greater than the width of the parent container, Streamlit sets\nthe data editor width to match the width of the parent container.

\n", - "default": null - }, - { - "name": "height", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accomodate all rows.

\n", - "default": null - }, - { - "name": "use_container_width", - "type_name": "bool", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the data editor's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe data editor to match the width of the parent container.

\n", - "default": null - }, - { - "name": "hide_index", - "type_name": "bool or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Whether to hide the index column(s). If hide_index is None\n(default), the visibility of index columns is automatically\ndetermined based on the data.

\n", - "default": null - }, - { - "name": "column_order", - "type_name": "Iterable of str or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", - "default": null - }, - { - "name": "column_config", - "type_name": "dict or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", - "default": null - }, - { - "name": "num_rows", - "type_name": "\"fixed\" or \"dynamic\"", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Specifies if the user can add and delete rows in the data editor.\nIf "fixed", the user cannot add or delete rows. If "dynamic", the user can\nadd and delete rows in the data editor, but column sorting is disabled.\nDefaults to "fixed".

\n", - "default": "s" - }, - { - "name": "disabled", - "type_name": "bool or Iterable of str", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Controls the editing of columns. If True, editing is disabled for all columns.\nIf an Iterable of column names is provided (e.g., disabled=("col1", "col2")),\nonly the specified columns will be disabled for editing. If False (default),\nall columns that support editing are editable.

\n", - "default": null - }, - { - "name": "key", - "type_name": "str", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional string to use as the unique key for this widget. If this\nis omitted, a key will be generated for the widget based on its\ncontent. Multiple widgets of the same type may not share the same\nkey.

\n", - "default": null - }, - { - "name": "on_change", - "type_name": "callable", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional callback invoked when this data_editor's value changes.

\n", - "default": null - }, - { - "name": "args", - "type_name": "tuple", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", - "default": null - }, - { - "name": "kwargs", - "type_name": "dict", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional dict of kwargs to pass to the callback.

\n", - "default": null - } - ], - "returns": [ - { - "type_name": "pandas.DataFrame, pandas.Series, pyarrow.Table, numpy.ndarray, list, set, tuple, or dict.", - "is_generator": false, - "description": "

The edited data. The edited data is returned in its original data type if\nit corresponds to any of the supported return types. All other data types\nare returned as a pandas.DataFrame.

\n", - "return_name": null - } - ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/data_editor.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L433" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", "signature": "st.experimental_dialog(title, *, width=\"small\")", - "examples": "
\n

The following example demonstrates the basic usage of @st.experimental_dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.experimental_dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n
\n", - "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.experimental_dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing``ESC`` on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.experimental_dialog inherits behavior from st.experimental_fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time. Since a dialog is\nalso a fragment, all fragment limitations apply. Dialogs can't contain\nfragments, and fragments can't contain dialogs. Using dialogs in widget\ncallback functions is not supported.

\n
\n", - "args": [ - { - "name": "title", - "type_name": "str", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The title to display at the top of the modal dialog. It cannot be empty.

\n", - "default": null - }, - { - "name": "width", - "type_name": "\"small\", \"large\"", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The width of the modal dialog. If width is "small (default), the\nmodal dialog will be 500 pixels wide. If width is "large", the\nmodal dialog will be about 750 pixels wide.

\n", - "default": null - } - ], + "description": "

Deprecated alias for @st.dialog. See the docstring for the decorator's new name.

\n", + "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/dialog_decorator.py#L97" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/dialog_decorator.py#L221" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", "signature": "st.experimental_fragment(func=None, *, run_every=None)", - "examples": "
\n

The following example demonstrates basic usage of\n@st.experimental_fragment. As an anology, "inflating balloons" is a\nslow process that happens outside of the fragment. "Releasing balloons" is\na quick process that happens inside of the fragment.

\n
\nimport streamlit as st\nimport time\n\n@st.experimental_fragment\ndef release_the_balloons():\n    st.button("Release the balloons", help="Fragment rerun")\n    st.balloons()\n\nwith st.spinner("Inflating balloons..."):\n    time.sleep(5)\nrelease_the_balloons()\nst.button("Inflate more balloons", help="Full rerun")\n
\n

This next example demonstrates how elements both inside and outside of a\nfragement update with each app or fragment rerun. In this app, clicking\n"Rerun full app" will increment both counters and update all values\ndisplayed in the app. In contrast, clicking "Rerun fragment" will only\nincrement the counter within the fragment. In this case, the st.write\ncommand inside the fragment will update the app's frontend, but the two\nst.write commands outside the fragment will not update the frontend.

\n
\nimport streamlit as st\n\nif "app_runs" not in st.session_state:\n    st.session_state.app_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.experimental_fragment\ndef fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.app_runs += 1\nfragment()\nst.button("Rerun full app")\nst.write(f"Full app says it ran {st.session_state.app_runs} times.")\nst.write(f"Full app sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger an app rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.experimental_fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", - "description": "

Decorator to turn a function into a fragment which can rerun independently of the full app.

\n

When a user interacts with an input widget created inside a fragment,\nStreamlit only reruns the fragment instead of the full app. If\nrun_every is set, Streamlit will also rerun the fragment at the\nspecified interval while the session is active, even if the user is not\ninteracting with your app.

\n

To trigger an app rerun from inside a fragment, call st.rerun()\ndirectly. Any values from the fragment that need to be accessed from\nthe wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each app rerun. The rest of the app is persisted\nduring a fragment rerun. When a fragment renders elements into externally\ncreated containers, the elements will not be cleared with each fragment\nrerun. Instead, elements will accumulate in those containers with each\nfragment rerun, until the next app rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n
\n

Warning

\n
    \n
  • Fragments can't contain other fragments. Additionally, using\nfragments in widget callback functions is not supported.
  • \n
  • Fragments can only contain widgets in their main body. Fragments\ncan't render widgets to externally created containers.
  • \n
\n
\n", - "args": [ - { - "name": "func", - "type_name": "callable", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The function to turn into a fragment.

\n", - "default": null - }, - { - "name": "run_every", - "type_name": "int, float, timedelta, str, or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The time interval between automatic fragment reruns. This can be one of\nthe following:

\n
\n\n
\n

If run_every is None, the fragment will only rerun from\nuser-triggered events.

\n", - "default": null - } - ], + "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", + "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/fragment.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/fragment.py#L455" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -101970,85 +111676,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/experimental_query_params.py#L32" - }, - "streamlit.experimental_memo": { - "name": "experimental_memo", - "signature": "st.experimental_memo(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", - "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", - "args": [ - { - "name": "func", - "type_name": "callable", - "is_optional": false, - "is_kwarg_only": false, - "description": "

The function to cache. Streamlit hashes the function's source code.

\n", - "default": null - }, - { - "name": "ttl", - "type_name": "float, timedelta, str, or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n

Note that ttl will be ignored if persist="disk" or persist=True.

\n", - "default": null - }, - { - "name": "max_entries", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", - "default": "None" - }, - { - "name": "show_spinner", - "type_name": "bool or str", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached data is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", - "default": "True" - }, - { - "name": "persist", - "type_name": "\"disk\", bool, or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Optional location to persist cached data to. Passing "disk" (or True)\nwill persist the cached data to the local disk. None (or False) will disable\npersistence. The default is None.

\n", - "default": "None" - }, - { - "name": "experimental_allow_widgets", - "type_name": "bool", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", - "default": "False", - "deprecated": { - "deprecated": true, - "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" - } - }, - { - "name": "hash_funcs", - "type_name": "dict or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", - "default": null - } - ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L396" - }, - "streamlit.experimental_rerun": { - "name": "experimental_rerun", - "signature": "st.experimental_rerun()", - "description": "

Rerun the script immediately.

\n

When st.experimental_rerun() is called, the script is halted - no\nmore statements will be run, and the script will be queued to re-run\nfrom the top.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -102066,82 +111694,77 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/experimental_query_params.py#L70" }, - "streamlit.experimental_singleton": { - "name": "experimental_singleton", - "signature": "st.experimental_singleton(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", - "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", + "streamlit.feedback": { + "name": "feedback", + "signature": "st.feedback(options=\"thumbs\", *, key=None, disabled=False, on_change=None, args=None, kwargs=None)", + "examples": "
\n

Display a feedback widget with stars, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = ["one", "two", "three", "four", "five"]\nselected = st.feedback("stars")\nif selected is not None:\n    st.markdown(f"You selected {sentiment_mapping[selected]} star(s).")\n
\n

Display a feedback widget with thumbs, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = [":material/thumb_down:", ":material/thumb_up:"]\nselected = st.feedback("thumbs")\nif selected is not None:\n    st.markdown(f"You selected: {sentiment_mapping[selected]}")\n
\n
\n", + "description": "

Display a feedback widget.

\n

A feedback widget is an icon-based button group available in three\nstyles, as described in options. It is commonly used in chat and AI\napps to allow users to rate responses.

\n", "args": [ { - "name": "func", - "type_name": "callable", + "name": "options", + "type_name": "\"thumbs\", \"faces\", or \"stars\"", "is_optional": false, "is_kwarg_only": false, - "description": "

The function that creates the cached resource. Streamlit hashes the\nfunction's source code.

\n", + "description": "

The feedback options displayed to the user. options can be one\nof the following:

\n
    \n
  • "thumbs" (default): Streamlit displays a thumb-up and\nthumb-down button group.
  • \n
  • "faces": Streamlit displays a row of five buttons with\nfacial expressions depicting increasing satisfaction from left to\nright.
  • \n
  • "stars": Streamlit displays a row of star icons, allowing the\nuser to select a rating from one to five stars.
  • \n
\n", "default": null }, { - "name": "ttl", - "type_name": "float, timedelta, str, or None", + "name": "key", + "type_name": "str or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum time to keep an entry in the cache. Can be one of:

\n\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", "default": null }, { - "name": "max_entries", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The maximum number of entries to keep in the cache, or None\nfor an unbounded cache. When a new entry is added to a full cache,\nthe oldest cached entry will be removed. Defaults to None.

\n", - "default": "None" - }, - { - "name": "show_spinner", - "type_name": "bool or str", + "name": "disabled", + "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached resource is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", - "default": "True" + "description": "

An optional boolean, which disables the feedback widget if set\nto True. The default is False. This argument can only be supplied\nby keyword.

\n", + "default": "False" }, { - "name": "validate", - "type_name": "callable or None", + "name": "on_change", + "type_name": "callable", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional validation function for cached data. validate is called\neach time the cached value is accessed. It receives the cached value as\nits only parameter and it must return a boolean. If validate returns\nFalse, the current cached value is discarded, and the decorated function\nis called to compute a new value. This is useful e.g. to check the\nhealth of database connections.

\n", + "description": "

An optional callback invoked when this feedback widget's value\nchanges.

\n", "default": null }, { - "name": "experimental_allow_widgets", - "type_name": "bool", + "name": "args", + "type_name": "tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", - "default": "False", - "deprecated": { - "deprecated": true, - "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" - } + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null }, { - "name": "hash_funcs", - "type_name": "dict or None", + "name": "kwargs", + "type_name": "dict", "is_optional": false, "is_kwarg_only": true, - "description": "

Mapping of types or fully qualified names to hash functions.\nThis is used to override the behavior of the hasher inside Streamlit's\ncaching mechanism: when the hasher encounters an object, it will first\ncheck to see if its type matches a key in this dict and, if so, will use\nthe provided function to generate a hash for it. See below for an example\nof how this can be used.

\n", + "description": "

An optional dict of kwargs to pass to the callback.

\n", "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L265" + "returns": [ + { + "type_name": "int or None", + "is_generator": false, + "description": "

An integer indicating the user's selection, where 0 is the\nlowest feedback. Higher values indicate more positive feedback.\nIf no option was selected, the widget returns None.

\n
    \n
  • For options="thumbs", a return value of 0 indicates\nthumbs-down, and 1 indicates thumbs-up.
  • \n
  • For options="faces" and options="stars", return values\nrange from 0 (least satisfied) to 4 (most satisfied).
  • \n
\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button_group.py#L171" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n
\n", + "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Choose a CSV file", accept_multiple_files=True\n)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n
\n", "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml

\n", "args": [ { @@ -102149,7 +111772,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -102233,12 +111856,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/file_uploader.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", "signature": "st.form(key, clear_on_submit=False, *, border=True)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n   st.write("Inside the form")\n   slider_val = st.slider("Form slider")\n   checkbox_val = st.checkbox("Form checkbox")\n\n   # Every form must have a submit button.\n   submitted = st.form_submit_button("Submit")\n   if submitted:\n       st.write("slider", slider_val, "checkbox", checkbox_val)\n\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n
\n", + "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n    st.write("Inside the form")\n    slider_val = st.slider("Form slider")\n    checkbox_val = st.checkbox("Form checkbox")\n\n    # Every form must have a submit button.\n    submitted = st.form_submit_button("Submit")\n    if submitted:\n        st.write("slider", slider_val, "checkbox", checkbox_val)\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n
\n", "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ { @@ -102267,7 +111890,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/form.py#L115" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -102347,7 +111970,33 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/form.py#L230" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/form.py#L229" + }, + "streamlit.fragment": { + "name": "fragment", + "signature": "st.fragment(func=None, *, run_every=None)", + "examples": "
\n

The following example demonstrates basic usage of\n@st.fragment. As an analogy, "inflating balloons" is a slow process that happens\noutside of the fragment. "Releasing balloons" is a quick process that happens inside\nof the fragment.

\n
\nimport streamlit as st\nimport time\n\n@st.fragment\ndef release_the_balloons():\n    st.button("Release the balloons", help="Fragment rerun")\n    st.balloons()\n\nwith st.spinner("Inflating balloons..."):\n    time.sleep(5)\nrelease_the_balloons()\nst.button("Inflate more balloons", help="Full rerun")\n
\n

This next example demonstrates how elements both inside and outside of a\nfragement update with each app or fragment rerun. In this app, clicking\n"Rerun full app" will increment both counters and update all values\ndisplayed in the app. In contrast, clicking "Rerun fragment" will only\nincrement the counter within the fragment. In this case, the st.write\ncommand inside the fragment will update the app's frontend, but the two\nst.write commands outside the fragment will not update the frontend.

\n
\nimport streamlit as st\n\nif "app_runs" not in st.session_state:\n    st.session_state.app_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.fragment\ndef my_fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.app_runs += 1\nmy_fragment()\nst.button("Rerun full app")\nst.write(f"Full app says it ran {st.session_state.app_runs} times.")\nst.write(f"Full app sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger an app rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", + "description": "

Decorator to turn a function into a fragment which can rerun independently of the full app.

\n

When a user interacts with an input widget created inside a fragment,\nStreamlit only reruns the fragment instead of the full app. If\nrun_every is set, Streamlit will also rerun the fragment at the\nspecified interval while the session is active, even if the user is not\ninteracting with your app.

\n

To trigger an app rerun from inside a fragment, call st.rerun()\ndirectly. To trigger a fragment rerun from within itself, call\nst.rerun(scope="fragment"). Any values from the fragment that need to\nbe accessed from the wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each app rerun. The rest of the app is persisted\nduring a fragment rerun. When a fragment renders elements into externally\ncreated containers, the elements will not be cleared with each fragment\nrerun. Instead, elements will accumulate in those containers with each\nfragment rerun, until the next app rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n
\n

Warning

\n
    \n
  • Fragments can only contain widgets in their main body. Fragments\ncan't render widgets to externally created containers.
  • \n
\n
\n", + "args": [ + { + "name": "func", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The function to turn into a fragment.

\n", + "default": null + }, + { + "name": "run_every", + "type_name": "int, float, timedelta, str, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The time interval between automatic fragment reruns. This can be one of\nthe following:

\n
\n\n
\n

If run_every is None, the fragment will only rerun from\nuser-triggered events.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/fragment.py#L290" }, "streamlit.get_option": { "name": "get_option", @@ -102364,17 +112013,17 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/config.py#L128" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/config.py#L126" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge('run', 'intr')\ngraph.edge('intr', 'runbl')\ngraph.edge('runbl', 'run')\ngraph.edge('run', 'kernel')\ngraph.edge('kernel', 'zombie')\ngraph.edge('kernel', 'sleep')\ngraph.edge('kernel', 'runmem')\ngraph.edge('sleep', 'swap')\ngraph.edge('swap', 'runswap')\ngraph.edge('runswap', 'new')\ngraph.edge('runswap', 'runmem')\ngraph.edge('new', 'runmem')\ngraph.edge('sleep', 'runmem')\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge("run", "intr")\ngraph.edge("intr", "runbl")\ngraph.edge("runbl", "run")\ngraph.edge("run", "kernel")\ngraph.edge("kernel", "zombie")\ngraph.edge("kernel", "sleep")\ngraph.edge("kernel", "runmem")\ngraph.edge("sleep", "swap")\ngraph.edge("swap", "runswap")\ngraph.edge("runswap", "new")\ngraph.edge("runswap", "runmem")\ngraph.edge("new", "runmem")\ngraph.edge("sleep", "runmem")\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n
\n", "description": "

Display a graph using the dagre-d3 library.

\n", "args": [ { "name": "figure_or_dot", - "type_name": "graphviz.dot.Graph, graphviz.dot.Digraph, str", + "type_name": "graphviz.dot.Graph, graphviz.dot.Digraph, graphviz.sources.Source, str", "is_optional": false, "is_kwarg_only": false, "description": "

The Graphlib graph object or dot string to display

\n", @@ -102390,12 +112039,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/graphviz_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", "signature": "st.header(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.header('This is a header with a divider', divider='rainbow')\nst.header('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.header("_Streamlit_ is :blue[cool] :sunglasses:")\nst.header("This is a header with a divider", divider="gray")\nst.header("These headers have rotating dividers", divider=True)\nst.header("One", divider=True)\nst.header("Two", divider=True)\nst.header("Three", divider=True)\nst.header("Four", divider=True)\n
\n
\n", "description": "

Display text in header formatting.

\n", "args": [ { @@ -102403,7 +112052,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -102432,12 +112081,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", "signature": "st.help(obj=)", - "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog('poodle', 'white')\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", + "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ { @@ -102450,12 +112099,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", "signature": "st.html(body)", - "example": "
\n
\nimport streamlit as st\n\nst.html("<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>")\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n
\n", "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", "args": [ { @@ -102468,12 +112117,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\")", - "example": "
\n
\nimport streamlit as st\nst.image('sunrise.jpg', caption='Sunrise by the mountains')\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nst.image("sunrise.jpg", caption="Sunrise by the mountains")\n
\n
\n", "description": "

Display an image or list of images.

\n", "args": [ { @@ -102534,7 +112183,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/image.py#L84" }, "streamlit.info": { "name": "info", @@ -102555,17 +112204,17 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", "signature": "st.json(body, *, expanded=True)", - "example": "
\n
\nimport streamlit as st\n\nst.json({\n    'foo': 'bar',\n    'baz': 'boz',\n    'stuff': [\n        'stuff 1',\n        'stuff 2',\n        'stuff 3',\n        'stuff 5',\n    ],\n})\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "baz": "boz",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n            "stuff 5",\n        ],\n    }\n)\n
\n
\n", "description": "

Display object or string as a pretty-printed JSON string.

\n", "args": [ { @@ -102586,7 +112235,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/json.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/json.py#L38" }, "streamlit.latex": { "name": "latex", @@ -102612,12 +112261,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L217" }, "streamlit.line_chart": { "name": "line_chart", "signature": "st.line_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n   {\n       "col1": np.random.randn(20),\n       "col2": np.random.randn(20),\n       "col3": np.random.choice(["A", "B", "C"], 20),\n   }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\n\nst.line_chart(\n   chart_data, x="col1", y=["col2", "col3"], color=["#FF0000", "#0000FF"]  # Optional\n)\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.line_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n
\n", "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -102694,7 +112343,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L563" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L550" }, "streamlit.link_button": { "name": "link_button", @@ -102707,7 +112356,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -102752,12 +112401,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L378" }, "streamlit.logo": { "name": "logo", "signature": "st.logo(image, *, link=None, icon_image=None)", - "examples": "

A common design practice is to use a wider logo in the sidebar, and a\nsmaller, icon-styled logo in your app's main body.

\n
\nimport streamlit as st\n\nst.logo(LOGO_URL_LARGE, link="https://streamlit.io/gallery", icon_image=LOGO_URL_SMALL)\n
\n

Try switching logos around in the following example:

\n
\nimport streamlit as st\n\nHORIZONTAL_RED = "images/horizontal_red.png"\nICON_RED = "images/icon_red.png"\nHORIZONTAL_BLUE = "images/horizontal_blue.png"\nICON_BLUE = "images/icon_blue.png"\n\noptions = [HORIZONTAL_RED, ICON_RED, HORIZONTAL_BLUE, ICON_BLUE]\nsidebar_logo = st.selectbox("Sidebar logo", options, 0)\nmain_body_logo = st.selectbox("Main body logo", options, 1)\n\nst.logo(sidebar_logo, icon_image=main_body_logo)\nst.sidebar.markdown("Hi!")\n
\n", + "examples": "

A common design practice is to use a wider logo in the sidebar, and a\nsmaller, icon-styled logo in your app's main body.

\n
\nimport streamlit as st\n\nst.logo(\n    LOGO_URL_LARGE,\n    link="https://streamlit.io/gallery",\n    icon_image=LOGO_URL_SMALL,\n)\n
\n

Try switching logos around in the following example:

\n
\nimport streamlit as st\n\nHORIZONTAL_RED = "images/horizontal_red.png"\nICON_RED = "images/icon_red.png"\nHORIZONTAL_BLUE = "images/horizontal_blue.png"\nICON_BLUE = "images/icon_blue.png"\n\noptions = [HORIZONTAL_RED, ICON_RED, HORIZONTAL_BLUE, ICON_BLUE]\nsidebar_logo = st.selectbox("Sidebar logo", options, 0)\nmain_body_logo = st.selectbox("Main body logo", options, 1)\n\nst.logo(sidebar_logo, icon_image=main_body_logo)\nst.sidebar.markdown("Hi!")\n
\n", "description": "

Renders a logo in the upper-left corner of your app and its sidebar.

\n

If st.logo is called multiple times within a page, Streamlit will\nrender the image passed in the last call. For the most consistent results,\ncall st.logo early in your page script and choose an image that works\nwell in both light and dark mode. Avoid empty margins around your image.

\n

If your logo does not work well for both light and dark mode, consider\nsetting the theme and hiding the settings menu from users with the\nconfiguration option\nclient.toolbarMode="minimal".

\n", "args": [ { @@ -102786,7 +112435,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/logo.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/logo.py#L31" }, "streamlit.map": { "name": "map", @@ -102852,7 +112501,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/map.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/map.py#L73" }, "streamlit.markdown": { "name": "markdown", @@ -102865,7 +112514,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The string to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -102886,12 +112535,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5,\n    delta_color="inverse")\n\nst.metric(label="Active developers", value=123, delta=123,\n    delta_color="off")\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ { @@ -102899,7 +112548,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The header or title for the metric. The label can optionally contain\nMarkdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The header or title for the metric. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -102944,12 +112593,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/metric.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"])\n\nst.write("You selected:", options)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ { @@ -102957,7 +112606,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -103037,7 +112686,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected. Defaults to 'Choose an option'.

\n", + "description": "

A string to display when no options are selected.\nDefaults to 'Choose an option'.

\n", "default": "s" }, { @@ -103065,13 +112714,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/multiselect.py#L145" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/multiselect.py#L114" }, "streamlit.navigation": { "name": "navigation", "signature": "st.navigation(pages, *, position=\"sidebar\")", - "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

You can declare pages from callables or file paths.

\n
\nimport streamlit as st\nfrom page_functions import page1\n\npg = st.navigation([st.Page(page1), st.Page("page2.py")])\npg.run()\n
\n

Use a dictionary to create sections within your navigation menu.

\n
\nimport streamlit as st\n\npages = {\n    "Your account" : [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account")\n    ],\n    "Resources" : [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out")\n    ]\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation(st.Page(page1), st.Page(page2))\npg.run()\n
\n", - "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe page object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", + "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

You can declare pages from callables or file paths.

\n
\nimport streamlit as st\nfrom page_functions import page1\n\npg = st.navigation([st.Page(page1), st.Page("page2.py")])\npg.run()\n
\n

Use a dictionary to create sections within your navigation menu.

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([st.Page(page1), st.Page(page2)])\npg.run()\n
\n", + "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", "args": [ { "name": "pages", @@ -103098,12 +112747,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/navigation.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/navigation.py#L55" }, "streamlit.number_input": { "name": "number_input", "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number", value=None, placeholder="Type a number...")\nst.write("The current number is ", number)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input(\n    "Insert a number", value=None, placeholder="Type a number..."\n)\nst.write("The current number is ", number)\n
\n
\n", "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -103111,7 +112760,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -103151,7 +112800,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. Output must be purely numeric. This does not impact\nthe return value. Valid formatters: %d %e %f %g %i %u

\n", + "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. The output must be purely numeric. This does not\nimpact the return value of the widget. Formatting is handled by\nsprintf.js.

\n

For example, format="%0.1f" adjusts the displayed decimal\nprecision to only show one digit after the decimal.

\n", "default": null }, { @@ -103227,7 +112876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/number_input.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/number_input.py#L118" }, "streamlit.page_link": { "name": "page_link", @@ -103248,15 +112897,15 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

The label for the page link. Labels are required for external pages.\nLabels can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, and Emojis.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The label for the page link. Labels are required for external pages.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { "name": "icon", - "type_name": "str, None", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null }, { @@ -103285,7 +112934,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/button.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L465" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -103358,7 +113007,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L310" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -103371,7 +113020,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The label of the button that opens the popover container.\nThe label can optionally contain Markdown and supports the\nfollowing elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • \n
    Emoji shortcodes, such as :+1: and :sunglasses:.
    \n
    For a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
    \n
    \n
  • \n
  • \n
    LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
    \n
    must be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
    \n
    \n
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The label of the button that opens the popover container.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -103400,7 +113049,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L569" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L547" }, "streamlit.progress": { "name": "progress", @@ -103421,17 +113070,17 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A message to display above the progress bar. The text can optionally\ncontain Markdown and supports the following elements: Bold, Italics,\nStrikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

A message to display above the progress bar. The text can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, use_container_width=False)", - "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n   np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n   columns=['lat', 'lon'])\n\nst.pydeck_chart(pdk.Deck(\n    map_style=None,\n    initial_view_state=pdk.ViewState(\n        latitude=37.76,\n        longitude=-122.4,\n        zoom=11,\n        pitch=50,\n    ),\n    layers=[\n        pdk.Layer(\n           'HexagonLayer',\n           data=chart_data,\n           get_position='[lon, lat]',\n           radius=200,\n           elevation_scale=4,\n           elevation_range=[0, 1000],\n           pickable=True,\n           extruded=True,\n        ),\n        pdk.Layer(\n            'ScatterplotLayer',\n            data=chart_data,\n            get_position='[lon, lat]',\n            get_color='[200, 30, 0, 160]',\n            get_radius=200,\n        ),\n    ],\n))\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", + "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { @@ -103452,13 +113101,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", - "notes": "
\n
\n

Note

\n

Deprecation warning. After December 1st, 2020, we will remove the ability\nto specify no arguments in st.pyplot(), as that requires the use of\nMatplotlib's global figure object, which is not thread-safe. So\nplease always pass a figure object as shown in the example section\nabove.

\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", - "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", "description": "

Display a matplotlib.pyplot figure.

\n", "args": [ { @@ -103466,7 +113114,7 @@ "type_name": "Matplotlib Figure", "is_optional": false, "is_kwarg_only": false, - "description": "

The figure to plot. When this argument isn't specified, this\nfunction will render the global figure (but this is deprecated,\nas described below)

\n", + "description": "

The Matplotlib Figure object to render. See\nhttps://matplotlib.org/stable/gallery/index.html for examples.

\n
\n

Note

\n

When this argument isn't specified, this function will render the global\nMatplotlib figure object. However, this feature is deprecated and\nwill be removed in a later version.

\n
\n", "default": null }, { @@ -103495,12 +113143,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/pyplot.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning."])\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions=[\n        "Laugh out loud.",\n        "Get the popcorn.",\n        "Never stop learning.",\n    ],\n)\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n
\n", "description": "

Display a radio button widget.

\n", "args": [ { @@ -103508,7 +113156,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -103616,20 +113264,29 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/radio.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/radio.py#L84" }, "streamlit.rerun": { "name": "rerun", - "signature": "st.rerun()", - "description": "

Rerun the script immediately.

\n

When st.rerun() is called, the script is halted - no more statements will\nbe run, and the script will be queued to re-run from the top.

\n", - "args": [], + "signature": "st.rerun(*, scope=\"app\")", + "description": "

Rerun the script immediately.

\n

When st.rerun() is called, Streamlit halts the current script run and\nexecutes no further statements. Streamlit immediately queues the script to\nrerun.

\n

When using st.rerun in a fragment, you can scope the rerun to the\nfragment. However, if a fragment is running as part of a full-app rerun,\na fragment-scoped rerun is not allowed.

\n", + "args": [ + { + "name": "scope", + "type_name": "\"app\" or \"fragment\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies what part of the app should rerun. If scope is "app"\n(default), the full app reruns. If scope is "fragment",\nStreamlit only reruns the fragment from which this command is called.

\n

Setting scope="fragment" is only valid inside a fragment during a\nfragment rerun. If st.rerun(scope="fragment") is called during a\nfull-app rerun or outside of a fragment, Streamlit will raise a\nStreamlitAPIException.

\n", + "default": null + } + ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L106" }, "streamlit.scatter_chart": { "name": "scatter_chart", "signature": "st.scatter_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, size=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["col1", "col2", "col3"])\nchart_data['col4'] = np.random.choice(['A','B','C'], 20)\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y='col2',\n    color='col4',\n    size='col3',\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"])\n\nst.scatter_chart(\n    chart_data,\n    x='col1',\n    y=['col2', 'col3'],\n    size='col4',\n    color=['#FF0000', '#0000FF'],  # Optional\n)\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\nchart_data["col4"] = np.random.choice(["A", "B", "C"], 20)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y="col2",\n    color="col4",\n    size="col3",\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"]\n)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    size="col4",\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n
\n", "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -103714,12 +113371,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1168" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1253" }, "streamlit.select_slider": { "name": "select_slider", "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"])\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=["red", "orange", "yellow", "green", "blue", "indigo", "violet"],\n    value=("red", "blue"))\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n", + "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=[\n        "red",\n        "orange",\n        "yellow",\n        "green",\n        "blue",\n        "indigo",\n        "violet",\n    ],\n)\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=[\n        "red",\n        "orange",\n        "yellow",\n        "green",\n        "blue",\n        "indigo",\n        "violet",\n    ],\n    value=("red", "blue"),\n)\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n", "description": "

Display a slider widget to select items from a list.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.select_slider and st.slider is that\nselect_slider accepts any datatype and takes an iterable set of\noptions, while st.slider only accepts numerical or date/time data and\ntakes a range as input.

\n", "args": [ { @@ -103727,7 +113384,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -103819,12 +113476,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/select_slider.py#L108" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/select_slider.py#L105" }, "streamlit.selectbox": { "name": "selectbox", "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"))\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n   "How would you like to be contacted?",\n   ("Email", "Home phone", "Mobile phone"),\n   index=None,\n   placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n
\n", "description": "

Display a select widget.

\n", "args": [ { @@ -103832,7 +113489,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -103932,12 +113589,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/selectbox.py#L81" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/selectbox.py#L77" }, "streamlit.set_option": { "name": "set_option", "signature": "st.set_option(key, value)", - "description": "

Set config option.

\n
\n
Currently, only the following config options can be set within the script itself:
\n
    \n
  • client.caching
  • \n
  • client.displayEnabled
  • \n
  • deprecation.*
  • \n
\n
\n
\n

Calling with any other options will raise StreamlitAPIException.

\n

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

\n", + "description": "

Set config option.

\n
\n
Currently, only the following config options can be set within the script itself:
\n
    \n
  • client.caching
  • \n
\n
\n
\n

Calling with any other options will raise StreamlitAPIException.

\n

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

\n", "args": [ { "name": "key", @@ -103957,7 +113614,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -103978,7 +113635,7 @@ "type_name": "Anything supported by st.image, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", + "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", "default": null }, { @@ -104007,12 +113664,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/page_config.py#L119" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/page_config.py#L119" }, "streamlit.slider": { "name": "slider", "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider(\n    "Select a range of values",\n    0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:",\n    value=(time(11, 30), time(12, 45)))\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm")\nst.write("Start time:", start_time)\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider("Select a range of values", 0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:", value=(time(11, 30), time(12, 45))\n)\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm",\n)\nst.write("Start time:", start_time)\n
\n
\n", "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -104020,7 +113677,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -104128,7 +113785,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/slider.py#L167" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/slider.py#L169" }, "streamlit.snow": { "name": "snow", @@ -104137,12 +113794,12 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", "signature": "st.spinner(text=\"In progress...\")", - "example": "
\n
\nimport time\nimport streamlit as st\n\nwith st.spinner('Wait for it...'):\n    time.sleep(5)\nst.success('Done!')\n
\n
\n", + "example": "
\n
\nimport time\nimport streamlit as st\n\nwith st.spinner('Wait for it...'):\n    time.sleep(5)\nst.success("Done!")\n
\n
\n", "description": "

Temporarily displays a message while executing a block of code.

\n", "args": [ { @@ -104155,12 +113812,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", "signature": "st.status(label, *, expanded=False, state=\"running\")", - "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(label="Download complete!", state="complete", expanded=False)\n\nst.button("Rerun")\n
\n
\n", + "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(\n        label="Download complete!", state="complete", expanded=False\n    )\n\nst.button("Rerun")\n
\n
\n", "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", "args": [ { @@ -104168,7 +113825,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The initial label of the status container. The label can optionally\ncontain Markdown and supports the following elements: Bold,\nItalics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents)\nrender. Display unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

The initial label of the status container. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -104196,21 +113853,21 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L693" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L662" }, "streamlit.stop": { "name": "stop", "signature": "st.stop()", - "example": "
\n
\nimport streamlit as st\n\nname = st.text_input('Name')\nif not name:\n  st.warning('Please input a name.')\n  st.stop()\nst.success('Thank you for inputting a name.')\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nname = st.text_input("Name")\nif not name:\n  st.warning('Please input a name.')\n  st.stop()\nst.success("Thank you for inputting a name.")\n
\n
\n", "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L36" }, "streamlit.subheader": { "name": "subheader", "signature": "st.subheader(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.subheader('This is a subheader with a divider', divider='rainbow')\nst.subheader('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.subheader("_Streamlit_ is :blue[cool] :sunglasses:")\nst.subheader("This is a subheader with a divider", divider="gray")\nst.subheader("These subheaders have rotating dividers", divider=True)\nst.subheader("One", divider=True)\nst.subheader("Two", divider=True)\nst.subheader("Three", divider=True)\nst.subheader("Four", divider=True)\n
\n
\n", "description": "

Display text in subheader formatting.

\n", "args": [ { @@ -104218,7 +113875,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -104247,7 +113904,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L110" }, "streamlit.success": { "name": "success", @@ -104268,12 +113925,12 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -104291,12 +113948,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/commands/execution_control.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L153" }, "streamlit.table": { "name": "table", "signature": "st.table(data=None)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5)))\n\nst.table(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n
\n", "description": "

Display a static table.

\n

This differs from st.dataframe in that the table in this case is\nstatic: its entire contents are laid out directly on the page.

\n", "args": [ { @@ -104309,12 +113966,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L588" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L572" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs)", - "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n   st.header("A cat")\n   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\n\nwith tab2:\n   st.header("A dog")\n   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\n\nwith tab3:\n   st.header("An owl")\n   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n
\n", + "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n
\n", "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", "args": [ { @@ -104322,7 +113979,7 @@ "type_name": "list of str", "is_optional": false, "is_kwarg_only": false, - "description": "

Creates a tab for each string in the list. The first tab is selected by default.\nThe string is used as the name of the tab and can optionally contain Markdown,\nsupporting the following elements: Bold, Italics, Strikethroughs, Inline Code,\nEmojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n", + "description": "

Creates a tab for each string in the list. The first tab is selected\nby default. The string is used as the name of the tab and can\noptionally contain GitHub-flavored Markdown of the following types:\nBold, Italics, Strikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null } ], @@ -104334,12 +113991,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/layouts.py#L330" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L330" }, "streamlit.text": { "name": "text", "signature": "st.text(body, *, help=None)", - "example": "
\n
\nimport streamlit as st\n\nst.text('This is some text.')\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nst.text("This is some text.")\n
\n
\n", "description": "

Write fixed-width and preformatted text.

\n", "args": [ { @@ -104360,12 +114017,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n    )\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n)\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n
\n", "description": "

Display a multi-line text input widget.

\n", "args": [ { @@ -104373,7 +114030,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -104473,7 +114130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/text_widgets.py#L388" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/text_widgets.py#L393" }, "streamlit.text_input": { "name": "text_input", @@ -104486,7 +114143,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -104594,7 +114251,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -104607,7 +114264,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -104691,12 +114348,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/time_widgets.py#L291" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/time_widgets.py#L293" }, "streamlit.title": { "name": "title", "signature": "st.title(body, anchor=None, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.title('This is a title')\nst.title('_Streamlit_ is :blue[cool] :sunglasses:')\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nst.title("This is a title")\nst.title("_Streamlit_ is :blue[cool] :sunglasses:")\n
\n
\n", "description": "

Display text in title formatting.

\n

Each document should have a single st.title(), although this is not\nenforced.

\n", "args": [ { @@ -104704,7 +114361,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -104725,12 +114382,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/heading.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L177" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -104738,7 +114395,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as Github-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The string to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -104746,12 +114403,12 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -104764,7 +114421,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain Markdown and supports the following\nelements: Bold, Italics, Strikethroughs, Inline Code, Emojis, and Links.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n

Unsupported elements are unwrapped so only their children (text contents) render.\nDisplay unsupported elements as literal characters by\nbackslash-escaping them. E.g. 1\\. Not an ordered list.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", "default": null }, { @@ -104840,7 +114497,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/widgets/checkbox.py#L163" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/checkbox.py#L164" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -104921,12 +114578,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L1554" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1643" }, "streamlit.video": { "name": "video", "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False)", - "example": "
\n
\nimport streamlit as st\n\nvideo_file = open('myvideo.mp4', 'rb')\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nvideo_file = open("myvideo.mp4", "rb")\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", "description": "

Display a video player.

\n", "args": [ { @@ -104995,7 +114652,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/media.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/media.py#L197" }, "streamlit.warning": { "name": "warning", @@ -105016,17 +114673,17 @@ "type_name": "str, None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (outlined style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", - "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write('Hello, *World!* :sunglasses:')\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(pd.DataFrame({\n    'first column': [1, 2, 3, 4],\n    'second column': [10, 20, 30, 40],\n}))\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write('1 + 1 = ', 2)\nst.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.')\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(\n    np.random.randn(200, 3),\n    columns=['a', 'b', 'c'])\n\nc = alt.Chart(df).mark_circle().encode(\n    x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])\n\nst.write(c)\n
\n
\n", + "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n
\n", "description": "

Write arguments to the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit commands,\nwrite() has some unique properties:

\n
    \n
  1. You can pass in multiple arguments, all of which will be written.
  2. \n
  3. Its behavior depends on the input types as follows.
  4. \n
  5. It returns None, so its "slot" in the App cannot be reused.
  6. \n
\n", "args": [ { @@ -105059,7 +114716,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/write.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/write.py#L233" }, "streamlit.write_stream": { "name": "write_stream", @@ -105084,15 +114741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/write.py#L59" - }, - "streamlit.experimental_memo.clear": { - "name": "experimental_memo.clear", - "signature": "st.experimental_memo.clear()", - "description": "

Clear all in-memory and on-disk data caches.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L608" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/write.py#L59" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -105100,15 +114749,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_data_api.py#L608" - }, - "streamlit.experimental_singleton.clear": { - "name": "experimental_singleton.clear", - "signature": "st.experimental_singleton.clear()", - "description": "

Clear all cache_resource caches.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_data_api.py#L597" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -105116,7 +114757,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_resource_api.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" }, "streamlit.query_params.clear": { "name": "clear", @@ -105131,7 +114772,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -105149,7 +114790,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -105173,7 +114814,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -105188,7 +114829,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -105213,7 +114854,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -105227,11 +114868,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -105248,11 +114889,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -105268,12 +114909,12 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L251" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L255" }, { "name": "query", "signature": "st.connections.query.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("select * from pet_owners where owner = :owner", ttl=3600, params={"owner":"barbara"})\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "select * from pet_owners where owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only query.

", "args": [ { @@ -105341,7 +114982,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L125" }, { "name": "reset", @@ -105350,7 +114991,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -105360,7 +115001,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L270" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L274" }, { "name": "engine", @@ -105368,7 +115009,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L266" }, { "name": "session", @@ -105377,10 +115018,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L282" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L49", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L49", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -105397,7 +115038,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L264" }, { "name": "query", @@ -105446,7 +115087,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L121" }, { "name": "reset", @@ -105455,7 +115096,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -105463,7 +115104,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L281" }, { "name": "write_pandas", @@ -105478,7 +115119,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L226" } ], "properties": [ @@ -105488,10 +115129,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L272" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L42", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -105533,7 +115174,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -105542,7 +115183,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -105551,7 +115192,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -105562,10 +115203,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -105576,7 +115217,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L251" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L255" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -105584,7 +115225,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L270" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L274" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -105592,12 +115233,12 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L266" }, "streamlit.connections.SQLConnection.query": { "name": "query", "signature": "SQLConnection.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("select * from pet_owners where owner = :owner", ttl=3600, params={"owner":"barbara"})\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "select * from pet_owners where owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n

Aside from the ttl kwarg, all kwargs passed to this function are passed down\nto pandas.read_sql\nand have the behavior described in the pandas documentation.

\n", "args": [ { @@ -105665,7 +115306,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L125" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -105674,7 +115315,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -105683,7 +115324,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/sql_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L282" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -105716,7 +115357,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -105725,7 +115366,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -105734,7 +115375,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -105743,7 +115384,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -105751,7 +115392,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L264" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -105800,7 +115441,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -105808,7 +115449,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L272" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -105817,7 +115458,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -105825,7 +115466,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L281" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -105840,7 +115481,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L226" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -105849,7 +115490,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -105899,7 +115540,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L948" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -105949,7 +115590,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L787" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -106007,7 +115648,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L606" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L606" }, "streamlit.column_config.Column": { "name": "Column", @@ -106057,7 +115698,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -106147,7 +115788,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1400" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -106245,7 +115886,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1165" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -106279,7 +115920,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -106329,7 +115970,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L867" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L867" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -106411,7 +116052,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -106445,7 +116086,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1100" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1100" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -106535,7 +116176,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -106593,7 +116234,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1513" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1513" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -106659,7 +116300,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L688" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L688" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -106733,7 +116374,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -106823,7 +116464,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/column_types.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1286" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -106863,7 +116504,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/components/v1/component_registry.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/components/v1/component_registry.py#L50" }, "streamlit.components.v1.html": { "name": "html", @@ -106905,7 +116546,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -106947,12 +116588,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", "signature": "element.add_rows(data=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart({\n    'mark': 'line',\n    'encoding': {'x': 'a', 'y': 'b'},\n    'datasets': {\n      'some_fancy_name': df1,  # <-- named dataset\n     },\n    'data': {'name': 'some_fancy_name'},\n}),\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n
\n", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart(\n    {\n        "mark": "line",\n        "encoding": {"x": "a", "y": "b"},\n        "datasets": {\n            "some_fancy_name": df1,  # <-- named dataset\n        },\n        "data": {"name": "some_fancy_name"},\n    }\n)\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n
\n", "description": "

Concatenate a dataframe to the bottom of the current one.

\n", "args": [ { @@ -106973,7 +116614,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L619" }, "StatusContainer.update": { "name": "update", @@ -107006,7 +116647,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/lib/mutable_status_container.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/mutable_status_container.py#L98" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -107035,7 +116676,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -107059,7 +116700,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L368" }, { "name": "switch_page", @@ -107083,7 +116724,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L391" } ], "properties": [ @@ -107100,7 +116741,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L444" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L445" + }, + { + "name": "button_group", + "signature": "st.testing.v1.button_group.button_group", + "description": "

Sequence of all st.feedback widgets.

", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ButtonGroup", + "is_generator": false, + "description": "

Sequence of all st.feedback widgets. Individual widgets can be\naccessed from a WidgetList by index (order on the page) or key. For\nexample, at.button_group[0] for the first widget or\nat.button_group(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -107115,7 +116771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L459" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -107130,7 +116786,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L473" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -107145,7 +116801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -107160,7 +116816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L501" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -107175,7 +116831,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -107190,7 +116846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -107205,7 +116861,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L543" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -107220,7 +116876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -107235,7 +116891,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L574" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -107250,7 +116906,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L588" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -107265,7 +116921,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L602" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -107280,7 +116936,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L616" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -107295,7 +116951,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L630" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -107310,7 +116966,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L644" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -107325,7 +116981,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L658" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -107340,7 +116996,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L672" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -107355,7 +117011,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L686" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -107370,7 +117026,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -107385,7 +117041,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L700" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -107400,7 +117056,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L714" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -107415,7 +117071,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L728" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -107430,7 +117086,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L742" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -107445,7 +117101,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L756" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -107460,7 +117116,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L770" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -107475,7 +117131,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L784" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -107490,7 +117146,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L431" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -107505,7 +117161,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L798" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -107520,7 +117176,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L840" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -107535,7 +117191,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -107550,7 +117206,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -107565,7 +117221,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L854" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -107580,7 +117236,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L868" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -107595,7 +117251,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -107610,7 +117266,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L902" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -107625,7 +117281,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L916" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -107640,7 +117296,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L930" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -107655,7 +117311,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L944" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -107670,7 +117326,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -107685,7 +117341,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L972" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -107700,10 +117356,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L986" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L95", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L96", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -107743,7 +117399,22 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L444" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L445" + }, + "AppTest.button_group": { + "name": "button_group", + "signature": "AppTest.button_group", + "description": "

Sequence of all st.feedback widgets.

\n", + "args": [], + "returns": [ + { + "type_name": "WidgetList of ButtonGroup", + "is_generator": false, + "description": "

Sequence of all st.feedback widgets. Individual widgets can be\naccessed from a WidgetList by index (order on the page) or key. For\nexample, at.button_group[0] for the first widget or\nat.button_group(key="my_key") for a widget with a given key.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -107758,7 +117429,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L459" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -107773,7 +117444,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L473" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -107788,7 +117459,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -107803,7 +117474,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L501" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -107818,7 +117489,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L515" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -107833,7 +117504,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -107848,7 +117519,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L543" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -107863,7 +117534,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -107878,7 +117549,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L574" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -107893,7 +117564,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L588" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -107908,7 +117579,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L602" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -107923,7 +117594,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L616" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -107938,7 +117609,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L630" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -107970,7 +117641,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -108018,7 +117689,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -108050,7 +117721,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L175" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -108074,7 +117745,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -108089,7 +117760,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L644" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -108104,7 +117775,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L658" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -108119,7 +117790,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L672" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -108134,7 +117805,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L686" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -108149,7 +117820,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -108164,7 +117835,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L700" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -108179,7 +117850,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L714" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -108194,7 +117865,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L728" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -108209,7 +117880,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L742" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -108224,7 +117895,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L756" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -108248,7 +117919,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L368" }, "AppTest.select_slider": { "name": "select_slider", @@ -108263,7 +117934,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L770" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -108278,7 +117949,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L784" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -108293,7 +117964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L431" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -108308,7 +117979,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L798" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -108323,7 +117994,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L840" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -108338,7 +118009,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -108353,7 +118024,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -108377,7 +118048,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L391" }, "AppTest.table": { "name": "table", @@ -108392,7 +118063,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L854" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -108407,7 +118078,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L868" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -108422,7 +118093,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -108437,7 +118108,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L902" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -108452,7 +118123,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L916" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -108467,7 +118138,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L930" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -108482,7 +118153,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L944" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -108497,7 +118168,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -108512,7 +118183,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L972" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -108527,7 +118198,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/app_test.py#L986" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -108540,7 +118211,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L341" }, { "name": "run", @@ -108557,7 +118228,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108565,7 +118236,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L336" } ], "properties": [ @@ -108575,14 +118246,92 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L326" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L303", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] }, + "streamlit.testing.v1.element_tree.ButtonGroup": { + "name": "ButtonGroup", + "signature": "st.testing.v1.element_tree.ButtonGroup(proto, root)", + "is_class": true, + "methods": [ + { + "name": "run", + "signature": "st.testing.v1.element_tree.run.run(*, timeout=None)", + "description": "

Run the AppTest script which contains the element.

", + "args": [ + { + "name": "timeout", + "type_name": null, + "is_optional": null, + "is_kwarg_only": true, + "description": "

The maximum number of seconds to run the script. None means\nuse the AppTest's default.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + }, + { + "name": "select", + "signature": "st.testing.v1.element_tree.select.select(v)", + "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L751" + }, + { + "name": "set_value", + "signature": "st.testing.v1.element_tree.set_value.set_value(v)", + "description": "

Set the value of the multiselect widget. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L745" + }, + { + "name": "unselect", + "signature": "st.testing.v1.element_tree.unselect.unselect(v)", + "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L766" + } + ], + "properties": [ + { + "name": "format_func", + "signature": "st.testing.v1.element_tree.format_func.format_func", + "description": "

The widget's formatting function for displaying options. (callable)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L739" + }, + { + "name": "indices", + "signature": "st.testing.v1.element_tree.indices.indices", + "description": "

The indices of the currently selected values from the options. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L734" + }, + { + "name": "value", + "signature": "st.testing.v1.element_tree.value.value", + "description": "

The currently selected values from the options. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L724" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L698", + "description": "

A representation of button_group that is used by st.feedback.

\n", + "args": [], + "returns": [] + }, "streamlit.testing.v1.element_tree.ChatInput": { "name": "ChatInput", "signature": "st.testing.v1.element_tree.ChatInput(proto, root)", @@ -108603,7 +118352,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108611,7 +118360,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L358" } ], "properties": [ @@ -108621,10 +118370,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L371" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L346", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -108640,7 +118389,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L419" }, { "name": "run", @@ -108657,7 +118406,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108665,7 +118414,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L414" }, { "name": "uncheck", @@ -108673,7 +118422,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L423" } ], "properties": [ @@ -108683,10 +118432,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L404" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L382", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -108702,7 +118451,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L491" }, { "name": "run", @@ -108719,7 +118468,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108727,7 +118476,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L486" } ], "properties": [ @@ -108737,10 +118486,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L465" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L450", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -108765,7 +118514,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108773,7 +118522,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L537" } ], "properties": [ @@ -108783,10 +118532,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L551" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L517", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -108811,7 +118560,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" } ], "properties": [ @@ -108821,10 +118570,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L105", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -108849,7 +118598,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -108857,7 +118606,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L753" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L839" }, { "name": "set_value", @@ -108865,7 +118614,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L833" }, { "name": "unselect", @@ -108873,7 +118622,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L768" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L854" } ], "properties": [ @@ -108883,7 +118632,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L741" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L827" }, { "name": "indices", @@ -108891,7 +118640,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L736" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L822" }, { "name": "value", @@ -108899,10 +118648,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L726" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L812" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L783", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -108918,7 +118667,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L927" }, { "name": "increment", @@ -108926,7 +118675,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L833" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L919" }, { "name": "run", @@ -108943,7 +118692,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108951,7 +118700,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L808" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L894" } ], "properties": [ @@ -108961,10 +118710,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L907" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L788", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L874", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -108989,7 +118738,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -108997,7 +118746,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L892" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L978" } ], "properties": [ @@ -109007,7 +118756,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L886" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L972" }, { "name": "index", @@ -109015,7 +118764,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L955" }, { "name": "value", @@ -109023,10 +118772,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L876" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L962" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L850", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L936", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -109051,7 +118800,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -109059,7 +118808,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1038" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1124" }, { "name": "set_value", @@ -109067,7 +118816,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1000" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1086" } ], "properties": [ @@ -109077,7 +118826,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1118" }, { "name": "value", @@ -109085,10 +118834,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1021" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1107" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L982", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1068", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -109113,7 +118862,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "select", @@ -109121,7 +118870,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1045" }, { "name": "select_index", @@ -109129,7 +118878,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1049" }, { "name": "set_value", @@ -109137,7 +118886,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1040" } ], "properties": [ @@ -109147,7 +118896,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1034" }, { "name": "index", @@ -109155,7 +118904,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L928" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1014" }, { "name": "value", @@ -109163,10 +118912,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L938" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1024" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L910", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L996", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -109191,7 +118940,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_range", @@ -109199,7 +118948,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1091" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1177" }, { "name": "set_value", @@ -109207,7 +118956,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1062" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1148" } ], "properties": [ @@ -109217,10 +118966,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1080" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1043", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1129", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -109236,7 +118985,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1172" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1258" }, { "name": "run", @@ -109253,7 +119002,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -109261,7 +119010,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1148" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1234" } ], "properties": [ @@ -109271,10 +119020,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1161" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1247" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1130", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1216", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -109290,7 +119039,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1225" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1311" }, { "name": "run", @@ -109307,7 +119056,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -109315,7 +119064,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1201" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1287" } ], "properties": [ @@ -109325,10 +119074,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1214" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1300" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1183", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1269", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -109344,7 +119093,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1290" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1376" }, { "name": "increment", @@ -109352,7 +119101,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1283" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1369" }, { "name": "run", @@ -109369,7 +119118,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -109377,7 +119126,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1255" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1341" } ], "properties": [ @@ -109387,10 +119136,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1271" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1357" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1239", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1325", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -109415,7 +119164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -109423,7 +119172,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1347" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1433" } ], "properties": [ @@ -109433,10 +119182,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1337" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1423" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L1314", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1400", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -109461,7 +119210,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" }, { "name": "set_value", @@ -109469,7 +119218,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L195" } ], "properties": [ @@ -109479,10 +119228,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L134" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L180", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -109500,7 +119249,25 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L84" + }, + "context.cookies": { + "name": "cookies", + "signature": "context.cookies", + "examples": "
\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n
\n", + "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L177" + }, + "context.headers": { + "name": "headers", + "signature": "context.headers", + "examples": "
\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n
\n", + "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L135" }, "CachedFunc.clear": { "name": "clear", @@ -109526,7 +119293,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/runtime/caching/cache_utils.py#L309" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_utils.py#L306" }, "StreamlitPage": { "name": "StreamlitPage", @@ -109539,7 +119306,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L254" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L259" } ], "properties": [ @@ -109549,7 +119316,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L231" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L236" }, { "name": "title", @@ -109557,7 +119324,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L225" }, { "name": "url_path", @@ -109565,10 +119332,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L244" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L127", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L132", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -109601,7 +119368,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L231" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L236" }, "StreamlitPage.run": { "name": "run", @@ -109609,7 +119376,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L254" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L259" }, "StreamlitPage.title": { "name": "title", @@ -109617,7 +119384,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L225" }, "StreamlitPage.url_path": { "name": "url_path", @@ -109625,7 +119392,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/navigation/page.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L244" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -109645,11 +119412,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L84" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L34", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -109662,12 +119429,42 @@ ], "returns": [] }, + "streamlit.context": { + "name": "context", + "signature": "st.context()", + "is_class": true, + "methods": [], + "properties": [ + { + "name": "cookies", + "signature": "st.cookies.cookies", + "examples": "
\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n
\n", + "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L177" + }, + { + "name": "headers", + "signature": "st.headers.headers", + "examples": "
\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n
\n", + "description": "

A read-only, dict-like object containing headers sent in the initial request.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L135" + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L124", + "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", + "args": [], + "returns": [] + }, "PlotlyState": { "name": "PlotlyState", "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L175", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L170", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -109687,7 +119484,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/plotly_chart.py#L87", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L82", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -109728,8 +119525,8 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/vega_charts.py#L104", - "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point seleciton parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(st.session_state.data, spec, key="vega_chart", on_select="rerun")\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L100", + "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point seleciton parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -109748,7 +119545,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L148", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L125", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -109767,7 +119564,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.36.0/lib/streamlit/elements/arrow.py#L90", + "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L67", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -109790,7 +119587,7 @@ "is_attribute_dict": true } }, - "1.37.0": { + "1.38.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -109846,7 +119643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -109911,7 +119708,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1489" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1482" }, "streamlit.area_chart": { "name": "area_chart", @@ -109921,7 +119718,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -110001,7 +119798,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L747" }, "streamlit.audio": { "name": "audio", @@ -110067,7 +119864,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/media.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/media.py#L65" }, "streamlit.balloons": { "name": "balloons", @@ -110076,7 +119873,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -110086,7 +119883,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, or dict", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -110174,7 +119971,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L986" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L983" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -110200,7 +119997,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -110289,12 +120086,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L78" }, "streamlit.cache": { "name": "cache", "signature": "st.cache(func=None, persist=False, allow_output_mutation=False, show_spinner=True, suppress_st_warning=False, hash_funcs=None, max_entries=None, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to True:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id) like this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to\nTrue:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id)\nlike this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n
\n", "description": "

Legacy caching decorator (deprecated).

\n

Legacy caching with st.cache has been removed from Streamlit. This is\nnow an alias for st.cache_data and st.cache_resource.

\n", "args": [ { @@ -110342,7 +120139,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Mapping of types or fully qualified names to hash functions. This is used to override\nthe behavior of the hasher inside Streamlit's caching mechanism: when the hasher\nencounters an object, it will first check to see if its type matches a key in this\ndict and, if so, will use the provided function to generate a hash for it. See below\nfor an example of how this can be used.

\n", + "description": "

Mapping of types or fully qualified names to hash functions. This is used to\noverride the behavior of the hasher inside Streamlit's caching mechanism: when\nthe hasher encounters an object, it will first check to see if its type matches\na key in this dict and, if so, will use the provided function to generate a hash\nfor it. See below for an example of how this can be used.

\n", "default": null }, { @@ -110363,7 +120160,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -110416,11 +120213,11 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "description": "

Allow widgets to be used in the cached function. Defaults to False.

\n", "default": "False", "deprecated": { "deprecated": true, - "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + "deprecatedText": "

The cached widget replay functionality was removed in 1.38. Please\nremove the experimental_allow_widgets parameter from your\ncaching decorators. This parameter will be removed in a future\nversion.

\n" } }, { @@ -110433,7 +120230,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_data_api.py#L387" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -110486,11 +120283,11 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.\nSupport for widgets in cached functions is currently experimental.\nSetting this parameter to True may lead to excessive memory use since the\nwidget value is treated as an additional input parameter to the cache.

\n", + "description": "

Allow widgets to be used in the cached function. Defaults to False.

\n", "default": "False", "deprecated": { "deprecated": true, - "deprecatedText": "

experimental_allow_widgets is deprecated and will be removed in\na later version.

\n" + "deprecatedText": "

The cached widget replay functionality was removed in 1.38. Please\nremove the experimental_allow_widgets parameter from your\ncaching decorators. This parameter will be removed in a future\nversion.

\n" } }, { @@ -110503,7 +120300,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_resource_api.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -110584,7 +120381,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", @@ -110618,7 +120415,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L159" }, "streamlit.chat_input": { "name": "chat_input", @@ -110691,7 +120488,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/chat.py#L232" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/chat.py#L233" }, "streamlit.chat_message": { "name": "chat_message", @@ -110724,7 +120521,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/chat.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/chat.py#L122" }, "streamlit.checkbox": { "name": "checkbox", @@ -110813,11 +120610,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", - "signature": "st.code(body, language=\"python\", line_numbers=False)", + "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False)", "example": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ @@ -110841,13 +120638,21 @@ "name": "line_numbers", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

An optional boolean indicating whether to show line numbers to the\nleft of the code block. Defaults to False.

\n", "default": "s" + }, + { + "name": "wrap_lines", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean indicating whether to wrap lines. Defaults\nto False.

\n", + "default": "s" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -110936,7 +120741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -110977,7 +120782,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L148" }, "streamlit.connection": { "name": "connection", @@ -111034,7 +120839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -111060,7 +120865,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L36" }, "streamlit.data_editor": { "name": "data_editor", @@ -111070,10 +120875,10 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.DataFrame, list, set, tuple, dict, or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray, memoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and pandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing datetime.timedelta\nand pandas.Timedelta values will default to uneditable but this can be\nchanged through column configuration.
  • \n
\n
\n", + "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray,\nmemoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and\npandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing\ndatetime.timedelta and pandas.Timedelta values will\ndefault to uneditable, but this can be changed through column\nconfiguration.
  • \n
\n
\n", "default": "to" }, { @@ -111181,20 +120986,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/data_editor.py#L578" }, "streamlit.dataframe": { "name": "dataframe", "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\")", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Or you can customize the dataframe via column_config, hide_index, or column_order:

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", - "description": "

Display a dataframe as an interactive table.

\n

This command works with dataframes from Pandas, PyArrow, Snowpark, and PySpark.\nIt can also display several other types that can be converted to dataframes,\ne.g. numpy arrays, lists, sets and dictionaries.

\n", + "description": "

Display a dataframe as an interactive table.

\n

This command works with a wide variety of collection-like and\ndataframe-like object types.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Series, pandas.Styler, pandas.Index, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "type_name": "dataframe-like, collection-like, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to display.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\npandas styling features, like bar charts, hovering, and captions.

\n", + "description": "

The data to display.

\n

Dataframe-like objects include dataframe and series objects from\npopular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow,\nSnowpark, Xarray, and more. You can use database cursors and\nclients that comply with the\nPython Database API Specification v2.0 (PEP 249). Additionally, you can use\nanything that supports the Python dataframe interchange protocol.

\n

For example, you can use the following:

\n
    \n
  • pandas.DataFrame, pandas.Series, pandas.Index,\npandas.Styler, and pandas.Array
  • \n
  • polars.DataFrame, polars.LazyFrame, and polars.Series
  • \n
  • snowflake.snowpark.dataframe.DataFrame,\nsnowflake.snowpark.table.Table
  • \n
\n

If a data type is not recognized, Streamlit will convert the object\nto a pandas.DataFrame or pyarrow.Table using a\n.to_pandas() or .to_arrow() method, respectively, if\navailable.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\nstyling options, like bar charts, hovering, and captions. For\nthese styling options, use column configuration instead.

\n

Collection-like objects include all Python-native Collection\ntypes, such as dict, list, and set.

\n

If data is None, Streamlit renders an empty table.

\n", "default": null }, { @@ -111278,7 +121083,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L257" }, "streamlit.date_input": { "name": "date_input", @@ -111391,7 +121196,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/time_widgets.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/time_widgets.py#L520" }, "streamlit.dialog": { "name": "dialog", @@ -111417,7 +121222,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/dialog_decorator.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -111426,7 +121231,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L265" }, "streamlit.download_button": { "name": "download_button", @@ -111539,7 +121344,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L195" }, "streamlit.echo": { "name": "echo", @@ -111557,7 +121362,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -111566,7 +121371,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -111592,7 +121397,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -111610,7 +121415,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -111644,15 +121449,15 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L433" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L434" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", "signature": "st.experimental_dialog(title, *, width=\"small\")", - "description": "

Deprecated alias for @st.dialog. See the docstring for the decorator's new name.

\n", + "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/dialog_decorator.py#L221" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -111660,7 +121465,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/fragment.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/fragment.py#L474" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -111676,7 +121481,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/experimental_query_params.py#L32" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -111694,7 +121499,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/experimental_query_params.py#L70" }, "streamlit.feedback": { "name": "feedback", @@ -111759,7 +121564,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button_group.py#L171" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button_group.py#L190" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -111856,7 +121661,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", @@ -111890,7 +121695,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/form.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -111970,7 +121775,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/form.py#L229" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/form.py#L170" }, "streamlit.fragment": { "name": "fragment", @@ -111996,7 +121801,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/fragment.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/fragment.py#L309" }, "streamlit.get_option": { "name": "get_option", @@ -112013,7 +121818,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/config.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/config.py#L126" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -112039,7 +121844,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", @@ -112081,11 +121886,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -112099,7 +121904,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -112117,7 +121922,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", @@ -112183,7 +121988,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/image.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/image.py#L85" }, "streamlit.info": { "name": "info", @@ -112209,13 +122014,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", "signature": "st.json(body, *, expanded=True)", - "example": "
\n
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "baz": "boz",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n            "stuff 5",\n        ],\n    }\n)\n
\n
\n", - "description": "

Display object or string as a pretty-printed JSON string.

\n", + "example": "
\n
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n        ],\n        "level1": {"level2": {"level3": {"a": "b"}}},\n    },\n    expanded=2,\n)\n
\n
\n", + "description": "

Display an object or string as a pretty-printed, interactive JSON string.

\n", "args": [ { "name": "body", @@ -112227,15 +122032,15 @@ }, { "name": "expanded", - "type_name": "bool", + "type_name": "bool or int", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean that allows the user to set whether the initial\nstate of this json element should be expanded. Defaults to True.

\n", - "default": "True" + "description": "

The initial expansion state of the JSON element. This can be one\nof the following:

\n
    \n
  • True (default): The element is fully expanded.
  • \n
  • False: The element is fully collapsed.
  • \n
  • An integer: The element is expanded to the depth specified. The\ninteger must be non-negative. expanded=0 is equivalent to\nexpanded=False.
  • \n
\n

Regardless of the initial expansion state, users can collapse or\nexpand any key-value pair to show or hide any part of the object.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/json.py#L38" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", @@ -112261,7 +122066,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L217" }, "streamlit.line_chart": { "name": "line_chart", @@ -112271,7 +122076,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -112343,7 +122148,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L551" }, "streamlit.link_button": { "name": "link_button", @@ -112401,7 +122206,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L378" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L378" }, "streamlit.logo": { "name": "logo", @@ -112435,17 +122240,17 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/logo.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/logo.py#L31" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=['lat', 'lon'])\n\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color='#0044ff')\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n    "col1": np.random.randn(1000) / 50 + 37.76,\n    "col2": np.random.randn(1000) / 50 + -122.4,\n    "col3": np.random.randn(1000) * 100,\n    "col4": np.random.rand(1000, 4).tolist(),\n})\n\nst.map(df,\n    latitude='col1',\n    longitude='col2',\n    size='col3',\n    color='col4')\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n
\n", "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

The data to be plotted.

\n", @@ -112501,7 +122306,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/map.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/map.py#L73" }, "streamlit.markdown": { "name": "markdown", @@ -112535,7 +122340,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -112593,7 +122398,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -112614,7 +122419,7 @@ "type_name": "Iterable", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", "default": null }, { @@ -112714,7 +122519,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/multiselect.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/multiselect.py#L114" }, "streamlit.navigation": { "name": "navigation", @@ -112747,7 +122552,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/navigation.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/navigation.py#L55" }, "streamlit.number_input": { "name": "number_input", @@ -112876,7 +122681,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/number_input.py#L118" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/number_input.py#L164" }, "streamlit.page_link": { "name": "page_link", @@ -112934,7 +122739,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/button.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L465" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -113007,7 +122812,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -113049,7 +122854,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L547" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L548" }, "streamlit.progress": { "name": "progress", @@ -113075,7 +122880,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -113101,7 +122906,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" }, "streamlit.pyplot": { "name": "pyplot", @@ -113143,7 +122948,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -113164,7 +122969,7 @@ "type_name": "Iterable", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.

\n

Labels can include markdown as described in the label parameter\nand will be cast to str internally by default.

\n", + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n

Labels can include markdown as described in the label parameter\nand will be cast to str internally by default.

\n", "default": null }, { @@ -113264,7 +123069,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/radio.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/radio.py#L122" }, "streamlit.rerun": { "name": "rerun", @@ -113281,7 +123086,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L106" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L101" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -113291,7 +123096,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

Data to be plotted.

\n", @@ -113371,7 +123176,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1253" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1248" }, "streamlit.select_slider": { "name": "select_slider", @@ -113392,7 +123197,7 @@ "type_name": "Iterable", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", "default": null }, { @@ -113476,7 +123281,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/select_slider.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/select_slider.py#L157" }, "streamlit.selectbox": { "name": "selectbox", @@ -113497,7 +123302,7 @@ "type_name": "Iterable", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. For example, this can\nbe a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or\npandas.Index. For pandas.DataFrame, the first column is used.\nEach label will be cast to str internally by default.

\n", + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", "default": null }, { @@ -113589,7 +123394,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/selectbox.py#L77" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/selectbox.py#L113" }, "streamlit.set_option": { "name": "set_option", @@ -113614,7 +123419,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -113664,7 +123469,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/page_config.py#L119" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/page_config.py#L119" }, "streamlit.slider": { "name": "slider", @@ -113785,7 +123590,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/slider.py#L169" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/slider.py#L334" }, "streamlit.snow": { "name": "snow", @@ -113794,7 +123599,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -113812,7 +123617,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -113853,7 +123658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L662" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L663" }, "streamlit.stop": { "name": "stop", @@ -113862,7 +123667,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L33" }, "streamlit.subheader": { "name": "subheader", @@ -113904,7 +123709,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L110" }, "streamlit.success": { "name": "success", @@ -113930,7 +123735,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -113948,7 +123753,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/commands/execution_control.py#L153" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L148" }, "streamlit.table": { "name": "table", @@ -113958,7 +123763,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

The table data.

\n", @@ -113966,7 +123771,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L572" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L600" }, "streamlit.tabs": { "name": "tabs", @@ -113991,7 +123796,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/layouts.py#L330" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L331" }, "streamlit.text": { "name": "text", @@ -114017,7 +123822,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -114130,7 +123935,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/text_widgets.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/text_widgets.py#L393" }, "streamlit.text_input": { "name": "text_input", @@ -114251,7 +124056,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -114348,7 +124153,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/time_widgets.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/time_widgets.py#L293" }, "streamlit.title": { "name": "title", @@ -114382,12 +124187,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/heading.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L177" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -114408,7 +124213,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -114497,7 +124302,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/widgets/checkbox.py#L164" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/checkbox.py#L164" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -114507,7 +124312,7 @@ "args": [ { "name": "data", - "type_name": "pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, Iterable, dict, or None", + "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, "description": "

Either the data to be plotted or a Vega-Lite spec containing the\ndata (which more closely follows the Vega-Lite API).

\n", @@ -114578,7 +124383,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L1643" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1636" }, "streamlit.video": { "name": "video", @@ -114652,7 +124457,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/media.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/media.py#L197" }, "streamlit.warning": { "name": "warning", @@ -114678,7 +124483,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -114691,7 +124496,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(data_frame) : Displays the DataFrame as a table.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(dict) : Displays dict in an interactive widget.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", + "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(dataframe) : Displays any dataframe-like object in an interactive table.
  • \n
  • write(dict) : Displays dict-like in an interactive viewer.
  • \n
  • write(list) : Displays list-like in an interactive viewer.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(db_cursor) : Displays DB API 2.0 cursor results in a table.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", "default": null }, { @@ -114716,7 +124521,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/write.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/write.py#L240" }, "streamlit.write_stream": { "name": "write_stream", @@ -114741,7 +124546,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/write.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/write.py#L66" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -114749,7 +124554,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_data_api.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -114757,7 +124562,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_resource_api.py#L446" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" }, "streamlit.query_params.clear": { "name": "clear", @@ -114772,7 +124577,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -114790,7 +124595,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -114814,7 +124619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -114829,7 +124634,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -114854,7 +124659,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -114868,11 +124673,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -114889,11 +124694,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -114909,7 +124714,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L260" }, { "name": "query", @@ -114982,7 +124787,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L130" }, { "name": "reset", @@ -114991,7 +124796,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -115001,7 +124806,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L279" }, { "name": "engine", @@ -115009,7 +124814,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L271" }, { "name": "session", @@ -115018,10 +124823,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L287" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L49", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -115038,7 +124843,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L264" }, { "name": "query", @@ -115087,7 +124892,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L121" }, { "name": "reset", @@ -115096,7 +124901,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -115104,7 +124909,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L281" }, { "name": "write_pandas", @@ -115119,7 +124924,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L226" } ], "properties": [ @@ -115129,10 +124934,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L272" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L42", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -115174,7 +124979,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -115183,7 +124988,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -115192,7 +124997,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -115203,10 +125008,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -115217,7 +125022,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L260" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -115225,7 +125030,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L279" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -115233,7 +125038,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L271" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -115306,7 +125111,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L130" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -115315,7 +125120,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -115324,7 +125129,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/sql_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L287" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -115357,7 +125162,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -115366,7 +125171,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -115375,7 +125180,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -115384,7 +125189,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -115392,7 +125197,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L264" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -115441,7 +125246,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -115449,7 +125254,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L272" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -115458,7 +125263,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -115466,7 +125271,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L281" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -115481,7 +125286,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L226" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -115490,7 +125295,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -115540,7 +125345,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L948" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -115590,7 +125395,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L787" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -115648,7 +125453,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L606" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L606" }, "streamlit.column_config.Column": { "name": "Column", @@ -115698,7 +125503,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -115788,7 +125593,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1400" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -115886,7 +125691,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1165" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -115920,7 +125725,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -115970,12 +125775,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L867" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L867" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None, display_text=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate="^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text="https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate=r"^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text=r"https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a link column in st.dataframe or st.data_editor.

\n

The cell values need to be string and will be shown as clickable links.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor. When used with st.data_editor, editing will be enabled\nwith a text input widget.

\n", "args": [ { @@ -116052,7 +125857,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L475" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -116086,7 +125891,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1100" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1100" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -116176,7 +125981,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -116234,7 +126039,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1513" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1513" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -116300,12 +126105,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L688" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L688" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate="^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate=r"^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a text column in st.dataframe or st.data_editor.

\n

This is the default column type for string values. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor. When used with\nst.data_editor, editing will be enabled with a text input widget.

\n", "args": [ { @@ -116374,7 +126179,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L381" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -116464,7 +126269,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/column_types.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1286" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -116504,7 +126309,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/components/v1/component_registry.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/components/v1/component_registry.py#L50" }, "streamlit.components.v1.html": { "name": "html", @@ -116546,7 +126351,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -116588,7 +126393,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -116614,7 +126419,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L619" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L649" }, "StatusContainer.update": { "name": "update", @@ -116647,7 +126452,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/lib/mutable_status_container.py#L98" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -116676,7 +126481,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -116700,7 +126505,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L368" }, { "name": "switch_page", @@ -116724,7 +126529,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L391" } ], "properties": [ @@ -116741,7 +126546,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -116756,7 +126561,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -116771,7 +126576,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -116786,7 +126591,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -116801,7 +126606,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -116816,7 +126621,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -116831,7 +126636,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -116846,7 +126651,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -116861,7 +126666,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -116876,7 +126681,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -116891,7 +126696,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -116906,7 +126711,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -116921,7 +126726,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -116936,7 +126741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -116951,7 +126756,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -116966,7 +126771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -116981,7 +126786,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -116996,7 +126801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -117011,7 +126816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -117026,7 +126831,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -117041,7 +126846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -117056,7 +126861,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -117071,7 +126876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -117086,7 +126891,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -117101,7 +126906,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -117116,7 +126921,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -117131,7 +126936,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -117146,7 +126951,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -117161,7 +126966,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -117176,7 +126981,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -117191,7 +126996,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -117206,7 +127011,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -117221,7 +127026,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -117236,7 +127041,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -117251,7 +127056,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -117266,7 +127071,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -117281,7 +127086,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -117296,7 +127101,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -117311,7 +127116,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -117326,7 +127131,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -117341,7 +127146,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -117356,10 +127161,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L96", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L96", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", "args": [ { @@ -117399,7 +127204,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -117414,7 +127219,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -117429,7 +127234,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -117444,7 +127249,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -117459,7 +127264,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -117474,7 +127279,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -117489,7 +127294,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -117504,7 +127309,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -117519,7 +127324,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -117534,7 +127339,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -117549,7 +127354,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -117564,7 +127369,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -117579,7 +127384,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -117594,7 +127399,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -117609,7 +127414,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -117641,7 +127446,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -117689,7 +127494,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -117721,7 +127526,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -117745,7 +127550,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -117760,7 +127565,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -117775,7 +127580,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -117790,7 +127595,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -117805,7 +127610,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -117820,7 +127625,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -117835,7 +127640,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -117850,7 +127655,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -117865,7 +127670,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -117880,7 +127685,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -117895,7 +127700,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -117919,7 +127724,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L368" }, "AppTest.select_slider": { "name": "select_slider", @@ -117934,7 +127739,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -117949,7 +127754,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -117964,7 +127769,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -117979,7 +127784,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -117994,7 +127799,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -118009,7 +127814,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -118024,7 +127829,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -118048,7 +127853,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L391" }, "AppTest.table": { "name": "table", @@ -118063,7 +127868,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -118078,7 +127883,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -118093,7 +127898,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -118108,7 +127913,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -118123,7 +127928,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -118138,7 +127943,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -118153,7 +127958,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -118168,7 +127973,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -118183,7 +127988,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -118198,7 +128003,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -118211,7 +128016,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L341" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -118228,7 +128033,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118236,7 +128041,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L336" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -118246,10 +128051,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L326" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L303", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -118274,7 +128079,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -118282,7 +128087,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L750" }, { "name": "set_value", @@ -118290,7 +128095,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -118298,7 +128103,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L766" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L765" } ], "properties": [ @@ -118308,7 +128113,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "indices", @@ -118316,7 +128121,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L734" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "value", @@ -118324,10 +128129,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L724" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L723" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L698", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -118352,7 +128157,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118360,7 +128165,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L358" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -118370,10 +128175,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L346", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -118389,7 +128194,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -118406,7 +128211,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118414,7 +128219,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -118422,7 +128227,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -118432,10 +128237,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L404" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L382", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -118451,7 +128256,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L491" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -118468,7 +128273,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118476,7 +128281,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L486" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -118486,10 +128291,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L450", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -118514,7 +128319,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118522,7 +128327,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L537" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -118532,10 +128337,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L517", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -118560,7 +128365,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -118570,10 +128375,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L105", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -118598,7 +128403,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -118606,7 +128411,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L839" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -118614,7 +128419,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L833" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -118622,7 +128427,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L854" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L853" } ], "properties": [ @@ -118632,7 +128437,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -118640,7 +128445,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L822" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L821" }, { "name": "value", @@ -118648,10 +128453,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L811" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L783", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L782", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -118667,7 +128472,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L927" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L926" }, { "name": "increment", @@ -118675,7 +128480,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L918" }, { "name": "run", @@ -118692,7 +128497,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118700,7 +128505,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L894" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L893" } ], "properties": [ @@ -118710,10 +128515,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L907" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L906" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L874", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L873", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -118738,7 +128543,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -118746,7 +128551,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L978" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L977" } ], "properties": [ @@ -118756,7 +128561,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L972" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L971" }, { "name": "index", @@ -118764,7 +128569,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L955" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "value", @@ -118772,10 +128577,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L962" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L961" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L936", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L935", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -118800,7 +128605,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -118808,7 +128613,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1124" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1123" }, { "name": "set_value", @@ -118816,7 +128621,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1086" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1085" } ], "properties": [ @@ -118826,7 +128631,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1118" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "value", @@ -118834,10 +128639,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1107" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1106" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1068", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1067", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -118862,7 +128667,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -118870,7 +128675,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1045" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1044" }, { "name": "select_index", @@ -118878,7 +128683,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1049" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "set_value", @@ -118886,7 +128691,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1040" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1039" } ], "properties": [ @@ -118896,7 +128701,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1034" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1033" }, { "name": "index", @@ -118904,7 +128709,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1014" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1013" }, { "name": "value", @@ -118912,10 +128717,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1023" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L996", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L995", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -118940,7 +128745,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -118948,7 +128753,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1177" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "set_value", @@ -118956,7 +128761,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1148" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1147" } ], "properties": [ @@ -118966,10 +128771,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1166" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1129", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1128", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -118985,7 +128790,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1258" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1257" }, { "name": "run", @@ -119002,7 +128807,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -119010,7 +128815,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1234" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1233" } ], "properties": [ @@ -119020,10 +128825,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1247" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1216", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1215", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -119039,7 +128844,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1311" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1310" }, { "name": "run", @@ -119056,7 +128861,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -119064,7 +128869,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1287" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1286" } ], "properties": [ @@ -119074,10 +128879,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1300" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1299" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1269", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1268", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -119093,7 +128898,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1376" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1375" }, { "name": "increment", @@ -119101,7 +128906,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1369" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1368" }, { "name": "run", @@ -119118,7 +128923,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -119126,7 +128931,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1341" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1340" } ], "properties": [ @@ -119136,10 +128941,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1357" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1325", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1324", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -119164,7 +128969,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -119172,7 +128977,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1433" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1432" } ], "properties": [ @@ -119182,10 +128987,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1423" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1422" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L1400", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1399", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -119210,7 +129015,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -119218,7 +129023,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -119228,10 +129033,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/testing/v1/element_tree.py#L180", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -119249,7 +129054,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L86" }, "context.cookies": { "name": "cookies", @@ -119258,7 +129063,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L178" }, "context.headers": { "name": "headers", @@ -119267,7 +129072,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L136" }, "CachedFunc.clear": { "name": "clear", @@ -119293,7 +129098,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/caching/cache_utils.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_utils.py#L317" }, "StreamlitPage": { "name": "StreamlitPage", @@ -119306,7 +129111,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L259" } ], "properties": [ @@ -119316,7 +129121,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L236" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L236" }, { "name": "title", @@ -119324,7 +129129,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L225" }, { "name": "url_path", @@ -119332,10 +129137,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L244" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L132", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L132", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -119368,7 +129173,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L236" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L236" }, "StreamlitPage.run": { "name": "run", @@ -119376,7 +129181,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L259" }, "StreamlitPage.title": { "name": "title", @@ -119384,7 +129189,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L225" }, "StreamlitPage.url_path": { "name": "url_path", @@ -119392,7 +129197,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/navigation/page.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L244" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -119412,11 +129217,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L84" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L86" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/user_info.py#L34", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L36", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -119442,7 +129247,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L178" }, { "name": "headers", @@ -119451,10 +129256,10 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/runtime/context.py#L124", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L125", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -119464,7 +129269,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L170", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L170", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -119484,7 +129289,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/plotly_chart.py#L82", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L82", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -119525,8 +129330,8 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/vega_charts.py#L100", - "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point seleciton parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L101", + "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -119545,7 +129350,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L136", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -119564,7 +129369,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.37.0/lib/streamlit/elements/arrow.py#L67", + "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L78", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -119587,7 +129392,7 @@ "is_attribute_dict": true } }, - "1.38.0": { + "1.39.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -119623,7 +129428,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The page's URL pathname, which is the path relative to the app's root\nURL. If this is None (default), the URL pathname will be inferred\nfrom the filename or callable name in page. For more information,\nsee Overview of multipage apps.

\n

The default page will have a pathname of "", indicating the root\nURL of the app. If you set default=True, url_path is ignored.

\n", + "description": "

The page's URL pathname, which is the path relative to the app's root\nURL. If this is None (default), the URL pathname will be inferred\nfrom the filename or callable name in page. For more information,\nsee Overview of multipage apps.

\n

The default page will have a pathname of "", indicating the root\nURL of the app. If you set default=True, url_path is ignored.\nurl_path can't include forward slashes; paths can't include\nsubdirectories.

\n", "default": "page" }, { @@ -119643,7 +129448,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -119704,11 +129509,11 @@ { "type_name": "element or dict", "is_generator": false, - "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", + "description": "

If on_select is "ignore" (default), this command returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this command returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1482" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1486" }, "streamlit.area_chart": { "name": "area_chart", @@ -119798,7 +129603,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L747" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L746" }, "streamlit.audio": { "name": "audio", @@ -119864,7 +129669,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/media.py#L65" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/media.py#L65" }, "streamlit.balloons": { "name": "balloons", @@ -119873,7 +129678,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -119971,7 +129776,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L983" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L987" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -119997,12 +129802,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", - "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n
\n", + "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "examples": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -120018,7 +129823,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -120061,6 +129866,14 @@ "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", "default": "s" }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null + }, { "name": "disabled", "type_name": "bool", @@ -120086,7 +129899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L86" }, "streamlit.cache": { "name": "cache", @@ -120160,7 +129973,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -120230,7 +130043,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -120300,12 +130113,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", "signature": "st.camera_input(label, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\npicture = st.camera_input("Take a picture")\n\nif picture:\n    st.image(picture)\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\nenable = st.checkbox("Enable camera")\npicture = st.camera_input("Take a picture", disabled=not enable)\n\nif picture:\n    st.image(picture)\n
\n
\n", "description": "

Display a widget that returns pictures from the user's webcam.

\n", "args": [ { @@ -120321,7 +130134,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -120377,11 +130190,11 @@ { "type_name": "None or UploadedFile", "is_generator": false, - "description": "

The UploadedFile class is a subclass of BytesIO, and therefore\nit is "file-like". This means you can pass them anywhere where\na file is expected.

\n", + "description": "

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", @@ -120415,7 +130228,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L159" }, "streamlit.chat_input": { "name": "chat_input", @@ -120436,7 +130249,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget based on\nits content. Multiple widgets of the same type may not share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget based on\nits content. No two widgets may have the same key.

\n", "default": null }, { @@ -120488,7 +130301,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/chat.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/chat.py#L237" }, "streamlit.chat_message": { "name": "chat_message", @@ -120521,7 +130334,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/chat.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/chat.py#L126" }, "streamlit.checkbox": { "name": "checkbox", @@ -120550,7 +130363,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -120610,7 +130423,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", @@ -120652,7 +130465,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -120681,7 +130494,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -120741,7 +130554,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -120782,7 +130595,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", @@ -120839,11 +130652,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", - "signature": "st.container(*, height=None, border=None)", + "signature": "st.container(*, height=None, border=None, key=None)", "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n
\n", "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ @@ -120862,10 +130675,18 @@ "is_kwarg_only": true, "description": "

Whether to show a border around the container. If None (default), a\nborder is shown if the container is set to a fixed height and not\nshown otherwise.

\n", "default": null + }, + { + "name": "key", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to give this container a stable identity.

\n

Additionally, if key is provided, it will be used as CSS\nclass name prefixed with st-key-.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L42" }, "streamlit.data_editor": { "name": "data_editor", @@ -120878,7 +130699,7 @@ "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray,\nmemoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and\npandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing\ndatetime.timedelta and pandas.Timedelta values will\ndefault to uneditable, but this can be changed through column\nconfiguration.
  • \n
\n
\n", + "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Text and number formatting from column_config always takes\nprecedence over text and number formatting from pandas.Styler.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray,\nmemoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and\npandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing\ndatetime.timedelta and pandas.Timedelta values will\ndefault to uneditable, but this can be changed through column\nconfiguration.
  • \n
\n
\n", "default": "to" }, { @@ -120950,7 +130771,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string to use as the unique key for this widget. If this\nis omitted, a key will be generated for the widget based on its\ncontent. Multiple widgets of the same type may not share the same\nkey.

\n", + "description": "

An optional string to use as the unique key for this widget. If this\nis omitted, a key will be generated for the widget based on its\ncontent. No two widgets may have the same key.

\n", "default": null }, { @@ -120986,7 +130807,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/data_editor.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/data_editor.py#L579" }, "streamlit.dataframe": { "name": "dataframe", @@ -120999,7 +130820,7 @@ "type_name": "dataframe-like, collection-like, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to display.

\n

Dataframe-like objects include dataframe and series objects from\npopular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow,\nSnowpark, Xarray, and more. You can use database cursors and\nclients that comply with the\nPython Database API Specification v2.0 (PEP 249). Additionally, you can use\nanything that supports the Python dataframe interchange protocol.

\n

For example, you can use the following:

\n
    \n
  • pandas.DataFrame, pandas.Series, pandas.Index,\npandas.Styler, and pandas.Array
  • \n
  • polars.DataFrame, polars.LazyFrame, and polars.Series
  • \n
  • snowflake.snowpark.dataframe.DataFrame,\nsnowflake.snowpark.table.Table
  • \n
\n

If a data type is not recognized, Streamlit will convert the object\nto a pandas.DataFrame or pyarrow.Table using a\n.to_pandas() or .to_arrow() method, respectively, if\navailable.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\nstyling options, like bar charts, hovering, and captions. For\nthese styling options, use column configuration instead.

\n

Collection-like objects include all Python-native Collection\ntypes, such as dict, list, and set.

\n

If data is None, Streamlit renders an empty table.

\n", + "description": "

The data to display.

\n

Dataframe-like objects include dataframe and series objects from\npopular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow,\nSnowpark, Xarray, and more. You can use database cursors and\nclients that comply with the\nPython Database API Specification v2.0 (PEP 249). Additionally, you can use\nanything that supports the Python dataframe interchange protocol.

\n

For example, you can use the following:

\n
    \n
  • pandas.DataFrame, pandas.Series, pandas.Index,\npandas.Styler, and pandas.Array
  • \n
  • polars.DataFrame, polars.LazyFrame, and polars.Series
  • \n
  • snowflake.snowpark.dataframe.DataFrame,\nsnowflake.snowpark.table.Table
  • \n
\n

If a data type is not recognized, Streamlit will convert the object\nto a pandas.DataFrame or pyarrow.Table using a\n.to_pandas() or .to_arrow() method, respectively, if\navailable.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\nstyling options, like bar charts, hovering, and captions. For\nthese styling options, use column configuration instead. Text and\nnumber formatting from column_config always takes precedence\nover text and number formatting from pandas.Styler.

\n

Collection-like objects include all Python-native Collection\ntypes, such as dict, list, and set.

\n

If data is None, Streamlit renders an empty table.

\n", "default": null }, { @@ -121079,11 +130900,11 @@ { "type_name": "element or dict", "is_generator": false, - "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the dataframe element that can be used\nwith the .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the DataframeState\ndictionary schema.

\n", + "description": "

If on_select is "ignore" (default), this command returns an\ninternal placeholder for the dataframe element that can be used\nwith the .add_rows() method. Otherwise, this command returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the DataframeState\ndictionary schema.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L256" }, "streamlit.date_input": { "name": "date_input", @@ -121128,7 +130949,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -121196,7 +131017,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/time_widgets.py#L520" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/time_widgets.py#L516" }, "streamlit.dialog": { "name": "dialog", @@ -121222,7 +131043,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -121231,11 +131052,11 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L265" }, "streamlit.download_button": { "name": "download_button", - "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", + "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ @@ -121276,7 +131097,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -121319,6 +131140,14 @@ "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", "default": "s" }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null + }, { "name": "disabled", "type_name": "bool", @@ -121344,7 +131173,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L195" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L237" }, "streamlit.echo": { "name": "echo", @@ -121362,16 +131191,16 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/echo.py#L30" }, "streamlit.empty": { "name": "empty", "signature": "st.empty()", - "examples": "
\n

Overwriting elements in-place using with notation:

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(60):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write("\u2714\ufe0f 1 minute over!")\n
\n

Replacing several elements, then clearing them:

\n
\nimport streamlit as st\n\nplaceholder = st.empty()\n\n# Replace the placeholder with some text:\nplaceholder.text("Hello")\n\n# Replace the text with a chart:\nplaceholder.line_chart({"data": [1, 5, 2, 6]})\n\n# Replace the chart with several elements:\nwith placeholder.container():\n    st.write("This is one element")\n    st.write("This is another")\n\n# Clear all those elements:\nplaceholder.empty()\n
\n
\n", + "examples": "
\n

Inside a with st.empty(): block, each displayed element will\nreplace the previous one.

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(10):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write(":material/check: 10 seconds over!")\nst.button("Rerun")\n
\n

You can use an st.empty to replace multiple elements in\nsuccession. Use st.container inside st.empty to display (and\nlater replace) a group of elements.

\n
\nimport streamlit as st\nimport time\n\nst.button("Start over")\n\nplaceholder = st.empty()\nplaceholder.markdown("Hello")\ntime.sleep(1)\n\nplaceholder.progress(0, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(50, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(100, "Wait for it...")\ntime.sleep(1)\n\nwith placeholder.container():\n    st.line_chart({"data": [1, 5, 2, 6]})\n    time.sleep(1)\n    st.markdown("3...")\n    time.sleep(1)\n    st.markdown("2...")\n    time.sleep(1)\n    st.markdown("1...")\n    time.sleep(1)\n\nplaceholder.markdown("Poof!")\ntime.sleep(1)\n\nplaceholder.empty()\n
\n
\n", "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -121397,7 +131226,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -121415,7 +131244,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -121449,7 +131278,88 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L434" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L453" + }, + "streamlit.experimental_audio_input": { + "name": "experimental_audio_input", + "signature": "st.experimental_audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "examples": "
\n
\nimport streamlit as st\n\naudio_value = st.experimental_audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n
\n", + "description": "

Display a widget that returns an audio recording from the user's microphone.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A tooltip that gets displayed next to the audio input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this audio input's value\nchanges.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean, which disables the audio input if set to\nTrue. Default is False.

\n", + "default": "False" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "None or UploadedFile", + "is_generator": false, + "description": "

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected. The MIME type for the audio data is audio/wav.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/audio_input.py#L86" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -121457,7 +131367,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -121465,7 +131375,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/fragment.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/fragment.py#L472" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -121481,7 +131391,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/experimental_query_params.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -121499,7 +131409,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/experimental_query_params.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -121520,7 +131430,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -121564,7 +131474,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button_group.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -121601,7 +131511,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -121657,15 +131567,15 @@ { "type_name": "None or UploadedFile or list of UploadedFile", "is_generator": false, - "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True, returns a list with the\nuploaded files as UploadedFile objects. If no files were\nuploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and therefore\nit is "file-like". This means you can pass them anywhere where\na file is expected.

\n", + "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True, returns a list with the\nuploaded files as UploadedFile objects. If no files were\nuploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", - "signature": "st.form(key, clear_on_submit=False, *, border=True)", + "signature": "st.form(key, clear_on_submit=False, *, enter_to_submit=True, border=True)", "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n    st.write("Inside the form")\n    slider_val = st.slider("Form slider")\n    checkbox_val = st.checkbox("Form checkbox")\n\n    # Every form must have a submit button.\n    submitted = st.form_submit_button("Submit")\n    if submitted:\n        st.write("slider", slider_val, "checkbox", checkbox_val)\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n
\n", "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ @@ -121685,6 +131595,14 @@ "description": "

If True, all widgets inside the form will be reset to their default\nvalues after the user presses the Submit button. Defaults to False.\n(Note that Custom Components are unaffected by this flag, and\nwill not be reset to their defaults on form submission.)

\n", "default": "values" }, + { + "name": "enter_to_submit", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to submit the form when a user presses Enter while\ninteracting with a widget inside the form.

\n

If this is True (default), pressing Enter while interacting\nwith a form widget is equivalent to clicking the first\nst.form_submit_button in the form.

\n

If this is False, the user must click an\nst.form_submit_button to submit the form.

\n

If the first st.form_submit_button in the form is disabled,\nthe form will override submission behavior with\nenter_to_submit=False.

\n", + "default": null + }, { "name": "border", "type_name": "bool", @@ -121695,12 +131613,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", - "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", disabled=False, use_container_width=False)", - "description": "

Display a form submit button.

\n

When this button is clicked, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

Every form must have a form_submit_button. A form_submit_button\ncannot exist outside a form.

\n

For more information about forms, check out our\nblog post.

\n", + "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "description": "

Display a form submit button.

\n

When this button is clicked, all widget values inside the form will be\nsent from the user's browser to your Streamlit server in a batch.

\n

Every form must have at least one st.form_submit_button. An\nst.form_submit_button cannot exist outside of a form.

\n

For more information about forms, check out our docs.

\n", "args": [ { "name": "label", @@ -121750,13 +131668,21 @@ "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", "default": "s" }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null + }, { "name": "disabled", "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the button if set to True. The\ndefault is False.

\n", - "default": "False" + "description": "

Whether to disable the button. If this is False (default), the\nuser can interact with the button. If this is True, the button\nis grayed-out and can't be clicked.

\n

If the first st.form_submit_button in the form is disabled,\nthe form will override submission behavior with\nenter_to_submit=False.

\n", + "default": null }, { "name": "use_container_width", @@ -121775,7 +131701,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/form.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -121801,24 +131727,25 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/fragment.py#L309" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/fragment.py#L307" }, "streamlit.get_option": { "name": "get_option", "signature": "st.get_option(key)", - "description": "

Return the current value of a given Streamlit config option.

\n

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

\n", + "example": "
\n
\nimport streamlit as st\n\ncolor = st.get_option("theme.primaryColor")\n
\n
\n", + "description": "

Return the current value of a given Streamlit configuration option.

\n

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

\n", "args": [ { "name": "key", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

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

\n", + "description": "

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

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/config.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/config.py#L140" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -121844,7 +131771,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", @@ -121886,11 +131813,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -121904,7 +131831,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -121922,7 +131849,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", @@ -121988,7 +131915,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/image.py#L85" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/image.py#L85" }, "streamlit.info": { "name": "info", @@ -122014,7 +131941,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", @@ -122040,7 +131967,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", @@ -122066,7 +131993,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L217" }, "streamlit.line_chart": { "name": "line_chart", @@ -122148,11 +132075,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L551" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L550" }, "streamlit.link_button": { "name": "link_button", - "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", disabled=False, use_container_width=False)", + "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", "example": "
\n
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n
\n", "description": "

Display a link button element.

\n

When clicked, a new tab will be opened to the specified URL. This will\ncreate a new session for the user if directed within the app.

\n", "args": [ @@ -122188,6 +132115,14 @@ "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", "default": "s" }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null + }, { "name": "disabled", "type_name": "bool", @@ -122206,11 +132141,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L378" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L438" }, "streamlit.logo": { "name": "logo", - "signature": "st.logo(image, *, link=None, icon_image=None)", + "signature": "st.logo(image, *, size=\"medium\", link=None, icon_image=None)", "examples": "

A common design practice is to use a wider logo in the sidebar, and a\nsmaller, icon-styled logo in your app's main body.

\n
\nimport streamlit as st\n\nst.logo(\n    LOGO_URL_LARGE,\n    link="https://streamlit.io/gallery",\n    icon_image=LOGO_URL_SMALL,\n)\n
\n

Try switching logos around in the following example:

\n
\nimport streamlit as st\n\nHORIZONTAL_RED = "images/horizontal_red.png"\nICON_RED = "images/icon_red.png"\nHORIZONTAL_BLUE = "images/horizontal_blue.png"\nICON_BLUE = "images/icon_blue.png"\n\noptions = [HORIZONTAL_RED, ICON_RED, HORIZONTAL_BLUE, ICON_BLUE]\nsidebar_logo = st.selectbox("Sidebar logo", options, 0)\nmain_body_logo = st.selectbox("Main body logo", options, 1)\n\nst.logo(sidebar_logo, icon_image=main_body_logo)\nst.sidebar.markdown("Hi!")\n
\n", "description": "

Renders a logo in the upper-left corner of your app and its sidebar.

\n

If st.logo is called multiple times within a page, Streamlit will\nrender the image passed in the last call. For the most consistent results,\ncall st.logo early in your page script and choose an image that works\nwell in both light and dark mode. Avoid empty margins around your image.

\n

If your logo does not work well for both light and dark mode, consider\nsetting the theme and hiding the settings menu from users with the\nconfiguration option\nclient.toolbarMode="minimal".

\n", "args": [ @@ -122219,7 +132154,15 @@ "type_name": "Anything supported by st.image", "is_optional": false, "is_kwarg_only": false, - "description": "

The image to display in the upper-left corner of your app and its\nsidebar. If icon_image is also provided, then Streamlit will only\ndisplay image in the sidebar.

\n

Streamlit scales the image to a height of 24 pixels and a maximum\nwidth of 240 pixels. Use images with an aspect ratio of 10:1 or less to\navoid distortion.

\n", + "description": "

The image to display in the upper-left corner of your app and its\nsidebar. If icon_image is also provided, then Streamlit will only\ndisplay image in the sidebar.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar.

\n", + "default": null + }, + { + "name": "size", + "type_name": "\"small\", \"medium\", or \"large\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The size of the image displayed in the upper-left corner of the app and its\nsidebar. The possible values are as follows:

\n
    \n
  • "small": 20px max height
  • \n
  • "medium" (default): 24px max height
  • \n
  • "large": 32px max height
  • \n
\n", "default": null }, { @@ -122235,16 +132178,16 @@ "type_name": "Anything supported by st.image or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An alternate image to replace image in the upper-left corner of the\napp's main body. If icon_image is None (default), Streamlit\nwill render image in the upper-left corner of the app and its\nsidebar. Otherwise, Streamlit will render icon_image in the\nupper-left corner of the app and image in the upper-left corner\nof the sidebar.

\n

Streamlit scales the image to a height of 24 pixels and a maximum\nwidth of 240 pixels. Use images with an aspect ratio of 10:1 or less to\navoid distortion.

\n", + "description": "

An optional, typically smaller image to replace image in the\nupper-left corner when the sidebar is closed. If icon_image is\nNone (default), Streamlit will always display image in the\nupper-left corner, regardless of whether the sidebar is open or closed.\nOtherwise, Streamlit will render icon_image in the upper-left\ncorner of the app when the sidebar is closed.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar. If the sidebar is closed, the max\nwidth is retained from when it was last open.

\n

For best results, pass a wide or horizontal image to image and a\nsquare image to icon_image. Or, pass a square image to image\nand leave icon_image=None.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/logo.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.map": { "name": "map", - "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True)", + "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True, width=None, height=None)", "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n
\n", "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ @@ -122303,10 +132246,26 @@ "is_kwarg_only": true, "description": "

Whether to override the map's native width with the width of\nthe parent container. If use_container_width is True\n(default), Streamlit sets the width of the map to match the width\nof the parent container. If use_container_width is False,\nStreamlit sets the width of the chart to fit its contents according\nto the plotting library, up to the width of the parent container.

\n", "default": null + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/map.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/map.py#L76" }, "streamlit.markdown": { "name": "markdown", @@ -122340,7 +132299,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -122398,7 +132357,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -122443,7 +132402,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -122519,11 +132478,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/multiselect.py#L114" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/multiselect.py#L105" }, "streamlit.navigation": { "name": "navigation", - "signature": "st.navigation(pages, *, position=\"sidebar\")", + "signature": "st.navigation(pages, *, position=\"sidebar\", expanded=False)", "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

You can declare pages from callables or file paths.

\n
\nimport streamlit as st\nfrom page_functions import page1\n\npg = st.navigation([st.Page(page1), st.Page("page2.py")])\npg.run()\n
\n

Use a dictionary to create sections within your navigation menu.

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([st.Page(page1), st.Page(page2)])\npg.run()\n
\n", "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", "args": [ @@ -122542,6 +132501,14 @@ "is_kwarg_only": true, "description": "

The position of the navigation menu. If position is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nposition is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", "default": null + }, + { + "name": "expanded", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the navigation menu should be expanded. If this is False\n(default), the navigation menu will be collapsed and will include a\nbutton to view more options when there are too many pages to display.\nIf this is True, the navigation menu will always be expanded; no\nbutton to collapse the menu will be displayed.

\n

If st.navigation changes from expanded=True to\nexpanded=False on a rerun, the menu will stay expanded and a\ncollapse button will be displayed.

\n", + "default": null } ], "returns": [ @@ -122552,7 +132519,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/navigation.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/navigation.py#L55" }, "streamlit.number_input": { "name": "number_input", @@ -122613,7 +132580,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -122681,7 +132648,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/number_input.py#L164" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", @@ -122739,7 +132706,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/button.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L544" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -122808,15 +132775,15 @@ { "type_name": "element or dict", "is_generator": false, - "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element. Otherwise, this method\nreturns a dictionary-like object that supports both key and\nattribute notation. The attributes are described by the\nPlotlyState dictionary schema.

\n", + "description": "

If on_select is "ignore" (default), this command returns an\ninternal placeholder for the chart element. Otherwise, this command\nreturns a dictionary-like object that supports both key and\nattribute notation. The attributes are described by the\nPlotlyState dictionary schema.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L306" }, "streamlit.popover": { "name": "popover", - "signature": "st.popover(label, *, help=None, disabled=False, use_container_width=False)", + "signature": "st.popover(label, *, help=None, icon=None, disabled=False, use_container_width=False)", "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n
\n", "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", "args": [ @@ -122836,6 +132803,14 @@ "description": "

An optional tooltip that gets displayed when the popover button is\nhovered over.

\n", "default": null }, + { + "name": "icon", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null + }, { "name": "disabled", "type_name": "bool", @@ -122854,7 +132829,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L548" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L567" }, "streamlit.progress": { "name": "progress", @@ -122880,11 +132855,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", - "signature": "st.pydeck_chart(pydeck_obj=None, use_container_width=False)", + "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=False, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ @@ -122900,13 +132875,60 @@ "name": "use_container_width", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", "default": null + }, + { + "name": "width", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired width of the chart expressed in pixels. If width is\nNone (default), Streamlit sets the width of the chart to fit\nits contents according to the plotting library, up to the width of\nthe parent container. If width is greater than the width of the\nparent container, Streamlit sets the chart width to match the width\nof the parent container.

\n

To use width, you must set use_container_width=False.

\n", + "default": null + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the chart expressed in pixels. If height is\nNone (default), Streamlit sets the height of the chart to fit\nits contents according to the plotting library.

\n", + "default": null + }, + { + "name": "on_select", + "type_name": "\"ignore\" or \"rerun\" or callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

How the figure should respond to user selection events. This controls\nwhether or not the chart behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an\ninput widget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.pydeck_chart will return\nthe selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the callable\nas a callback function before the rest of the app. In this case,\nst.pydeck_chart will return the selection data as a\ndictionary.
  • \n
\n

If on_select is not "ignore", all layers must have a\ndeclared id to keep the chart stateful across reruns.

\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "\"single-object\" or \"multi-object\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection mode of the chart. This can be one of the following:

\n
    \n
  • "single-object" (default): Only one object can be selected at\na time.
  • \n
  • "multi-object": Multiple objects can be selected at a time.
  • \n
\n", + "default": null + }, + { + "name": "key", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string to use for giving this element a stable\nidentity. If key is None (default), this element's identity\nwill be determined based on the values of the other parameters.

\n

Additionally, if selections are activated and key is provided,\nStreamlit will register the key in Session State to store the\nselection state. The selection state is read-only.

\n", + "default": null } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/deck_gl_json_chart.py#L39" + "returns": [ + { + "type_name": "element or dict", + "is_generator": false, + "description": "

If on_select is "ignore" (default), this command returns an\ninternal placeholder for the chart element. Otherwise, this method\nreturns a dictionary-like object that supports both key and\nattribute notation. The attributes are described by the\nPydeckState dictionary schema.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", @@ -122948,7 +132970,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -122993,7 +133015,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -123069,7 +133091,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/radio.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/radio.py#L122" }, "streamlit.rerun": { "name": "rerun", @@ -123086,7 +133108,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L101" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L101" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -123176,7 +133198,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1248" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1252" }, "streamlit.select_slider": { "name": "select_slider", @@ -123221,7 +133243,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -123281,7 +133303,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/select_slider.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/select_slider.py#L159" }, "streamlit.selectbox": { "name": "selectbox", @@ -123326,7 +133348,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -123394,19 +133416,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/selectbox.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/selectbox.py#L113" }, "streamlit.set_option": { "name": "set_option", "signature": "st.set_option(key, value)", - "description": "

Set config option.

\n
\n
Currently, only the following config options can be set within the script itself:
\n
    \n
  • client.caching
  • \n
\n
\n
\n

Calling with any other options will raise StreamlitAPIException.

\n

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

\n", + "example": "
\n
\nimport streamlit as st\n\nst.set_option("client.showErrorDetails", True)\n
\n
\n", + "description": "

Set a configuration option.

\n

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

\n
\n
    \n
  • client.showErrorDetails
  • \n
  • client.showSidebarNavigation
  • \n
  • client.toolbarMode
  • \n
\n
\n

Calling st.set_option with any other option will raise a\nStreamlitAPIException. When changing a configuration option in a\nrunning app, you may need to trigger a rerun after changing the option to\nsee the effects.

\n

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

\n", "args": [ { "name": "key", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

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

\n", + "description": "

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

\n", "default": null }, { @@ -123419,7 +133442,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -123469,7 +133492,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/page_config.py#L119" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/page_config.py#L127" }, "streamlit.slider": { "name": "slider", @@ -123530,7 +133553,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -123590,7 +133613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/slider.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/slider.py#L334" }, "streamlit.snow": { "name": "snow", @@ -123599,7 +133622,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -123617,7 +133640,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -123658,7 +133681,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L702" }, "streamlit.stop": { "name": "stop", @@ -123667,7 +133690,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L33" }, "streamlit.subheader": { "name": "subheader", @@ -123709,7 +133732,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L110" }, "streamlit.success": { "name": "success", @@ -123735,7 +133758,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -123753,7 +133776,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/commands/execution_control.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L148" }, "streamlit.table": { "name": "table", @@ -123771,7 +133794,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L600" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L598" }, "streamlit.tabs": { "name": "tabs", @@ -123796,7 +133819,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/layouts.py#L331" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L350" }, "streamlit.text": { "name": "text", @@ -123822,7 +133845,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -123867,7 +133890,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -123935,7 +133958,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/text_widgets.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/text_widgets.py#L389" }, "streamlit.text_input": { "name": "text_input", @@ -123972,7 +133995,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -124056,7 +134079,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -124085,7 +134108,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -124153,7 +134176,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/time_widgets.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/time_widgets.py#L293" }, "streamlit.title": { "name": "title", @@ -124187,12 +134210,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/heading.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L177" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -124213,7 +134236,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -124242,7 +134265,7 @@ "type_name": "str or int", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", "default": null }, { @@ -124302,7 +134325,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/widgets/checkbox.py#L164" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/checkbox.py#L163" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -124379,11 +134402,11 @@ { "type_name": "element or dict", "is_generator": false, - "description": "

If on_select is "ignore" (default), this method returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this method returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", + "description": "

If on_select is "ignore" (default), this command returns an\ninternal placeholder for the chart element that can be used with\nthe .add_rows() method. Otherwise, this command returns a\ndictionary-like object that supports both key and attribute\nnotation. The attributes are described by the VegaLiteState\ndictionary schema.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L1636" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1640" }, "streamlit.video": { "name": "video", @@ -124457,7 +134480,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/media.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/media.py#L198" }, "streamlit.warning": { "name": "warning", @@ -124483,7 +134506,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -124521,7 +134544,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/write.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/write.py#L240" }, "streamlit.write_stream": { "name": "write_stream", @@ -124546,7 +134569,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/write.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/write.py#L66" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -124554,7 +134577,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -124562,7 +134585,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" }, "streamlit.query_params.clear": { "name": "clear", @@ -124577,13 +134600,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", "signature": "st.query_params.from_dict(params)", "example": "
\nimport streamlit as st\n\nst.query_params.from_dict({"foo": "bar", "baz": [1, "two"]})\n
\n", - "description": "

Set all of the query parameters from a dictionary or dictionary-like object.

\n

This method primarily exists for advanced users who want to control\nmultiple query parameters in a single update. To set individual query\nparameters, use key or attribute notation instead.

\n

This method inherits limitations from st.query_params and can't be\nused to set embedding options as described in Embed your app.

\n

To handle repeated keys, the value in a key-value pair should be a list.

\n
\n

Note

\n

.from_dict() is not a direct inverse of .to_dict() if\nyou are working with repeated keys. A true inverse operation is\n{key: st.query_params.get_all(key) for key st.query_params}.

\n
\n", + "description": "

Set all of the query parameters from a dictionary or dictionary-like object.

\n

This method primarily exists for advanced users who want to control\nmultiple query parameters in a single update. To set individual query\nparameters, use key or attribute notation instead.

\n

This method inherits limitations from st.query_params and can't be\nused to set embedding options as described in Embed your app.

\n

To handle repeated keys, the value in a key-value pair should be a list.

\n
\n

Note

\n

.from_dict() is not a direct inverse of .to_dict() if\nyou are working with repeated keys. A true inverse operation is\n{key: st.query_params.get_all(key) for key in st.query_params}.

\n
\n", "args": [ { "name": "params", @@ -124595,7 +134618,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -124619,7 +134642,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -124634,7 +134657,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -124659,7 +134682,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -124673,11 +134696,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -124694,11 +134717,11 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -124714,7 +134737,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L260" }, { "name": "query", @@ -124787,7 +134810,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L130" }, { "name": "reset", @@ -124796,7 +134819,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -124806,7 +134829,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L279" }, { "name": "engine", @@ -124814,7 +134837,7 @@ "description": "

The underlying SQLAlchemy Engine.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L271" }, { "name": "session", @@ -124823,10 +134846,10 @@ "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L287" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L287" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -124843,7 +134866,7 @@ "description": "

Return a PEP 249-compliant cursor object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L264" }, { "name": "query", @@ -124892,7 +134915,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L121" }, { "name": "reset", @@ -124901,7 +134924,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -124909,7 +134932,7 @@ "description": "

Create a new Snowpark Session from this connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L281" }, { "name": "write_pandas", @@ -124924,7 +134947,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L226" } ], "properties": [ @@ -124934,10 +134957,10 @@ "description": "

Access the underlying Snowflake Python connector object.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L272" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L42", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -124979,7 +135002,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -124988,7 +135011,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -124997,7 +135020,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -125008,10 +135031,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -125022,7 +135045,7 @@ "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L260" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -125030,7 +135053,7 @@ "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L279" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -125038,7 +135061,7 @@ "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L271" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -125111,7 +135134,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L130" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -125120,7 +135143,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -125129,7 +135152,7 @@ "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/sql_connection.py#L287" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L287" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -125162,7 +135185,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -125171,7 +135194,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -125180,7 +135203,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -125189,7 +135212,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -125197,7 +135220,7 @@ "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L264" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L264" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -125246,7 +135269,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -125254,7 +135277,7 @@ "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L272" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -125263,7 +135286,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -125271,7 +135294,7 @@ "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L281" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -125286,7 +135309,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L226" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -125295,7 +135318,7 @@ "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -125345,7 +135368,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L953" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -125395,7 +135418,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L792" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -125453,7 +135476,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L606" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L611" }, "streamlit.column_config.Column": { "name": "Column", @@ -125503,7 +135526,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -125564,7 +135587,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD.

\n", + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -125593,7 +135616,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1400" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1411" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -125654,7 +135677,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD HH:mm:ss.

\n", + "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -125691,7 +135714,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1170" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -125725,7 +135748,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1034" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -125775,7 +135798,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L867" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L872" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -125852,12 +135875,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.

\n", + "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.\nText formatting from column_config always takes precedence over\ntext formatting from pandas.Styler.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L475" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L478" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -125891,7 +135914,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1100" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1105" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -125952,7 +135975,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. Valid formatters: %d %e %f %g %i %u.\nYou can also add prefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix.

\n", + "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. Valid formatters: %d %e %f %g %i %u.\nYou can also add prefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -125981,7 +136004,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -126039,7 +136062,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1513" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1527" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -126105,7 +136128,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L688" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L693" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -126179,7 +136202,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L384" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -126240,7 +136263,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses HH:mm:ss.

\n", + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -126269,12 +136292,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/column_types.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1294" }, "streamlit.components.v1.declare_component": { "name": "declare_component", "signature": "st.components.v1.declare_component(name, path=None, url=None)", - "description": "

Create a custom component and register it if there is a ScriptRunContext.

\n

The component is not registered when there is no ScriptRunContext.\nThis can happen when a CustomComponent is executed as standalone\ncommand (e.g. for testing).

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.declare_component directly (instead of\nimporting its module) is deprecated and will be disallowd in a later\nversion.

\n
\n", + "description": "

Create a custom component and register it if there is a ScriptRunContext.

\n

The component is not registered when there is no ScriptRunContext.\nThis can happen when a CustomComponent is executed as standalone\ncommand (e.g. for testing).

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.declare_component directly (instead of\nimporting its module) is deprecated and will be disallowed in a later\nversion.

\n
\n", "args": [ { "name": "name", @@ -126289,7 +136312,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The path to serve the component's frontend files from. If path is\nNone (default), Streamlit will server the component from the\nlocation in url. Either path or url must be specified, but\nnot both.

\n", + "description": "

The path to serve the component's frontend files from. If path is\nNone (default), Streamlit will serve the component from the\nlocation in url. Either path or url must be specified, but\nnot both.

\n", "default": null }, { @@ -126297,7 +136320,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The URL that the component is served from. If url is None\n(default), Streamlit will server the component from the location in\npath. Either path or url must be specified, but not both.

\n", + "description": "

The URL that the component is served from. If url is None\n(default), Streamlit will serve the component from the location in\npath. Either path or url must be specified, but not both.

\n", "default": null } ], @@ -126309,13 +136332,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/components/v1/component_registry.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/components/v1/component_registry.py#L50" }, "streamlit.components.v1.html": { "name": "html", "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False)", "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n
\n", - "description": "

Display an HTML string in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n

If you want to insert HTML text into your app without an iframe, try\nst.html instead.

\n
\n

Warning

\n

Using st.components.v1.html directly (instead of importing\nits module) is deprecated and will be disallowd in a later version.

\n
\n", + "description": "

Display an HTML string in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n

If you want to insert HTML text into your app without an iframe, try\nst.html instead.

\n
\n

Warning

\n

Using st.components.v1.html directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ { "name": "html", @@ -126351,13 +136374,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False)", "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.iframe("https://example.com", height=500)\n
\n
\n", - "description": "

Load a remote URL in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.iframe directly (instead of importing\nits module) is deprecated and will be disallowd in a later version.

\n
\n", + "description": "

Load a remote URL in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.iframe directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ { "name": "src", @@ -126393,7 +136416,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -126419,7 +136442,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L649" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L647" }, "StatusContainer.update": { "name": "update", @@ -126452,7 +136475,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -126481,7 +136504,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -126505,7 +136528,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L368" }, { "name": "switch_page", @@ -126529,7 +136552,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L391" } ], "properties": [ @@ -126546,7 +136569,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -126561,7 +136584,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -126576,7 +136599,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -126591,7 +136614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -126606,7 +136629,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -126621,7 +136644,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -126636,7 +136659,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -126651,7 +136674,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -126666,7 +136689,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -126681,7 +136704,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -126696,7 +136719,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -126711,7 +136734,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -126726,7 +136749,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -126741,7 +136764,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -126756,7 +136779,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -126771,7 +136794,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -126786,7 +136809,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -126801,7 +136824,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -126816,7 +136839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -126831,7 +136854,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -126846,7 +136869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -126861,7 +136884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -126876,7 +136899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -126891,7 +136914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -126906,7 +136929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -126921,7 +136944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -126936,7 +136959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -126951,7 +136974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -126966,7 +136989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -126981,7 +137004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -126996,7 +137019,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -127011,7 +137034,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -127026,7 +137049,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -127041,7 +137064,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -127056,7 +137079,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -127071,7 +137094,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -127086,7 +137109,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -127101,7 +137124,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -127116,7 +137139,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -127131,7 +137154,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -127146,7 +137169,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -127161,11 +137184,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L96", - "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. No methods exist to programatically switch pages within\nAppTest.

\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L96", + "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { "name": "secrets", @@ -127204,7 +137227,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -127219,7 +137242,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -127234,7 +137257,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -127249,7 +137272,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -127264,7 +137287,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -127279,7 +137302,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -127294,7 +137317,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -127309,7 +137332,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -127324,7 +137347,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -127339,7 +137362,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -127354,7 +137377,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -127369,7 +137392,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -127384,7 +137407,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -127399,7 +137422,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -127414,7 +137437,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -127446,7 +137469,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -127494,7 +137517,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -127526,7 +137549,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -127550,7 +137573,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -127565,7 +137588,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -127580,7 +137603,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -127595,7 +137618,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -127610,7 +137633,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -127625,7 +137648,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -127640,7 +137663,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -127655,7 +137678,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -127670,7 +137693,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -127685,7 +137708,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -127700,7 +137723,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -127724,7 +137747,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L368" }, "AppTest.select_slider": { "name": "select_slider", @@ -127739,7 +137762,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -127754,7 +137777,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -127769,7 +137792,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -127784,7 +137807,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -127799,7 +137822,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -127814,7 +137837,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -127829,7 +137852,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -127853,7 +137876,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L391" }, "AppTest.table": { "name": "table", @@ -127868,7 +137891,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -127883,7 +137906,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -127898,7 +137921,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -127913,7 +137936,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -127928,7 +137951,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -127943,7 +137966,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -127958,7 +137981,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -127973,7 +137996,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -127988,7 +138011,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -128003,7 +138026,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -128016,7 +138039,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -128033,7 +138056,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128041,7 +138064,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -128051,10 +138074,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -128079,7 +138102,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -128087,7 +138110,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L750" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L750" }, { "name": "set_value", @@ -128095,7 +138118,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -128103,7 +138126,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L765" } ], "properties": [ @@ -128113,7 +138136,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "indices", @@ -128121,7 +138144,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "value", @@ -128129,10 +138152,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L723" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -128157,7 +138180,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128165,7 +138188,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -128175,10 +138198,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -128194,7 +138217,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -128211,7 +138234,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128219,7 +138242,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -128227,7 +138250,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -128237,10 +138260,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -128256,7 +138279,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -128273,7 +138296,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128281,7 +138304,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -128291,10 +138314,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -128319,7 +138342,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128327,7 +138350,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -128337,10 +138360,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -128365,7 +138388,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -128375,10 +138398,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -128403,7 +138426,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -128411,7 +138434,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -128419,7 +138442,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -128427,7 +138450,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L853" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L853" } ], "properties": [ @@ -128437,7 +138460,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -128445,7 +138468,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L821" }, { "name": "value", @@ -128453,10 +138476,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L811" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L811" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L782", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L782", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -128472,7 +138495,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L926" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L926" }, { "name": "increment", @@ -128480,7 +138503,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L918" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L918" }, { "name": "run", @@ -128497,7 +138520,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128505,7 +138528,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L893" } ], "properties": [ @@ -128515,10 +138538,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L906" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L906" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L873", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L873", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -128543,7 +138566,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128551,7 +138574,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L977" } ], "properties": [ @@ -128561,7 +138584,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L971" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L971" }, { "name": "index", @@ -128569,7 +138592,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "value", @@ -128577,10 +138600,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L961" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L935", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L935", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -128605,7 +138628,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -128613,7 +138636,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1123" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1123" }, { "name": "set_value", @@ -128621,7 +138644,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1085" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1085" } ], "properties": [ @@ -128631,7 +138654,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "value", @@ -128639,10 +138662,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1106" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1106" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1067", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1067", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -128667,7 +138690,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -128675,7 +138698,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1044" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1044" }, { "name": "select_index", @@ -128683,7 +138706,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "set_value", @@ -128691,7 +138714,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1039" } ], "properties": [ @@ -128701,7 +138724,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1033" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1033" }, { "name": "index", @@ -128709,7 +138732,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1013" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1013" }, { "name": "value", @@ -128717,10 +138740,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1023" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1023" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L995", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L995", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -128745,7 +138768,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -128753,7 +138776,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "set_value", @@ -128761,7 +138784,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1147" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1147" } ], "properties": [ @@ -128771,10 +138794,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1128", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1128", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -128790,7 +138813,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1257" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1257" }, { "name": "run", @@ -128807,7 +138830,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128815,7 +138838,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1233" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1233" } ], "properties": [ @@ -128825,10 +138848,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1215", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1215", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -128844,7 +138867,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1310" }, { "name": "run", @@ -128861,7 +138884,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128869,7 +138892,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1286" } ], "properties": [ @@ -128879,10 +138902,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1299" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1299" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1268", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1268", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -128898,7 +138921,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1375" }, { "name": "increment", @@ -128906,7 +138929,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1368" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1368" }, { "name": "run", @@ -128923,7 +138946,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128931,7 +138954,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1340" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1340" } ], "properties": [ @@ -128941,10 +138964,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1324", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1324", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -128969,7 +138992,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -128977,7 +139000,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1432" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1432" } ], "properties": [ @@ -128987,10 +139010,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1422" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L1399", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1399", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -129015,7 +139038,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -129023,7 +139046,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -129033,10 +139056,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -129054,7 +139077,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L86" }, "context.cookies": { "name": "cookies", @@ -129063,7 +139086,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L178" }, "context.headers": { "name": "headers", @@ -129072,7 +139095,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L136" }, "CachedFunc.clear": { "name": "clear", @@ -129098,7 +139121,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/caching/cache_utils.py#L317" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_utils.py#L321" }, "StreamlitPage": { "name": "StreamlitPage", @@ -129111,7 +139134,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L271" } ], "properties": [ @@ -129121,7 +139144,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L236" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L248" }, { "name": "title", @@ -129129,7 +139152,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L237" }, { "name": "url_path", @@ -129137,10 +139160,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L256" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L132", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L134", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -129173,7 +139196,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L236" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L248" }, "StreamlitPage.run": { "name": "run", @@ -129181,7 +139204,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L271" }, "StreamlitPage.title": { "name": "title", @@ -129189,7 +139212,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L237" }, "StreamlitPage.url_path": { "name": "url_path", @@ -129197,7 +139220,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/navigation/page.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L256" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -129217,11 +139240,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L86" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/user_info.py#L36", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L36", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -129247,7 +139270,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L178" }, { "name": "headers", @@ -129256,10 +139279,10 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/runtime/context.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L125", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -129269,15 +139292,15 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L170", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L169", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", - "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { "name": "selection", "type_name": "dict", "is_optional": false, - "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the PlotlySelectionState dictionary\nschema.

\n", + "description": "

The state of the on_select event. This attribute returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the PlotlySelectionState dictionary\nschema.

\n", "default": null } ], @@ -129289,9 +139312,9 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/plotly_chart.py#L82", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L81", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", - "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", + "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ { "name": "points", @@ -129330,15 +139353,15 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/vega_charts.py#L101", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L100", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", - "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { "name": "selection", "type_name": "dict", "is_optional": false, - "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe name of each Vega-Lite selection parameter becomes an attribute in\nthe selection dictionary. The format of the data within each\nattribute is determined by the selection parameter definition within\nVega-Lite.

\n", + "description": "

The state of the on_select event. This attribute returns a\ndictionary-like object that supports both key and attribute notation.\nThe name of each Vega-Lite selection parameter becomes an attribute in\nthe selection dictionary. The format of the data within each\nattribute is determined by the selection parameter definition within\nVega-Lite.

\n", "default": null } ], @@ -129350,14 +139373,14 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L136", - "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that suports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L135", + "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { "name": "selection", "type_name": "dict", "is_optional": false, - "description": "

The state of the on_select event. This attribure returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the DataframeSelectionState\ndictionary schema.

\n", + "description": "

The state of the on_select event. This attribute returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the DataframeSelectionState\ndictionary schema.

\n", "default": null } ], @@ -129369,9 +139392,9 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.38.0/lib/streamlit/elements/arrow.py#L78", + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", - "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that suports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", + "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ { "name": "rows", @@ -129390,9 +139413,55 @@ ], "returns": [], "is_attribute_dict": true + }, + "PydeckState": { + "name": "PydeckState", + "signature": "PydeckState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", + "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", + "args": [ + { + "name": "selection", + "type_name": "dict", + "is_optional": false, + "description": "

The state of the on_select event. This attribute returns a\ndictionary-like object that supports both key and attribute notation.\nThe attributes are described by the PydeckSelectionState\ndictionary schema.

\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true + }, + "PydeckSelectionState": { + "name": "PydeckSelectionState", + "signature": "PydeckSelectionState", + "is_class": true, + "methods": [], + "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", + "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", + "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", + "args": [ + { + "name": "indices", + "type_name": "dict[str, list[int]]", + "is_optional": false, + "description": "

A dictionary of selected objects by layer. Each key in the dictionary\nis a layer id, and each value is a list of object indices within that\nlayer.

\n", + "default": null + }, + { + "name": "objects", + "type_name": "dict[str, list[dict[str, Any]]]", + "is_optional": false, + "description": "

A dictionary of object attributes by layer. Each key in the dictionary\nis a layer id, and each value is a list of metadata dictionaries for\nthe selected objects in that layer.

\n", + "default": null + } + ], + "returns": [], + "is_attribute_dict": true } }, - "1.39.0": { + "1.40.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -129448,7 +139517,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -129513,7 +139582,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1486" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1486" }, "streamlit.area_chart": { "name": "area_chart", @@ -129603,7 +139672,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L746" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L746" }, "streamlit.audio": { "name": "audio", @@ -129669,7 +139738,88 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/media.py#L65" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/media.py#L65" + }, + "streamlit.audio_input": { + "name": "audio_input", + "signature": "st.audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "examples": "
\n
\nimport streamlit as st\n\naudio_value = st.audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n
\n", + "description": "

Display a widget that returns an audio recording from the user's microphone.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A tooltip that gets displayed next to the audio input.

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this audio input's value\nchanges.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean that disables the audio input if set to\nTrue. Default is False.

\n", + "default": "is" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "None or UploadedFile", + "is_generator": false, + "description": "

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected. The MIME type for the audio data is audio/wav.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/audio_input.py#L90" }, "streamlit.balloons": { "name": "balloons", @@ -129678,7 +139828,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -129776,7 +139926,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L987" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -129802,7 +139952,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -129815,7 +139965,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -129879,8 +140029,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the button if set to True. The\ndefault is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the button if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "use_container_width", @@ -129899,7 +140049,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L86" }, "streamlit.cache": { "name": "cache", @@ -129973,7 +140123,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -130043,7 +140193,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -130113,7 +140263,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -130126,7 +140276,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -130174,15 +140324,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the camera input if set to\nTrue. Default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the camera input if set to\nTrue. Default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -130194,7 +140344,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", @@ -130228,7 +140378,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L165" }, "streamlit.chat_input": { "name": "chat_input", @@ -130301,7 +140451,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/chat.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/chat.py#L237" }, "streamlit.chat_message": { "name": "chat_message", @@ -130334,7 +140484,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/chat.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/chat.py#L126" }, "streamlit.checkbox": { "name": "checkbox", @@ -130347,7 +140497,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this checkbox is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -130371,7 +140521,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the checkbox.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -130403,15 +140553,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the checkbox if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the checkbox if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -130423,12 +140573,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False)", - "example": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\n", + "examples": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\nimport streamlit as st\ncode = '''Is it a crown or boat?\n                        ii\n                      iiiiii\nWWw                 .iiiiiiii.                ...:\n WWWWWWw          .iiiiiiiiiiii.         ........\n  WWWWWWWWWWw    iiiiiiiiiiiiiiii    ...........\n   WWWWWWWWWWWWWWwiiiiiiiiiiiiiiiii............\n    WWWWWWWWWWWWWWWWWWwiiiiiiiiiiiiii.........\n     WWWWWWWWWWWWWWWWWWWWWWwiiiiiiiiii.......\n      WWWWWWWWWWWWWWWWWWWWWWWWWWwiiiiiii....\n       WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwiiii.\n          -MMMWWWWWWWWWWWWWWWWWWWWWWMMM-\n'''\nst.code(code, language=None)\n
\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ { @@ -130436,7 +140586,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as code.

\n", + "description": "

The string to display as code or monospace text.

\n", "default": null }, { @@ -130444,7 +140594,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The language that the code is written in, for syntax highlighting.\nIf None, the code will be unstyled. Defaults to "python".

\n

For a list of available language values, see:

\n

https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD

\n", + "description": "

The language that the code is written in, for syntax highlighting.\nThis defaults to "python". If this is None, the code will\nbe plain, monospace text.

\n

For a list of available language values, see\nreact-syntax-highlighter\non GitHub.

\n", "default": "s" }, { @@ -130452,7 +140602,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean indicating whether to show line numbers to the\nleft of the code block. Defaults to False.

\n", + "description": "

An optional boolean indicating whether to show line numbers to the\nleft of the code block. This defaults to False.

\n", "default": "s" }, { @@ -130460,12 +140610,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean indicating whether to wrap lines. Defaults\nto False.

\n", + "description": "

An optional boolean indicating whether to wrap lines. This defaults\nto False.

\n", "default": "s" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -130478,7 +140628,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -130502,7 +140652,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the color picker.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -130534,15 +140684,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the color picker if set to\nTrue. The default is False. This argument can only be supplied by\nkeyword.

\n", - "default": "False" + "description": "

An optional boolean that disables the color picker if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -130554,7 +140704,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -130595,20 +140745,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", "signature": "st.connection(name, type=None, max_entries=None, ttl=None, **kwargs)", - "examples": "
\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile.

\n
\nimport streamlit as st\nconn = st.connection("sql")  # [connections.sql] section in secrets.toml.\n
\n

Creating a SQLConnection with a custom name requires you to explicitly specify the\ntype. If type is not passed as a kwarg, it must be set in the appropriate section of\nsecrets.toml.

\n
\nimport streamlit as st\nconn1 = st.connection(\n    "my_sql_connection", type="sql"\n)  # Config section defined in [connections.my_sql_connection].\nconn2 = st.connection(\n    "my_other_sql_connection"\n)  # type must be set in [connections.my_other_sql_connection].\n
\n

Passing the full module path to the connection class that you want to use can be\nuseful, especially when working with a custom connection:

\n
\nimport streamlit as st\nconn = st.connection(\n    "my_sql_connection", type="streamlit.connections.SQLConnection"\n)\n
\n

Finally, you can pass the connection class to use directly to this function. Doing\nso allows static type checking tools such as mypy to infer the exact return\ntype of st.connection.

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", - "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Config options, credentials, secrets, etc. for connections are taken from various\nsources:

\n
    \n
  • Any connection-specific configuration files.
  • \n
  • An app's secrets.toml files.
  • \n
  • The kwargs passed to this function.
  • \n
\n", + "examples": "
\n

Example 1: Inferred connection type

\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile. The following example creates a "sql"-type connection.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("sql")\n
\n

Example 2: Named connections

\n

Creating a connection with a custom name requires you to explicitly\nspecify the type. If type is not passed as a keyword argument, it must\nbe set in the appropriate section of secrets.toml. The following\nexample creates two "sql"-type connections, each with their own\ncustom name. The first defines type in the st.connection command;\nthe second defines type in secrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.first_connection]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n\n[connections.second_connection]\ntype = "sql"\ndialect = "yyy"\nhost = "yyy"\nusername = "yyy"\npassword = "yyy"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn1 = st.connection("first_connection", type="sql")\nconn2 = st.connection("second_connection")\n
\n

Example 3: Using a path to the connection class

\n

Passing the full module path to the connection class can be useful,\nespecially when working with a custom connection. Although this is not the\ntypical way to create first party connections, the following example\ncreates the same type of connection as one with type="sql". Note that\ntype is a string path.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection(\n    "my_sql_connection", type="streamlit.connections.SQLConnection"\n)\n
\n

Example 4: Importing the connection class

\n

You can pass the connection class directly to the st.connection\ncommand. Doing so allows static type checking tools such as mypy to\ninfer the exact return type of st.connection. The following example\ncreates the same connection as in Example 3.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", + "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Configuration options, credentials, and secrets for connections are\ncombined from the following sources:

\n
    \n
  • The keyword arguments passed to this command.
  • \n
  • The app's secrets.toml files.
  • \n
  • Any connection-specific configuration files.
  • \n
\n

The connection returned from st.connection is internally cached with\nst.cache_resource and is therefore shared between sessions.

\n", "args": [ { "name": "name", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The connection name used for secrets lookup in [connections.<name>].\nType will be inferred from passing "sql", "snowflake", or "snowpark".

\n", + "description": "

The connection name used for secrets lookup in secrets.toml.\nStreamlit uses secrets under [connections.<name>] for the\nconnection. type will be inferred if name is one of the\nfollowing: "snowflake", "snowpark", or "sql".

\n", "default": null }, { @@ -130616,7 +140766,7 @@ "type_name": "str, connection class, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The type of connection to create. It can be a keyword ("sql", "snowflake",\nor "snowpark"), a path to an importable class, or an imported class reference.\nAll classes must extend st.connections.BaseConnection and implement the\n_connect() method. If the type kwarg is None, a type field must be set in\nthe connection's section in secrets.toml.

\n", + "description": "

The type of connection to create. This can be one of the following:

\n
    \n
  • None (default): Streamlit will infer the connection type from\nname. If the type is not inferrable from name, the type must\nbe specified in secrets.toml instead.
  • \n
  • "snowflake": Streamlit will initialize a connection with\nSnowflakeConnection.
  • \n
  • "snowpark": Streamlit will initialize a connection with\nSnowparkConnection. This is deprecated.
  • \n
  • "sql": Streamlit will initialize a connection with\nSQLConnection.
  • \n
  • A string path to an importable class: This must be a dot-separated\nmodule path ending in the importable class. Streamlit will import the\nclass and initialize a connection with it. The class must extend\nst.connections.BaseConnection.
  • \n
  • An imported class reference: Streamlit will initialize a connection\nwith the referenced class, which must extend\nst.connections.BaseConnection.
  • \n
\n", "default": null }, { @@ -130624,35 +140774,35 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum number of connections to keep in the cache, or None\nfor an unbounded cache. (When a new entry is added to a full cache,\nthe oldest cached entry will be removed.) The default is None.

\n", - "default": "None" + "description": "

The maximum number of connections to keep in the cache.\nIf this is None (default), the cache is unbounded. Otherwise, when\na new entry is added to a full cache, the oldest cached entry is\nremoved.

\n", + "default": null }, { "name": "ttl", "type_name": "float, timedelta, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", - "default": "None" + "description": "

The maximum number of seconds to keep results in the cache.\nIf this is None (default), cached results do not expire with time.

\n", + "default": null }, { "name": "**kwargs", "type_name": "any", "is_optional": false, "is_kwarg_only": true, - "description": "

Additional connection specific kwargs that are passed to the Connection's\n_connect() method. Learn more from the specific Connection's documentation.

\n", + "description": "

Connection-specific keyword arguments that are passed to the\nconnection's ._connect() method. **kwargs are typically\ncombined with (and take precendence over) key-value pairs in\nsecrets.toml. To learn more, see the specific connection's\ndocumentation.

\n", "default": null } ], "returns": [ { - "type_name": "Connection object", + "type_name": "Subclass of BaseConnection", "is_generator": false, - "description": "

An initialized Connection object of the specified type.

\n", + "description": "

An initialized connection object of the specified type.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -130686,7 +140836,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L42" }, "streamlit.data_editor": { "name": "data_editor", @@ -130807,7 +140957,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/data_editor.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/data_editor.py#L579" }, "streamlit.dataframe": { "name": "dataframe", @@ -130889,7 +141039,7 @@ }, { "name": "selection_mode", - "type_name": "\"single-row\", \"multi-row\", single-column\", \"multi-column\", or Iterable of these", + "type_name": "\"single-row\", \"multi-row\", \"single-column\", \"multi-column\", or Iterable of these", "is_optional": false, "is_kwarg_only": true, "description": "

The types of selections Streamlit should allow. This can be one of\nthe following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", @@ -130904,20 +141054,20 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L256" }, "streamlit.date_input": { "name": "date_input", "signature": "st.date_input(label, value=\"default_value_today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n
\n", - "description": "

Display a date input widget.

\n", + "description": "

Display a date input widget.

\n

The first day of the week is determined from the user's locale in their\nbrowser.

\n", "args": [ { "name": "label", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this date input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -130957,7 +141107,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -130997,15 +141147,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the date input if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the date input if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -131017,7 +141167,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/time_widgets.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/time_widgets.py#L519" }, "streamlit.dialog": { "name": "dialog", @@ -131043,7 +141193,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -131052,7 +141202,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L265" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L271" }, "streamlit.download_button": { "name": "download_button", @@ -131065,7 +141215,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -131153,8 +141303,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the download button if set to\nTrue. The default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the download button if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "use_container_width", @@ -131173,7 +141323,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L238" }, "streamlit.echo": { "name": "echo", @@ -131191,7 +141341,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -131200,7 +141350,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -131226,7 +141376,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -131244,7 +141394,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -131257,7 +141407,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A string to use as the header for the expander. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

A string to use as the header for the expander. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -131278,88 +141428,15 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L453" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L455" }, "streamlit.experimental_audio_input": { "name": "experimental_audio_input", "signature": "st.experimental_audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\naudio_value = st.experimental_audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n
\n", - "description": "

Display a widget that returns an audio recording from the user's microphone.

\n", - "args": [ - { - "name": "label", - "type_name": "str", - "is_optional": false, - "is_kwarg_only": false, - "description": "

A short label explaining to the user what this widget is used for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", - "default": null - }, - { - "name": "key", - "type_name": "str or int", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", - "default": null - }, - { - "name": "help", - "type_name": "str", - "is_optional": false, - "is_kwarg_only": true, - "description": "

A tooltip that gets displayed next to the audio input.

\n", - "default": null - }, - { - "name": "on_change", - "type_name": "callable", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional callback invoked when this audio input's value\nchanges.

\n", - "default": null - }, - { - "name": "args", - "type_name": "tuple", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", - "default": null - }, - { - "name": "kwargs", - "type_name": "dict", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional dict of kwargs to pass to the callback.

\n", - "default": null - }, - { - "name": "disabled", - "type_name": "bool", - "is_optional": false, - "is_kwarg_only": true, - "description": "

An optional boolean, which disables the audio input if set to\nTrue. Default is False.

\n", - "default": "False" - }, - { - "name": "label_visibility", - "type_name": "\"visible\", \"hidden\", or \"collapsed\"", - "is_optional": false, - "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", - "default": "is" - } - ], - "returns": [ - { - "type_name": "None or UploadedFile", - "is_generator": false, - "description": "

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected. The MIME type for the audio data is audio/wav.

\n", - "return_name": null - } - ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/audio_input.py#L86" + "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/audio_input.py#L191" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -131367,7 +141444,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -131375,7 +141452,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/fragment.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/fragment.py#L472" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -131391,7 +141468,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -131409,7 +141486,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -131438,8 +141515,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the feedback widget if set\nto True. The default is False. This argument can only be supplied\nby keyword.

\n", - "default": "False" + "description": "

An optional boolean that disables the feedback widget if set\nto True. The default is False.

\n", + "default": "is" }, { "name": "on_change", @@ -131474,7 +141551,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -131487,7 +141564,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this file uploader is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -131551,15 +141628,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the file uploader if set to\nTrue. The default is False. This argument can only be supplied by\nkeyword.

\n", - "default": "False" + "description": "

An optional boolean that disables the file uploader if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -131571,7 +141648,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", @@ -131613,7 +141690,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -131701,7 +141778,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -131727,7 +141804,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/fragment.py#L307" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/fragment.py#L307" }, "streamlit.get_option": { "name": "get_option", @@ -131745,7 +141822,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/config.py#L140" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/config.py#L141" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -131771,7 +141848,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", @@ -131813,11 +141890,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -131831,7 +141908,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -131849,11 +141926,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/html.py#L29" }, "streamlit.image": { "name": "image", - "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\")", + "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\", *, use_container_width=False)", "example": "
\n
\nimport streamlit as st\nst.image("sunrise.jpg", caption="Sunrise by the mountains")\n
\n
\n", "description": "

Display an image or list of images.

\n", "args": [ @@ -131878,8 +141955,8 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Image width. None means use the image width,\nbut do not exceed the width of the column.\nShould be set for SVG images, as they have no default image width.

\n", - "default": "image" + "description": "

Image width. If this is None (default), Streamlit will use the\nimage's native width, up to the width of the parent container.\nWhen using an SVG image without a default width, you should declare\nwidth or use use_container_width=True.

\n", + "default": "width" }, { "name": "use_column_width", @@ -131887,7 +141964,11 @@ "is_optional": false, "is_kwarg_only": false, "description": "

If "auto", set the image's width to its natural size,\nbut do not exceed the width of the column.\nIf "always" or True, set the image's width to the column width.\nIf "never" or False, set the image's width to its natural size.\nNote: if set, use_column_width takes precedence over the width parameter.

\n", - "default": null + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_column_width is deprecated and will be removed in a future\nrelease. Please use the use_container_width parameter instead.

\n" + } }, { "name": "clamp", @@ -131912,10 +141993,18 @@ "is_kwarg_only": false, "description": "

This parameter specifies the format to use when transferring the\nimage data. Photos should use the JPEG format for lossy compression\nwhile diagrams should use the PNG format for lossless compression.\nDefaults to "auto" which identifies the compression type based\non the type and format of the image argument.

\n", "default": "s" + }, + { + "name": "use_container_width", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the image's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe image to match the width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/image.py#L85" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/image.py#L90" }, "streamlit.info": { "name": "info", @@ -131941,7 +142030,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", @@ -131967,7 +142056,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", @@ -131993,7 +142082,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L223" }, "streamlit.line_chart": { "name": "line_chart", @@ -132075,7 +142164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L550" }, "streamlit.link_button": { "name": "link_button", @@ -132088,7 +142177,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

A short label explaining to the user what this button is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -132128,8 +142217,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the link button if set to\nTrue. The default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the link button if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "use_container_width", @@ -132141,7 +142230,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L438" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L440" }, "streamlit.logo": { "name": "logo", @@ -132183,7 +142272,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.map": { "name": "map", @@ -132265,7 +142354,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/map.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/map.py#L76" }, "streamlit.markdown": { "name": "markdown", @@ -132278,7 +142367,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", + "description": "

The string to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", "default": null }, { @@ -132299,7 +142388,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -132312,7 +142401,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The header or title for the metric. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

The header or title for the metric. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -132344,7 +142433,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the metric label.

\n", + "description": "

An optional tooltip that gets displayed next to the metric label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -132352,12 +142441,12 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": false, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -132370,7 +142459,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -132394,7 +142483,7 @@ "type_name": "function", "is_optional": false, "is_kwarg_only": false, - "description": "

Function to modify the display of selectbox options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe multiselect.

\n", + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", "default": null }, { @@ -132410,7 +142499,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the multiselect.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -132418,7 +142507,7 @@ "type_name": "callable", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional callback invoked when this multiselect's value changes.

\n", + "description": "

An optional callback invoked when this widget's value changes.

\n", "default": null }, { @@ -132450,7 +142539,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nDefaults to 'Choose an option'.

\n", + "description": "

A string to display when no options are selected.\nDefaults to "Choose an option."

\n", "default": "s" }, { @@ -132458,15 +142547,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the multiselect widget if set\nto True. The default is False. This argument can only be supplied\nby keyword.

\n", - "default": "False" + "description": "

An optional boolean that disables the multiselect widget if set\nto True. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -132478,12 +142567,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/multiselect.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/multiselect.py#L105" }, "streamlit.navigation": { "name": "navigation", "signature": "st.navigation(pages, *, position=\"sidebar\", expanded=False)", - "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

You can declare pages from callables or file paths.

\n
\nimport streamlit as st\nfrom page_functions import page1\n\npg = st.navigation([st.Page(page1), st.Page("page2.py")])\npg.run()\n
\n

Use a dictionary to create sections within your navigation menu.

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([st.Page(page1), st.Page(page2)])\npg.run()\n
\n", + "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

Example 1: Use a callable or Python file as a page

\n

You can declare pages from callables or file paths.

\n

page_1.py (in the same directory as your entrypoint file):

\n
\nimport streamlit as st\n\nst.title("Page 1")\n
\n

Your entrypoint file:

\n
\nimport streamlit as st\n\ndef page_2():\n    st.title("Page 2")\n\npg = st.navigation([st.Page("page_1.py"), st.Page(page_2)])\npg.run()\n
\n

Example 2: Group pages into sections

\n

You can use a dictionary to create sections within your navigation menu. In\nthe following example, each page is similar to Page 1 in Example 1, and all\npages are in the same directory. However, you can use Python files from\nanywhere in your repository. For more information, see st.Page.

\n

Directory structure:

\n
\nyour_repository/\n\u251c\u2500\u2500 create_account.py\n\u251c\u2500\u2500 learn.py\n\u251c\u2500\u2500 manage_account.py\n\u251c\u2500\u2500 streamlit_app.py\n\u2514\u2500\u2500 trial.py\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Example 3: Stateful widgets across multiple pages

\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([st.Page(page1), st.Page(page2)])\npg.run()\n
\n", "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", "args": [ { @@ -132519,7 +142608,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/navigation.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/navigation.py#L56" }, "streamlit.number_input": { "name": "number_input", @@ -132532,7 +142621,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -132588,7 +142677,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -132628,15 +142717,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the number input if set to\nTrue. The default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the number input if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -132648,7 +142737,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", @@ -132669,7 +142758,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

The label for the page link. Labels are required for external pages.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

The label for the page link. Labels are required for external pages.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -132693,7 +142782,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the page link if set to\nTrue. The default is False.

\n", + "description": "

An optional boolean that disables the page link if set to True.\nThe default is False.

\n", "default": "is" }, { @@ -132706,7 +142795,120 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/button.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L547" + }, + "streamlit.pills": { + "name": "pills", + "signature": "st.pills(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "examples": "
\n

Example 1: Multi-select pills

\n

Display a multi-select pills widget, and show the selection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.pills("Directions", options, selection_mode="multi")\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select pills with icons

\n

Display a single-select pills widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.pills(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n
\n", + "description": "

Display a pills widget.

\n

A pills widget is similar to a st.selectbox or st.multiselect\nwhere the options are displayed as pill-buttons instead of a\ndrop-down list.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable of V", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "\"single\" or \"multi\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection mode for the widget. If this is "single"\n(default), only one option can be selected. If this is "multi",\nmultiple options can be selected.

\n", + "default": null + }, + { + "name": "default", + "type_name": "Iterable of V, V, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The value of the widget when it first renders. If the\nselection_mode is multi, this can be a list of values, a\nsingle value, or None. If the selection_mode is\n"single", this can be a single value or None.

\n", + "default": null + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this widget's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean that disables the widget if set to True.\nThe default is False.

\n", + "default": "is" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "list of V, V, or None", + "is_generator": false, + "description": "

If the selection_mode is multi, this is a list of selected\noptions or an empty list. If the selection_mode is\n"single", this is a selected option or None.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L423" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -132779,7 +142981,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L306" }, "streamlit.popover": { "name": "popover", @@ -132792,7 +142994,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The label of the button that opens the popover container.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

The label of the button that opens the popover container.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -132816,8 +143018,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the popover button if set to\nTrue. The default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the popover button if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "use_container_width", @@ -132829,7 +143031,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L567" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L570" }, "streamlit.progress": { "name": "progress", @@ -132850,12 +143052,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A message to display above the progress bar. The text can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

A message to display above the progress bar. The text can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -132928,7 +143130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", @@ -132970,7 +143172,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -132983,7 +143185,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this radio group is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -133023,7 +143225,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the radio.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -133055,8 +143257,8 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the radio button if set to\nTrue. The default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the radio button if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "horizontal", @@ -133079,7 +143281,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -133091,7 +143293,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/radio.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/radio.py#L122" }, "streamlit.rerun": { "name": "rerun", @@ -133108,7 +143310,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L101" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L101" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -133198,7 +143400,120 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1252" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1252" + }, + "streamlit.segmented_control": { + "name": "segmented_control", + "signature": "st.segmented_control(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "examples": "
\n

Example 1: Multi-select segmented control

\n

Display a multi-select segmented control widget, and show the\nselection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.segmented_control(\n    "Directions", options, selection_mode="multi"\n)\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select segmented control with icons

\n

Display a single-select segmented control widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.segmented_control(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n
\n", + "description": "

Display a segmented control widget.

\n

A segmented control widget is a linear set of segments where each of\nthe passed options functions like a toggle button.

\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

A short label explaining to the user what this widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", + "default": null + }, + { + "name": "options", + "type_name": "Iterable of V", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", + "default": null + }, + { + "name": "selection_mode", + "type_name": "\"single\" or \"multi\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The selection mode for the widget. If this is "single"\n(default), only one option can be selected. If this is "multi",\nmultiple options can be selected.

\n", + "default": null + }, + { + "name": "default", + "type_name": "Iterable of V, V, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The value of the widget when it first renders. If the\nselection_mode is multi, this can be a list of values, a\nsingle value, or None. If the selection_mode is\n"single", this can be a single value or None.

\n", + "default": null + }, + { + "name": "format_func", + "type_name": "function", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", + "default": null + }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. Multiple widgets of the same type may\nnot share the same key.

\n", + "default": null + }, + { + "name": "help", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "default": null + }, + { + "name": "on_change", + "type_name": "callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional callback invoked when this widget's value changes.

\n", + "default": null + }, + { + "name": "args", + "type_name": "tuple", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional tuple of args to pass to the callback.

\n", + "default": null + }, + { + "name": "kwargs", + "type_name": "dict", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional dict of kwargs to pass to the callback.

\n", + "default": null + }, + { + "name": "disabled", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional boolean that disables the widget if set to True.\nThe default is False.

\n", + "default": "is" + }, + { + "name": "label_visibility", + "type_name": "\"visible\", \"hidden\", or \"collapsed\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "default": "is" + } + ], + "returns": [ + { + "type_name": "list of V, V, or None", + "is_generator": false, + "description": "

If the selection_mode is multi, this is a list of selected\noptions or an empty list. If the selection_mode is\n"single", this is a selected option or None.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L626" }, "streamlit.select_slider": { "name": "select_slider", @@ -133211,7 +143526,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -133251,7 +143566,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the select slider.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -133283,15 +143598,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the select slider if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the select slider if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -133303,7 +143618,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/select_slider.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/select_slider.py#L159" }, "streamlit.selectbox": { "name": "selectbox", @@ -133316,7 +143631,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this select widget is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -133340,7 +143655,7 @@ "type_name": "function", "is_optional": false, "is_kwarg_only": false, - "description": "

Function to modify the display of the labels. It receives the option\nas an argument and its output will be cast to str.

\n", + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", "default": null }, { @@ -133356,7 +143671,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the selectbox.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -133396,15 +143711,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the selectbox if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the selectbox if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -133416,7 +143731,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/selectbox.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/selectbox.py#L113" }, "streamlit.set_option": { "name": "set_option", @@ -133442,7 +143757,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -133492,7 +143807,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/page_config.py#L127" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/page_config.py#L127" }, "streamlit.slider": { "name": "slider", @@ -133505,7 +143820,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this slider is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -133561,7 +143876,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the slider.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -133593,15 +143908,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the slider if set to True. The\ndefault is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the slider if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -133613,7 +143928,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/slider.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/slider.py#L334" }, "streamlit.snow": { "name": "snow", @@ -133622,7 +143937,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -133640,7 +143955,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -133653,7 +143968,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The initial label of the status container. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

The initial label of the status container. The label can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -133681,7 +143996,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L702" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L706" }, "streamlit.stop": { "name": "stop", @@ -133690,7 +144005,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L33" }, "streamlit.subheader": { "name": "subheader", @@ -133732,7 +144047,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L110" }, "streamlit.success": { "name": "success", @@ -133758,7 +144073,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -133776,7 +144091,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/commands/execution_control.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L148" }, "streamlit.table": { "name": "table", @@ -133794,7 +144109,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L598" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L598" }, "streamlit.tabs": { "name": "tabs", @@ -133807,7 +144122,7 @@ "type_name": "list of str", "is_optional": false, "is_kwarg_only": false, - "description": "

Creates a tab for each string in the list. The first tab is selected\nby default. The string is used as the name of the tab and can\noptionally contain GitHub-flavored Markdown of the following types:\nBold, Italics, Strikethroughs, Inline Code, and Links.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", + "description": "

Creates a tab for each string in the list. The first tab is selected\nby default. The string is used as the name of the tab and can\noptionally contain GitHub-flavored Markdown of the following types:\nBold, Italics, Strikethroughs, Inline Code, Links, and Images.\nImages display like icons, with a max height equal to the font\nheight.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null } ], @@ -133819,13 +144134,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/layouts.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L350" }, "streamlit.text": { "name": "text", "signature": "st.text(body, *, help=None)", - "example": "
\n
\nimport streamlit as st\n\nst.text("This is some text.")\n
\n
\n", - "description": "

Write fixed-width and preformatted text.

\n", + "example": "
\n
\nimport streamlit as st\n\nst.text("This is text\\n[and more text](that's not a Markdown link).")\n
\n
\n", + "description": "

Write text without Markdown or HTML parsing.

\n

For monospace text, use st.code.

\n", "args": [ { "name": "body", @@ -133845,7 +144160,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -133858,7 +144173,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -133874,8 +144189,8 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired height of the UI element expressed in pixels. If None, a\ndefault height is used.

\n", - "default": "height" + "description": "

Desired height of the UI element expressed in pixels. If this is\nNone (default), the widget's initial height fits three lines.\nThe height must be at least 68 pixels, which fits two lines.

\n", + "default": null }, { "name": "max_chars", @@ -133898,7 +144213,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the textarea.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -133938,15 +144253,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the text area if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the text area if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -133958,7 +144273,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/text_widgets.py#L389" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/text_widgets.py#L392" }, "streamlit.text_input": { "name": "text_input", @@ -133971,7 +144286,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -134011,7 +144326,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -134059,15 +144374,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the text input if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the text input if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -134079,7 +144394,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -134092,7 +144407,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this time input is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -134116,7 +144431,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -134148,15 +144463,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the time input if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the time input if set to\nTrue. The default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it above the widget (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -134176,7 +144491,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/time_widgets.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/time_widgets.py#L293" }, "streamlit.title": { "name": "title", @@ -134210,12 +144525,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/heading.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L177" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -134236,7 +144551,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -134249,7 +144564,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, and\nLinks.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label (label="")\nbut hide it with label_visibility if needed. In the future, we may disallow\nempty labels by raising an exception.

\n", + "description": "

A short label explaining to the user what this toggle is for.\nThe label can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n

For accessibility reasons, you should never set an empty label, but\nyou can hide it with label_visibility if needed. In the future,\nwe may disallow empty labels by raising an exception.

\n", "default": null }, { @@ -134273,7 +144588,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the toggle.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -134305,15 +144620,15 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional boolean, which disables the toggle if set to True.\nThe default is False.

\n", - "default": "False" + "description": "

An optional boolean that disables the toggle if set to True.\nThe default is False.

\n", + "default": "is" }, { "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. If "hidden", the label doesn't show but there\nis still empty space for it (equivalent to label="").\nIf "collapsed", both the label and the space are removed. Default is\n"visible".

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -134325,7 +144640,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/widgets/checkbox.py#L163" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/checkbox.py#L166" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -134406,7 +144721,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L1640" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1640" }, "streamlit.video": { "name": "video", @@ -134480,7 +144795,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/media.py#L198" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/media.py#L198" }, "streamlit.warning": { "name": "warning", @@ -134506,7 +144821,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -134544,7 +144859,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/write.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/write.py#L240" }, "streamlit.write_stream": { "name": "write_stream", @@ -134569,7 +144884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/write.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/write.py#L66" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -134577,7 +144892,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -134585,7 +144900,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" }, "streamlit.query_params.clear": { "name": "clear", @@ -134600,7 +144915,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -134618,7 +144933,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -134642,7 +144957,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -134657,7 +144972,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -134682,7 +144997,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -134695,12 +145010,19 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -134716,12 +145038,19 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -134734,15 +145063,22 @@ { "name": "connect", "signature": "st.connections.connect.connect()", - "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

", + "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new connection object.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L260" + "returns": [ + { + "type_name": "sqlalchemy.engine.Connection", + "is_generator": false, + "description": "

A new SQLAlchemy connection object.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L354" }, { "name": "query", "signature": "st.connections.query.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "select * from pet_owners where owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only query.

", "args": [ { @@ -134810,7 +145146,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L224" }, { "name": "reset", @@ -134818,8 +145154,15 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -134828,16 +145171,30 @@ "signature": "st.connections.driver.driver", "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L279" + "returns": [ + { + "type_name": "str", + "is_generator": false, + "description": "

The name of the driver. For example, "pyodbc" or "psycopg2".

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L383" }, { "name": "engine", "signature": "st.connections.engine.engine", "description": "

The underlying SQLAlchemy Engine.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L271" + "returns": [ + { + "type_name": "sqlalchemy.engine.base.Engine", + "is_generator": false, + "description": "

The underlying SQLAlchemy Engine.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L370" }, { "name": "session", @@ -134845,11 +145202,18 @@ "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", "description": "

Return a SQLAlchemy Session.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L287" + "returns": [ + { + "type_name": "sqlalchemy.orm.Session", + "is_generator": false, + "description": "

A SQLAlchemy Session.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L396" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -134863,15 +145227,23 @@ { "name": "cursor", "signature": "st.connections.cursor.cursor()", - "description": "

Return a PEP 249-compliant cursor object.

", + "example": "
\n

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n
\n", + "description": "

Create a new cursor object from this connection.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L264" + "returns": [ + { + "type_name": "snowflake.connector.cursor.SnowflakeCursor", + "is_generator": false, + "description": "

A cursor object for the connection.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L463" }, { "name": "query", "signature": "st.connections.query.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only SQL query.

", "args": [ { @@ -134887,15 +145259,15 @@ "type_name": "float, int, timedelta or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", - "default": "None" + "description": "

The maximum number of seconds to keep results in the cache. If this\nis None (default), cached results do not expire with time.

\n", + "default": null }, { "name": "show_spinner", "type_name": "boolean or string", "is_optional": false, "is_kwarg_only": true, - "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "description": "

Whether to enable the spinner. When a cached query is executed, no\nspinner is displayed because the result is immediately available.\nWhen a new query is executed, the default is to show a spinner with\nthe message "Running snowflake.query(...)."

\n

If this is False, no spinner displays while executing the\nquery. If this is a string, the string will be used as the message\nfor the spinner.

\n", "default": "to" }, { @@ -134903,8 +145275,8 @@ "type_name": "list, tuple, dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

List of parameters to pass to the execute method. This connector supports\nbinding data to a SQL statement using qmark bindings. For more information\nand examples, see the Snowflake Python Connector documentation.\nDefault is None.

\n", - "default": "None" + "description": "

List of parameters to pass to the Snowflake Connector for Python\nCursor.execute() method. This connector supports binding data\nto a SQL statement using qmark bindings. For more information and\nexamples, see the Snowflake Connector for Python documentation.\nThis defaults to None.

\n", + "default": "s" } ], "returns": [ @@ -134915,7 +145287,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L266" }, { "name": "reset", @@ -134923,44 +145295,117 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", "signature": "st.connections.session.session()", - "description": "

Create a new Snowpark Session from this connection.

", + "example": "
\n

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n
\n", + "description": "

Create a new Snowpark session from this connection.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L281" + "returns": [ + { + "type_name": "snowflake.snowpark.Session", + "is_generator": false, + "description": "

A new Snowpark session for this connection.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L535" }, { "name": "write_pandas", "signature": "st.connections.write_pandas.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", - "description": "

Call snowflake.connector.pandas_tools.write_pandas with this connection.

", - "args": [], + "example": "
\n

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n
\n", + "description": "

Write a pandas.DataFrame to a table in a Snowflake database.

", + "args": [ + { + "name": "df", + "type_name": "pandas.DataFrame", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The pandas.DataFrame object containing the data to be copied\ninto the table.

\n", + "default": null + }, + { + "name": "table_name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the table where the data should be copied to.

\n", + "default": null + }, + { + "name": "database", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the database containing the table. By default, the function\nwrites to the database that is currently in use in the session.

\n
\n

Note

\n

If you specify this parameter, you must also specify the schema\nparameter.

\n
\n", + "default": null + }, + { + "name": "schema", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the schema containing the table. By default, the function\nwrites to the table in the schema that is currently in use in the\nsession.

\n", + "default": null + }, + { + "name": "chunk_size", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Number of elements to insert at a time. By default, the function\ninserts all elements in one chunk.

\n", + "default": null + }, + { + "name": "**kwargs", + "type_name": "Any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional keyword arguments for\nsnowflake.connector.pandas_tools.write_pandas().

\n", + "default": null + } + ], "returns": [ { "type_name": "tuple[bool, int, int]", "is_generator": false, - "description": "
\n
A tuple containing three values:
\n
    \n
  1. A bool that is True if the write was successful.
  2. \n
  3. An int giving the number of chunks of data that were copied.
  4. \n
  5. An int giving the number of rows that were inserted.
  6. \n
\n
\n
\n", + "description": "

A tuple containing three values:

\n
    \n
  1. A boolean value that is True if the write was successful.
  2. \n
  3. An integer giving the number of chunks of data that were copied.
  4. \n
  5. An integer giving the number of rows that were inserted.
  6. \n
\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L381" } ], "properties": [ { "name": "raw_connection", "signature": "st.connections.raw_connection.raw_connection", - "description": "

Access the underlying Snowflake Python connector object.

", + "example": "
\n

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n
\n", + "description": "

Access the underlying connection object from the Snowflake Connector for Python.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L272" + "returns": [ + { + "type_name": "snowflake.connector.connection.SnowflakeConnection", + "is_generator": false, + "description": "

The connection object.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L496" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L42", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -134974,7 +145419,7 @@ { "name": "query", "signature": "st.connections.query.query(sql, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only SQL query.

", "args": [ { @@ -135002,7 +145447,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -135010,8 +145455,15 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -135020,7 +145472,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -135031,10 +145483,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -135042,32 +145494,53 @@ "streamlit.connections.SQLConnection.connect": { "name": "connect", "signature": "SQLConnection.connect()", - "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new sqlalchemy.engine.Connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", + "description": "

Call .connect() on the underlying SQLAlchemy Engine, returning a new connection object.

\n

Calling this method is equivalent to calling self._instance.connect().

\n

NOTE: This method should not be confused with the internal _connect method used\nto implement a Streamlit Connection.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L260" + "returns": [ + { + "type_name": "sqlalchemy.engine.Connection", + "is_generator": false, + "description": "

A new SQLAlchemy connection object.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L354" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", "signature": "SQLConnection.driver", "description": "

The name of the driver used by the underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.driver.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L279" + "returns": [ + { + "type_name": "str", + "is_generator": false, + "description": "

The name of the driver. For example, "pyodbc" or "psycopg2".

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L383" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", "signature": "SQLConnection.engine", "description": "

The underlying SQLAlchemy Engine.

\n

This is equivalent to accessing self._instance.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L271" + "returns": [ + { + "type_name": "sqlalchemy.engine.base.Engine", + "is_generator": false, + "description": "

The underlying SQLAlchemy Engine.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L370" }, "streamlit.connections.SQLConnection.query": { "name": "query", "signature": "SQLConnection.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "select * from pet_owners where owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", - "description": "

Run a read-only query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n

Aside from the ttl kwarg, all kwargs passed to this function are passed down\nto pandas.read_sql\nand have the behavior described in the pandas documentation.

\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only query.

\n

This method implements query result caching and simple error\nhandling/retries. The caching behavior is identical to that of using\n@st.cache_data.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n

All keyword arguments passed to this function are passed down to\npandas.read_sql, except ttl.

\n", "args": [ { "name": "sql", @@ -135134,7 +145607,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L224" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -135142,8 +145615,15 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -135151,13 +145631,20 @@ "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/sql_connection.py#L287" + "returns": [ + { + "type_name": "sqlalchemy.orm.Session", + "is_generator": false, + "description": "

A SQLAlchemy Session.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L396" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", "signature": "SnowparkConnection.query(sql, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

Run a read-only SQL query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n", "args": [ { @@ -135185,7 +145672,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -135193,8 +145680,15 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -135203,7 +145697,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -135212,21 +145706,29 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", "signature": "SnowflakeConnection.cursor()", - "description": "

Return a PEP 249-compliant cursor object.

\n

For more information, see the Snowflake Python Connector documentation.

\n", + "example": "
\n

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n
\n", + "description": "

Create a new cursor object from this connection.

\n

Snowflake Connector cursors implement the Python Database API v2.0\nspecification (PEP-249). For more information, see the\nSnowflake Connector for Python documentation.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L264" + "returns": [ + { + "type_name": "snowflake.connector.cursor.SnowflakeCursor", + "is_generator": false, + "description": "

A cursor object for the connection.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L463" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", "signature": "SnowflakeConnection.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("select * from pet_owners")\nst.dataframe(df)\n
\n
\n", - "description": "

Run a read-only SQL query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n", + "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n
\n", + "description": "

Run a read-only SQL query.

\n

This method implements query result caching and simple error\nhandling/retries. The caching behavior is identical to that of using\n@st.cache_data.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached\nindefinitely.

\n
\n", "args": [ { "name": "sql", @@ -135241,15 +145743,15 @@ "type_name": "float, int, timedelta or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of seconds to keep results in the cache, or\nNone if cached results should not expire. The default is None.

\n", - "default": "None" + "description": "

The maximum number of seconds to keep results in the cache. If this\nis None (default), cached results do not expire with time.

\n", + "default": null }, { "name": "show_spinner", "type_name": "boolean or string", "is_optional": false, "is_kwarg_only": true, - "description": "

Enable the spinner. The default is to show a spinner when there is a\n"cache miss" and the cached resource is being created. If a string, the value\nof the show_spinner param will be used for the spinner text.

\n", + "description": "

Whether to enable the spinner. When a cached query is executed, no\nspinner is displayed because the result is immediately available.\nWhen a new query is executed, the default is to show a spinner with\nthe message "Running snowflake.query(...)."

\n

If this is False, no spinner displays while executing the\nquery. If this is a string, the string will be used as the message\nfor the spinner.

\n", "default": "to" }, { @@ -135257,8 +145759,8 @@ "type_name": "list, tuple, dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

List of parameters to pass to the execute method. This connector supports\nbinding data to a SQL statement using qmark bindings. For more information\nand examples, see the Snowflake Python Connector documentation.\nDefault is None.

\n", - "default": "None" + "description": "

List of parameters to pass to the Snowflake Connector for Python\nCursor.execute() method. This connector supports binding data\nto a SQL statement using qmark bindings. For more information and\nexamples, see the Snowflake Connector for Python documentation.\nThis defaults to None.

\n", + "default": "s" } ], "returns": [ @@ -135269,15 +145771,23 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L266" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", "signature": "SnowflakeConnection.raw_connection", - "description": "

Access the underlying Snowflake Python connector object.

\n

Information on how to use the Snowflake Python Connector can be found in the\nSnowflake Python Connector documentation.

\n", + "example": "
\n

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n
\n", + "description": "

Access the underlying connection object from the Snowflake Connector for Python.

\n

For information on how to use the Snowflake Connector for Python, see\nthe Snowflake Connector for Python documentation.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L272" + "returns": [ + { + "type_name": "snowflake.connector.connection.SnowflakeConnection", + "is_generator": false, + "description": "

The connection object.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L496" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -135285,31 +145795,96 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", "signature": "SnowflakeConnection.session()", - "description": "

Create a new Snowpark Session from this connection.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", + "example": "
\n

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n
\n", + "description": "

Create a new Snowpark session from this connection.

\n

For information on how to use Snowpark sessions, see the\nSnowpark developer guide\nand Snowpark API Reference.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L281" + "returns": [ + { + "type_name": "snowflake.snowpark.Session", + "is_generator": false, + "description": "

A new Snowpark session for this connection.

\n", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L535" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", "signature": "SnowflakeConnection.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", - "description": "

Call snowflake.connector.pandas_tools.write_pandas with this connection.

\n

This convenience method is simply a thin wrapper around the write_pandas\nfunction of the same name from snowflake.connector.pandas_tools. For more\ninformation, see the Snowflake Python Connector documentation.

\n", - "args": [], + "example": "
\n

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n
\n", + "description": "

Write a pandas.DataFrame to a table in a Snowflake database.

\n

This convenience method is a thin wrapper around\nsnowflake.connector.pandas_tools.write_pandas() using the\nunderlying connection. The conn parameter is passed automatically.\nFor more information and additional keyword arguments, see the\nSnowflake Connector for Python documentation.

\n", + "args": [ + { + "name": "df", + "type_name": "pandas.DataFrame", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The pandas.DataFrame object containing the data to be copied\ninto the table.

\n", + "default": null + }, + { + "name": "table_name", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the table where the data should be copied to.

\n", + "default": null + }, + { + "name": "database", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the database containing the table. By default, the function\nwrites to the database that is currently in use in the session.

\n
\n

Note

\n

If you specify this parameter, you must also specify the schema\nparameter.

\n
\n", + "default": null + }, + { + "name": "schema", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Name of the schema containing the table. By default, the function\nwrites to the table in the schema that is currently in use in the\nsession.

\n", + "default": null + }, + { + "name": "chunk_size", + "type_name": "int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Number of elements to insert at a time. By default, the function\ninserts all elements in one chunk.

\n", + "default": null + }, + { + "name": "**kwargs", + "type_name": "Any", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Additional keyword arguments for\nsnowflake.connector.pandas_tools.write_pandas().

\n", + "default": null + } + ], "returns": [ { "type_name": "tuple[bool, int, int]", "is_generator": false, - "description": "
\n
A tuple containing three values:
\n
    \n
  1. A bool that is True if the write was successful.
  2. \n
  3. An int giving the number of chunks of data that were copied.
  4. \n
  5. An int giving the number of rows that were inserted.
  6. \n
\n
\n
\n", + "description": "

A tuple containing three values:

\n
    \n
  1. A boolean value that is True if the write was successful.
  2. \n
  3. An integer giving the number of chunks of data that were copied.
  4. \n
  5. An integer giving the number of rows that were inserted.
  6. \n
\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/snowflake_connection.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L381" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -135317,8 +145892,15 @@ "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/connections/base_connection.py#L149" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -135368,7 +145950,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L953" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -135418,7 +146000,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L792" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L792" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -135476,7 +146058,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L611" }, "streamlit.column_config.Column": { "name": "Column", @@ -135526,7 +146108,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L196" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -135616,7 +146198,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1411" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1411" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -135714,7 +146296,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1170" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1170" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -135748,7 +146330,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1034" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1034" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -135798,7 +146380,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L872" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L872" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -135880,7 +146462,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L478" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -135914,7 +146496,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1105" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1105" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -136004,7 +146586,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L271" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -136062,7 +146644,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1527" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1527" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -136128,7 +146710,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L693" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L693" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -136202,7 +146784,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L384" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -136292,7 +146874,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/column_types.py#L1294" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1294" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -136332,7 +146914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/components/v1/component_registry.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/components/v1/component_registry.py#L50" }, "streamlit.components.v1.html": { "name": "html", @@ -136374,7 +146956,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -136416,7 +146998,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -136442,7 +147024,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L647" }, "StatusContainer.update": { "name": "update", @@ -136475,7 +147057,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -136504,7 +147086,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -136528,7 +147110,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L368" }, { "name": "switch_page", @@ -136552,7 +147134,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L391" } ], "properties": [ @@ -136569,7 +147151,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -136584,7 +147166,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -136599,7 +147181,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -136614,7 +147196,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -136629,7 +147211,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -136644,7 +147226,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -136659,7 +147241,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -136674,7 +147256,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -136689,7 +147271,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -136704,7 +147286,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -136719,7 +147301,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -136734,7 +147316,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -136749,7 +147331,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -136764,7 +147346,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -136779,7 +147361,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -136794,7 +147376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -136809,7 +147391,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -136824,7 +147406,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -136839,7 +147421,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -136854,7 +147436,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -136869,7 +147451,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -136884,7 +147466,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -136899,7 +147481,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -136914,7 +147496,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -136929,7 +147511,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -136944,7 +147526,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -136959,7 +147541,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -136974,7 +147556,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -136989,7 +147571,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -137004,7 +147586,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -137019,7 +147601,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -137034,7 +147616,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -137049,7 +147631,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -137064,7 +147646,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -137079,7 +147661,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -137094,7 +147676,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -137109,7 +147691,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -137124,7 +147706,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -137139,7 +147721,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -137154,7 +147736,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -137169,7 +147751,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -137184,10 +147766,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L96", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L96", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -137227,7 +147809,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -137242,7 +147824,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -137257,7 +147839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -137272,7 +147854,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -137287,7 +147869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -137302,7 +147884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -137317,7 +147899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -137332,7 +147914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -137347,7 +147929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -137362,7 +147944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -137377,7 +147959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -137392,7 +147974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -137407,7 +147989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -137422,7 +148004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -137437,7 +148019,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -137469,7 +148051,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -137517,7 +148099,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -137549,7 +148131,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -137573,7 +148155,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -137588,7 +148170,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -137603,7 +148185,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -137618,7 +148200,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -137633,7 +148215,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -137648,7 +148230,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -137663,7 +148245,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -137678,7 +148260,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -137693,7 +148275,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -137708,7 +148290,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -137723,7 +148305,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -137747,7 +148329,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L368" }, "AppTest.select_slider": { "name": "select_slider", @@ -137762,7 +148344,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -137777,7 +148359,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -137792,7 +148374,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -137807,7 +148389,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -137822,7 +148404,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -137837,7 +148419,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -137852,7 +148434,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -137876,7 +148458,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L391" }, "AppTest.table": { "name": "table", @@ -137891,7 +148473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -137906,7 +148488,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -137921,7 +148503,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -137936,7 +148518,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -137951,7 +148533,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -137966,7 +148548,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -137981,7 +148563,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -137996,7 +148578,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -138011,7 +148593,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -138026,7 +148608,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -138039,7 +148621,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -138056,7 +148638,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138064,7 +148646,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -138074,10 +148656,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -138102,7 +148684,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -138110,7 +148692,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L750" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L750" }, { "name": "set_value", @@ -138118,7 +148700,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -138126,7 +148708,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L765" } ], "properties": [ @@ -138136,7 +148718,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "indices", @@ -138144,7 +148726,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "value", @@ -138152,10 +148734,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L723" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -138180,7 +148762,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138188,7 +148770,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -138198,10 +148780,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -138217,7 +148799,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -138234,7 +148816,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138242,7 +148824,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -138250,7 +148832,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -138260,10 +148842,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -138279,7 +148861,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -138296,7 +148878,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138304,7 +148886,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -138314,10 +148896,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -138342,7 +148924,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138350,7 +148932,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -138360,10 +148942,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -138388,7 +148970,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -138398,10 +148980,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -138426,7 +149008,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -138434,7 +149016,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -138442,7 +149024,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -138450,7 +149032,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L853" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L853" } ], "properties": [ @@ -138460,7 +149042,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -138468,7 +149050,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L821" }, { "name": "value", @@ -138476,10 +149058,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L811" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L811" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L782", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L782", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -138495,7 +149077,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L926" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L926" }, { "name": "increment", @@ -138503,7 +149085,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L918" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L918" }, { "name": "run", @@ -138520,7 +149102,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138528,7 +149110,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L893" } ], "properties": [ @@ -138538,10 +149120,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L906" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L906" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L873", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L873", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -138566,7 +149148,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138574,7 +149156,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L977" } ], "properties": [ @@ -138584,7 +149166,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L971" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L971" }, { "name": "index", @@ -138592,7 +149174,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "value", @@ -138600,10 +149182,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L961" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L935", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L935", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -138628,7 +149210,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -138636,7 +149218,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1123" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1123" }, { "name": "set_value", @@ -138644,7 +149226,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1085" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1085" } ], "properties": [ @@ -138654,7 +149236,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "value", @@ -138662,10 +149244,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1106" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1106" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1067", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1067", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -138690,7 +149272,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -138698,7 +149280,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1044" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1044" }, { "name": "select_index", @@ -138706,7 +149288,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "set_value", @@ -138714,7 +149296,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1039" } ], "properties": [ @@ -138724,7 +149306,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1033" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1033" }, { "name": "index", @@ -138732,7 +149314,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1013" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1013" }, { "name": "value", @@ -138740,10 +149322,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1023" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1023" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L995", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L995", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -138768,7 +149350,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -138776,7 +149358,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "set_value", @@ -138784,7 +149366,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1147" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1147" } ], "properties": [ @@ -138794,10 +149376,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1128", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1128", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -138813,7 +149395,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1257" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1257" }, { "name": "run", @@ -138830,7 +149412,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138838,7 +149420,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1233" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1233" } ], "properties": [ @@ -138848,10 +149430,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1215", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1215", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -138867,7 +149449,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1310" }, { "name": "run", @@ -138884,7 +149466,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138892,7 +149474,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1286" } ], "properties": [ @@ -138902,10 +149484,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1299" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1299" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1268", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1268", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -138921,7 +149503,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1375" }, { "name": "increment", @@ -138929,7 +149511,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1368" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1368" }, { "name": "run", @@ -138946,7 +149528,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -138954,7 +149536,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1340" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1340" } ], "properties": [ @@ -138964,10 +149546,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1324", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1324", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -138992,7 +149574,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -139000,7 +149582,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1432" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1432" } ], "properties": [ @@ -139010,10 +149592,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1422" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L1399", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1399", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -139038,7 +149620,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -139046,7 +149628,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -139056,10 +149638,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -139077,7 +149659,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L86" }, "context.cookies": { "name": "cookies", @@ -139086,7 +149668,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L178" }, "context.headers": { "name": "headers", @@ -139095,7 +149677,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L136" }, "CachedFunc.clear": { "name": "clear", @@ -139121,7 +149703,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/caching/cache_utils.py#L321" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_utils.py#L328" }, "StreamlitPage": { "name": "StreamlitPage", @@ -139134,7 +149716,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L271" } ], "properties": [ @@ -139144,7 +149726,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L248" }, { "name": "title", @@ -139152,7 +149734,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L237" }, { "name": "url_path", @@ -139160,10 +149742,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L256" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L134", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L134", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -139196,7 +149778,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L248" }, "StreamlitPage.run": { "name": "run", @@ -139204,7 +149786,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L271" }, "StreamlitPage.title": { "name": "title", @@ -139212,7 +149794,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L237" }, "StreamlitPage.url_path": { "name": "url_path", @@ -139220,7 +149802,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L256" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -139240,11 +149822,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L86" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/user_info.py#L36", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L36", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -139270,7 +149852,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L178" }, { "name": "headers", @@ -139279,10 +149861,10 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/runtime/context.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L125", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -139292,7 +149874,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L169", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L169", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -139312,7 +149894,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/plotly_chart.py#L81", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L81", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -139353,7 +149935,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/vega_charts.py#L100", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L100", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -139373,7 +149955,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -139392,7 +149974,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -139419,7 +150001,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -139438,7 +150020,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.39.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -139461,7 +150043,7 @@ "is_attribute_dict": true } }, - "1.40.0": { + "1.41.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -139473,7 +150055,7 @@ "type_name": "str, Path, or callable", "is_optional": false, "is_kwarg_only": false, - "description": "

The page source as a Callable or path to a Python file. If the page\nsource is defined by a Python file, the path can be a string or\npathlib.Path object, but must be declared relative to the\nentrypoint file. If the page source is defined by a Callable, the\nCallable can't accept arguments.

\n", + "description": "

The page source as a Callable or path to a Python file. If the page\nsource is defined by a Python file, the path can be a string or\npathlib.Path object. Paths can be absolute or relative to the\nentrypoint file. If the page source is defined by a Callable, the\nCallable can't accept arguments.

\n", "default": null }, { @@ -139517,7 +150099,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -139582,7 +150164,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1486" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1489" }, "streamlit.area_chart": { "name": "area_chart", @@ -139672,7 +150254,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L746" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L748" }, "streamlit.audio": { "name": "audio", @@ -139682,10 +150264,10 @@ "args": [ { "name": "data", - "type_name": "str, bytes, BytesIO, numpy.ndarray, or file", + "type_name": "str, Path, bytes, BytesIO, numpy.ndarray, or file", "is_optional": false, "is_kwarg_only": false, - "description": "

Raw audio data, filename, or a URL pointing to the file to load.\nRaw data formats must include all necessary file headers to match the file\nformat specified via format.\nIf data is a numpy array, it must either be a 1D array of the waveform\nor a 2D array of shape (num_channels, num_samples) with waveforms\nfor all channels. See the default channel order at\nhttp://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx

\n", + "description": "

The audio to play. This can be one of the following:

\n
    \n
  • A URL (string) for a hosted audio file.
  • \n
  • A path to a local audio file. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Raw audio data. Raw data formats must include all necessary file\nheaders to match the file format specified via format.
  • \n
\n

If data is a NumPy array, it must either be a 1D array of the\nwaveform or a 2D array of shape (C, S) where C is the number of\nchannels and S is the number of samples. See the default channel\norder at\nhttp://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx

\n", "default": "channel" }, { @@ -139693,7 +150275,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The mime type for the audio file. Defaults to "audio/wav".\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "description": "

The MIME type for the audio file. This defaults to "audio/wav".\nFor more information, see https://tools.ietf.org/html/rfc4281.

\n", "default": "s" }, { @@ -139709,7 +150291,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The sample rate of the audio data in samples per second. Only required if\ndata is a numpy array.

\n", + "description": "

The sample rate of the audio data in samples per second. This is\nonly required if data is a NumPy array.

\n", "default": null }, { @@ -139738,7 +150320,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/media.py#L65" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", @@ -139767,7 +150349,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

A tooltip that gets displayed next to the audio input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -139819,7 +150401,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/audio_input.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/audio_input.py#L90" }, "streamlit.balloons": { "name": "balloons", @@ -139828,7 +150410,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -139926,13 +150508,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L989" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", "signature": "st.bokeh_chart(figure, use_container_width=False)", "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n
\n", - "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n", + "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand.

\n
\n", "args": [ { "name": "figure", @@ -139952,12 +150534,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n
\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n
\n", + "examples": "
\n

Example 1: Customize your button type

\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n\nif st.button("Aloha", type="tertiary"):\n    st.write("Ciao")\n
\n

Example 2: Add icons to your button

\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -140010,11 +150592,11 @@ }, { "name": "type", - "type_name": "\"secondary\" or \"primary\"", + "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", - "default": "s" + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "default": null }, { "name": "icon", @@ -140049,7 +150631,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L87" }, "streamlit.cache": { "name": "cache", @@ -140123,13 +150705,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", - "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -140193,13 +150775,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", - "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { "name": "func", @@ -140263,7 +150845,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -140292,7 +150874,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A tooltip that gets displayed next to the camera input.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -140344,7 +150926,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", @@ -140378,7 +150960,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L170" }, "streamlit.chat_input": { "name": "chat_input", @@ -140451,7 +151033,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/chat.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/chat.py#L240" }, "streamlit.chat_message": { "name": "chat_message", @@ -140469,10 +151051,10 @@ }, { "name": "avatar", - "type_name": "Anything supported by st.image, str, or None", + "type_name": "Anything supported by st.image (except list), str, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (except list),\nthe following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": "user" } ], @@ -140484,7 +151066,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/chat.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/chat.py#L126" }, "streamlit.checkbox": { "name": "checkbox", @@ -140573,7 +151155,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", @@ -140615,7 +151197,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -140704,12 +151286,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", - "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\")", - "examples": "
\n

You can use the with notation to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n
\n", + "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\", border=False)", + "examples": "
\n

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n
\n", "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This\nis only possible in the main area of the app.

\n
\n", "args": [ { @@ -140735,6 +151317,14 @@ "is_kwarg_only": true, "description": "

The vertical alignment of the content inside the columns. The\ndefault is "top".

\n", "default": "is" + }, + { + "name": "border", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show a border around the column containers. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown around each column.

\n", + "default": null } ], "returns": [ @@ -140745,7 +151335,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", @@ -140802,7 +151392,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -140836,7 +151426,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L42" }, "streamlit.data_editor": { "name": "data_editor", @@ -140957,12 +151547,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/data_editor.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/data_editor.py#L579" }, "streamlit.dataframe": { "name": "dataframe", "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\")", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Or you can customize the dataframe via column_config, hide_index, or column_order:

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\n

Example 1: Display a dataframe

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nimport streamlit as st\nimport pandas as pd\nfrom datetime import date\n\ndf = pd.DataFrame(\n    {\n        "Date": [date(2024, 1, 1), date(2024, 2, 1), date(2024, 3, 1)],\n        "Total": [13429, 23564, 23452],\n    }\n)\ndf.set_index("Date", inplace=True)\n\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n
\n", "description": "

Display a dataframe as an interactive table.

\n

This command works with a wide variety of collection-like and\ndataframe-like object types.

\n", "args": [ { @@ -141042,7 +151632,7 @@ "type_name": "\"single-row\", \"multi-row\", \"single-column\", \"multi-column\", or Iterable of these", "is_optional": false, "is_kwarg_only": true, - "description": "

The types of selections Streamlit should allow. This can be one of\nthe following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", + "description": "

The types of selections Streamlit should allow when selections are\nenabled with on_select. This can be one of the following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", "default": null } ], @@ -141054,11 +151644,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L256" }, "streamlit.date_input": { "name": "date_input", - "signature": "st.date_input(label, value=\"default_value_today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", + "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n
\n", "description": "

Display a date input widget.

\n

The first day of the week is determined from the user's locale in their\nbrowser.

\n", "args": [ @@ -141072,27 +151662,27 @@ }, { "name": "value", - "type_name": "datetime.date or datetime.datetime or list/tuple of datetime.date or datetime.datetime, \"today\", or None", + "type_name": "\"today\", datetime.date, datetime.datetime, str, list/tuple of these, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The value of this widget when it first renders. If a list/tuple with\n0 to 2 date/datetime values is provided, the datepicker will allow\nusers to provide a range. If None, will initialize empty and\nreturn None until the user provides input. If "today" (default),\nwill initialize with today as a single-date picker.

\n", + "description": "

The value of this widget when it first renders. This can be one of\nthe following:

\n
    \n
  • "today" (default): The widget initializes with the current date.
  • \n
  • A datetime.date or datetime.datetime object: The widget\ninitializes with the given date, ignoring any time if included.
  • \n
  • An ISO-formatted date ("YYYY-MM-DD") or datetime\n("YYYY-MM-DD hh:mm:ss") string: The widget initializes with the\ngiven date, ignoring any time if included.
  • \n
  • A list or tuple with up to two of the above: The widget will\ninitialize with the given date interval and return a tuple of the\nselected interval. You can pass an empty list to initialize the\nwidget with an empty interval or a list with one value to\ninitialize only the beginning date of the iterval.
  • \n
  • None: The widget initializes with no date and returns\nNone until the user selects a date.
  • \n
\n", "default": null }, { "name": "min_value", - "type_name": "datetime.date or datetime.datetime", + "type_name": "\"today\", datetime.date, datetime.datetime, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The minimum selectable date. If value is a date, defaults to value - 10 years.\nIf value is the interval [start, end], defaults to start - 10 years.

\n", - "default": "value" + "description": "

The minimum selectable date. This can be any of the date types\naccepted by value, except list or tuple.

\n

If this is None (default), the minimum selectable date is ten\nyears before the initial value. If the initial value is an\ninterval, the minimum selectable date is ten years before the start\ndate of the interval. If no initial value is set, the minimum\nselectable date is ten years before today.

\n", + "default": null }, { "name": "max_value", - "type_name": "datetime.date or datetime.datetime", + "type_name": "\"today\", datetime.date, datetime.datetime, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum selectable date. If value is a date, defaults to value + 10 years.\nIf value is the interval [start, end], defaults to end + 10 years.

\n", - "default": "value" + "description": "

The maximum selectable date. This can be any of the date types\naccepted by value, except list or tuple.

\n

If this is None (default), the maximum selectable date is ten\nyears after the initial value. If the initial value is an interval,\nthe maximum selectable date is ten years after the end date of the\ninterval. If no initial value is set, the maximum selectable date\nis ten years after today.

\n", + "default": null }, { "name": "key", @@ -141167,7 +151757,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/time_widgets.py#L519" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/time_widgets.py#L570" }, "streamlit.dialog": { "name": "dialog", @@ -141193,7 +151783,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -141202,7 +151792,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L276" }, "streamlit.download_button": { "name": "download_button", @@ -141284,11 +151874,11 @@ }, { "name": "type", - "type_name": "\"secondary\" or \"primary\"", + "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", - "default": "s" + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "default": null }, { "name": "icon", @@ -141323,7 +151913,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L253" }, "streamlit.echo": { "name": "echo", @@ -141341,7 +151931,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -141350,7 +151940,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -141376,7 +151966,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -141394,7 +151984,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/exception.py#L42" }, "streamlit.expander": { "name": "expander", @@ -141428,7 +152018,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L489" }, "streamlit.experimental_audio_input": { "name": "experimental_audio_input", @@ -141436,7 +152026,7 @@ "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/audio_input.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/audio_input.py#L193" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -141444,7 +152034,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -141452,7 +152042,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/fragment.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/fragment.py#L472" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -141468,7 +152058,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -141486,7 +152076,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -141551,7 +152141,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -141596,7 +152186,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A tooltip that gets displayed next to the file uploader.

\n", + "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", "default": null }, { @@ -141648,7 +152238,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/file_uploader.py#L228" }, "streamlit.form": { "name": "form", @@ -141690,7 +152280,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -141739,11 +152329,11 @@ }, { "name": "type", - "type_name": "\"secondary\" or \"primary\"", + "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", - "default": "s" + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "default": null }, { "name": "icon", @@ -141778,7 +152368,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -141804,7 +152394,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/fragment.py#L307" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/fragment.py#L307" }, "streamlit.get_option": { "name": "get_option", @@ -141822,7 +152412,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/config.py#L141" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/config.py#L141" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -141848,7 +152438,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", @@ -141890,11 +152480,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -141908,7 +152498,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -141918,15 +152508,15 @@ "args": [ { "name": "body", - "type_name": "str", + "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The HTML code to insert, or path to an HTML code file which is\nloaded and inserted.

\n

If the provided string is the path of a local file, Streamlit will\nload the file and render its contents as HTML. Otherwise, Streamlit\nwill render the string directly as HTML.

\n", + "description": "

The HTML code to insert. This can be one of the following:

\n
    \n
  • A string of HTML code.
  • \n
  • A path to a local file with HTML code. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Any object. If body is not a string or path, Streamlit will\nconvert the object to a string. body._repr_html_() takes\nprecedence over str(body) when available.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/html.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/html.py#L31" }, "streamlit.image": { "name": "image", @@ -141936,10 +152526,10 @@ "args": [ { "name": "image", - "type_name": "numpy.ndarray, [numpy.ndarray], BytesIO, str, or [str]", + "type_name": "numpy.ndarray, BytesIO, str, Path, or list of these", "is_optional": false, "is_kwarg_only": false, - "description": "

Monochrome image of shape (w,h) or (w,h,1)\nOR a color image of shape (w,h,3)\nOR an RGBA image of shape (w,h,4)\nOR a URL to fetch the image from\nOR a path of a local image file\nOR an SVG XML string like <svg xmlns=...</svg>\nOR a list of one of the above, to display multiple images.

\n", + "description": "

The image to display. This can be one of the following:

\n
    \n
  • A URL (string) for a hosted image.
  • \n
  • A path to a local image file. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • An SVG string like <svg xmlns=...</svg>.
  • \n
  • A byte array defining an image. This includes monochrome images of\nshape (w,h) or (w,h,1), color images of shape (w,h,3), or RGBA\nimages of shape (w,h,4), where w and h are the image width and\nheight, respectively.
  • \n
  • A list of any of the above. Streamlit displays the list as a\nrow of images that overflow to additional rows as needed.
  • \n
\n", "default": null }, { @@ -141947,7 +152537,7 @@ "type_name": "str or list of str", "is_optional": false, "is_kwarg_only": false, - "description": "

Image caption. If displaying multiple images, caption should be a\nlist of captions (one for each image).

\n", + "description": "

Image caption(s). If this is None (default), no caption is\ndisplayed. If image is a list of multiple images,\ncaption must be a list of captions (one caption for each\nimage) or None.

\n", "default": null }, { @@ -141975,7 +152565,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Clamp image pixel values to a valid range ([0-255] per channel).\nThis is only meaningful for byte array images; the parameter is\nignored for image URLs. If this is not set, and an image has an\nout-of-range value, an error will be thrown.

\n", + "description": "

Whether to clamp image pixel values to a valid range (0-255 per\nchannel). This is only used for byte array images; the parameter is\nignored for image URLs and files. If this is False (default)\nand an image has an out-of-range value, a RuntimeError will be\nraised.

\n", "default": null }, { @@ -141983,16 +152573,16 @@ "type_name": "\"RGB\" or \"BGR\"", "is_optional": false, "is_kwarg_only": false, - "description": "

If image is an nd.array, this parameter denotes the format used to\nrepresent color information. Defaults to "RGB", meaning\nimage[:, :, 0] is the red channel, image[:, :, 1] is green, and\nimage[:, :, 2] is blue. For images coming from libraries like\nOpenCV you should set this to "BGR", instead.

\n", - "default": "s" + "description": "

The color format when image is an nd.array. This is ignored\nfor other image types. If this is "RGB" (default),\nimage[:, :, 0] is the red channel, image[:, :, 1] is the\ngreen channel, and image[:, :, 2] is the blue channel. For\nimages coming from libraries like OpenCV, you should set this to\n"BGR" instead.

\n", + "default": null }, { "name": "output_format", "type_name": "\"JPEG\", \"PNG\", or \"auto\"", "is_optional": false, "is_kwarg_only": false, - "description": "

This parameter specifies the format to use when transferring the\nimage data. Photos should use the JPEG format for lossy compression\nwhile diagrams should use the PNG format for lossless compression.\nDefaults to "auto" which identifies the compression type based\non the type and format of the image argument.

\n", - "default": "s" + "description": "

The output format to use when transferring the image data. If this\nis "auto" (default), Streamlit identifies the compression type\nbased on the type and format of the image. Photos should use the\n"JPEG" format for lossy compression while diagrams should use\nthe "PNG" format for lossless compression.

\n", + "default": null }, { "name": "use_container_width", @@ -142004,7 +152594,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/image.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -142030,7 +152620,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L116" }, "streamlit.json": { "name": "json", @@ -142056,7 +152646,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", @@ -142082,7 +152672,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L228" }, "streamlit.line_chart": { "name": "line_chart", @@ -142164,7 +152754,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L552" }, "streamlit.link_button": { "name": "link_button", @@ -142198,11 +152788,11 @@ }, { "name": "type", - "type_name": "\"secondary\" or \"primary\"", + "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. Can be "primary" for a\nbutton with additional emphasis or "secondary" for a normal button. Defaults\nto "secondary".

\n", - "default": "s" + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "default": null }, { "name": "icon", @@ -142230,7 +152820,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L440" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L461" }, "streamlit.logo": { "name": "logo", @@ -142240,10 +152830,10 @@ "args": [ { "name": "image", - "type_name": "Anything supported by st.image", + "type_name": "Anything supported by st.image (except list)", "is_optional": false, "is_kwarg_only": false, - "description": "

The image to display in the upper-left corner of your app and its\nsidebar. If icon_image is also provided, then Streamlit will only\ndisplay image in the sidebar.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar.

\n", + "description": "

The image to display in the upper-left corner of your app and its\nsidebar. This can be any of the types supported by st.image except\na list. If icon_image is also provided, then Streamlit will only\ndisplay image in the sidebar.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar.

\n", "default": null }, { @@ -142264,15 +152854,15 @@ }, { "name": "icon_image", - "type_name": "Anything supported by st.image or None", + "type_name": "Anything supported by st.image (except list) or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional, typically smaller image to replace image in the\nupper-left corner when the sidebar is closed. If icon_image is\nNone (default), Streamlit will always display image in the\nupper-left corner, regardless of whether the sidebar is open or closed.\nOtherwise, Streamlit will render icon_image in the upper-left\ncorner of the app when the sidebar is closed.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar. If the sidebar is closed, the max\nwidth is retained from when it was last open.

\n

For best results, pass a wide or horizontal image to image and a\nsquare image to icon_image. Or, pass a square image to image\nand leave icon_image=None.

\n", + "description": "

An optional, typically smaller image to replace image in the\nupper-left corner when the sidebar is closed. This can be any of the\ntypes supported by st.image except a list. If icon_image is\nNone (default), Streamlit will always display image in the\nupper-left corner, regardless of whether the sidebar is open or closed.\nOtherwise, Streamlit will render icon_image in the upper-left\ncorner of the app when the sidebar is closed.

\n

Streamlit scales the image to a max height set by size and a max\nwidth to fit within the sidebar. If the sidebar is closed, the max\nwidth is retained from when it was last open.

\n

For best results, pass a wide or horizontal image to image and a\nsquare image to icon_image. Or, pass a square image to image\nand leave icon_image=None.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.map": { "name": "map", @@ -142354,7 +152944,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/map.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/map.py#L76" }, "streamlit.markdown": { "name": "markdown", @@ -142364,11 +152954,11 @@ "args": [ { "name": "body", - "type_name": "str", + "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The string to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey, rainbow.\nFor example, you can use :orange[your text here] or\n:blue-background[your text here].
  • \n
\n", - "default": null + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
\n", + "default": "primary" }, { "name": "unsafe_allow_html", @@ -142388,12 +152978,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", - "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

st.metric looks especially nice in combination with st.columns:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

The delta indicator color can also be inverted or turned off:

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n
\n", + "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False)", + "examples": "
\n

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ { @@ -142443,10 +153033,18 @@ "is_kwarg_only": false, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "border", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": false, + "description": "

Whether to show a border around the metric container. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -142567,7 +153165,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/multiselect.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/multiselect.py#L105" }, "streamlit.navigation": { "name": "navigation", @@ -142608,7 +153206,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/navigation.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/navigation.py#L56" }, "streamlit.number_input": { "name": "number_input", @@ -142737,7 +153335,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", @@ -142747,7 +153345,7 @@ "args": [ { "name": "page", - "type_name": "str or st.Page", + "type_name": "str, Path, or st.Page", "is_optional": false, "is_kwarg_only": false, "description": "

The file path (relative to the main script) or an st.Page indicating\nthe page to switch to. Alternatively, this can be the URL to an\nexternal page (must start with "http://" or "https://").

\n", @@ -142795,7 +153393,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button.py#L547" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L574" }, "streamlit.pills": { "name": "pills", @@ -142908,13 +153506,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L423" }, "streamlit.plotly_chart": { "name": "plotly_chart", "signature": "st.plotly_chart(figure_or_data, use_container_width=False, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig, use_container_width=True)\n
\n
\n", - "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n", + "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly to use this command. Your app's\nperformance may be enhanced by installing orjson as well.

\n
\n", "args": [ { "name": "figure_or_data", @@ -142981,7 +153579,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L306" }, "streamlit.popover": { "name": "popover", @@ -143031,7 +153629,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L570" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L604" }, "streamlit.progress": { "name": "progress", @@ -143057,7 +153655,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -143130,13 +153728,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", - "description": "

Display a matplotlib.pyplot figure.

\n", + "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib to use this command.

\n
\n", "args": [ { "name": "fig", @@ -143172,7 +153770,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -143293,7 +153891,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/radio.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/radio.py#L122" }, "streamlit.rerun": { "name": "rerun", @@ -143310,7 +153908,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L101" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -143400,7 +153998,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1252" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1255" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -143513,7 +154111,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/button_group.py#L626" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L626" }, "streamlit.select_slider": { "name": "select_slider", @@ -143618,7 +154216,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/select_slider.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/select_slider.py#L159" }, "streamlit.selectbox": { "name": "selectbox", @@ -143731,7 +154329,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/selectbox.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/selectbox.py#L113" }, "streamlit.set_option": { "name": "set_option", @@ -143757,7 +154355,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/config.py#L93" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -143775,10 +154373,10 @@ }, { "name": "page_icon", - "type_name": "Anything supported by st.image, str, or None", + "type_name": "Anything supported by st.image (except list), str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (like URLs or numpy\narrays), the following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", + "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (except list), the\nfollowing strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", "default": null }, { @@ -143807,7 +154405,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/page_config.py#L127" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/page_config.py#L132" }, "streamlit.slider": { "name": "slider", @@ -143928,7 +154526,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/slider.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/slider.py#L334" }, "streamlit.snow": { "name": "snow", @@ -143937,7 +154535,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -143955,7 +154553,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -143996,7 +154594,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L706" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L740" }, "streamlit.stop": { "name": "stop", @@ -144005,7 +154603,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -144047,7 +154645,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L110" }, "streamlit.success": { "name": "success", @@ -144073,7 +154671,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L160" }, "streamlit.switch_page": { "name": "switch_page", @@ -144083,7 +154681,7 @@ "args": [ { "name": "page", - "type_name": "str or st.Page", + "type_name": "str, Path, or st.Page", "is_optional": false, "is_kwarg_only": false, "description": "

The file path (relative to the main script) or an st.Page indicating\nthe page to switch to.

\n", @@ -144091,7 +154689,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/commands/execution_control.py#L148" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L154" }, "streamlit.table": { "name": "table", @@ -144109,7 +154707,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L598" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L632" }, "streamlit.tabs": { "name": "tabs", @@ -144134,7 +154732,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/layouts.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L384" }, "streamlit.text": { "name": "text", @@ -144160,7 +154758,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -144273,7 +154871,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/text_widgets.py#L392" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/text_widgets.py#L392" }, "streamlit.text_input": { "name": "text_input", @@ -144394,7 +154992,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -144412,10 +155010,10 @@ }, { "name": "value", - "type_name": "datetime.time/datetime.datetime, \"now\" or None", + "type_name": "\"now\", datetime.time, datetime.datetime, str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The value of this widget when it first renders. This will be\ncast to str internally. If None, will initialize empty and\nreturn None until the user selects a time. If "now" (default),\nwill initialize with the current time.

\n", + "description": "

The value of this widget when it first renders. This can be one of\nthe following:

\n
    \n
  • "now" (default): The widget initializes with the current time.
  • \n
  • A datetime.time or datetime.datetime object: The widget\ninitializes with the given time, ignoring any date if included.
  • \n
  • An ISO-formatted time ("hh:mm", "hh:mm:ss", or "hh:mm:ss.sss") or\ndatetime ("YYYY-MM-DD hh:mm:ss") string: The widget initializes\nwith the given time, ignoring any date if included.
  • \n
  • None: The widget initializes with no time and returns\nNone until the user selects a time.
  • \n
\n", "default": null }, { @@ -144491,7 +155089,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/time_widgets.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/time_widgets.py#L346" }, "streamlit.title": { "name": "title", @@ -144525,12 +155123,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/heading.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L177" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -144551,7 +155149,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -144640,7 +155238,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/widgets/checkbox.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/checkbox.py#L166" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -144721,7 +155319,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L1640" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1643" }, "streamlit.video": { "name": "video", @@ -144731,10 +155329,10 @@ "args": [ { "name": "data", - "type_name": "str, bytes, io.BytesIO, numpy.ndarray, or file", + "type_name": "str, Path, bytes, io.BytesIO, numpy.ndarray, or file", "is_optional": false, "is_kwarg_only": false, - "description": "

Raw video data, filename, or URL pointing to a video to load.\nIncludes support for YouTube URLs.\nNumpy arrays and raw data formats must include all necessary file\nheaders to match specified file format.

\n", + "description": "

The video to play. This can be one of the following:

\n
    \n
  • A URL (string) for a hosted video file, including YouTube URLs.
  • \n
  • A path to a local video file. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Raw video data. Raw data formats must include all necessary file\nheaders to match the file format specified via format.
  • \n
\n", "default": null }, { @@ -144742,7 +155340,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The mime type for the video file. Defaults to "video/mp4".\nSee https://tools.ietf.org/html/rfc4281 for more info.

\n", + "description": "

The MIME type for the video file. This defaults to "video/mp4".\nFor more information, see https://tools.ietf.org/html/rfc4281.

\n", "default": "s" }, { @@ -144758,7 +155356,7 @@ "type_name": "str, bytes, Path, io.BytesIO, or dict", "is_optional": false, "is_kwarg_only": true, - "description": "

Optional subtitle data for the video, supporting several input types:

\n
    \n
  • None (default): No subtitles.
  • \n
  • A string, bytes, or Path: File path to a subtitle file in .vtt or .srt formats, or\nthe raw content of subtitles conforming to these formats.\nIf providing raw content, the string must adhere to the WebVTT or SRT\nformat specifications.
  • \n
  • io.BytesIO: A BytesIO stream that contains valid .vtt or .srt\nformatted subtitle data.
  • \n
  • A dictionary: Pairs of labels and file paths or raw subtitle content in\n.vtt or .srt formats to enable multiple subtitle tracks.\nThe label will be shown in the video player. Example:\n{"English": "path/to/english.vtt", "French": "path/to/french.srt"}
  • \n
\n

When provided, subtitles are displayed by default. For multiple\ntracks, the first one is displayed by default. If you don't want any\nsubtitles displayed by default, use an empty string for the value\nin a dictrionary's first pair: {"None": "", "English": "path/to/english.vtt"}

\n

Not supported for YouTube videos.

\n", + "description": "

Optional subtitle data for the video, supporting several input types:

\n
    \n
  • None (default): No subtitles.
  • \n
  • A string, bytes, or Path: File path to a subtitle file in\n.vtt or .srt formats, or the raw content of subtitles\nconforming to these formats. Paths can be absolute or relative to\nthe working directory (where you execute streamlit run).\nIf providing raw content, the string must adhere to the WebVTT or\nSRT format specifications.
  • \n
  • io.BytesIO: A BytesIO stream that contains valid .vtt or .srt\nformatted subtitle data.
  • \n
  • A dictionary: Pairs of labels and file paths or raw subtitle content in\n.vtt or .srt formats to enable multiple subtitle tracks.\nThe label will be shown in the video player. Example:\n{"English": "path/to/english.vtt", "French": "path/to/french.srt"}
  • \n
\n

When provided, subtitles are displayed by default. For multiple\ntracks, the first one is displayed by default. If you don't want any\nsubtitles displayed by default, use an empty string for the value\nin a dictrionary's first pair: {"None": "", "English": "path/to/english.vtt"}

\n

Not supported for YouTube videos.

\n", "default": null }, { @@ -144795,7 +155393,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/media.py#L198" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/media.py#L212" }, "streamlit.warning": { "name": "warning", @@ -144821,7 +155419,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L73" }, "streamlit.write": { "name": "write", @@ -144834,7 +155432,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(dataframe) : Displays any dataframe-like object in an interactive table.
  • \n
  • write(dict) : Displays dict-like in an interactive viewer.
  • \n
  • write(list) : Displays list-like in an interactive viewer.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about the module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(db_cursor) : Displays DB API 2.0 cursor results in a table.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", + "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(dataframe) : Displays any dataframe-like object in an interactive table.
  • \n
  • write(dict) : Displays dict-like in an interactive viewer.
  • \n
  • write(list) : Displays list-like in an interactive viewer.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about a module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(DeltaGenerator) : Displays information about a DeltaGenerator.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(db_cursor) : Displays DB API 2.0 cursor results in a table.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", "default": null }, { @@ -144859,7 +155457,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/write.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/write.py#L253" }, "streamlit.write_stream": { "name": "write_stream", @@ -144872,7 +155470,7 @@ "type_name": "Callable, Generator, Iterable, OpenAI Stream, or LangChain Stream", "is_optional": false, "is_kwarg_only": false, - "description": "

The generator or iterable to stream.

\n
\n

Note

\n

To use additional LLM libraries, you can create a wrapper to\nmanually define a generator function and include custom output\nparsing.

\n
\n", + "description": "

The generator or iterable to stream.

\n

If you pass an async generator, Streamlit will internally convert\nit to a sync generator.

\n
\n

Note

\n

To use additional LLM libraries, you can create a wrapper to\nmanually define a generator function and include custom output\nparsing.

\n
\n", "default": null } ], @@ -144884,7 +155482,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/write.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/write.py#L67" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -144892,7 +155490,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_data_api.py#L586" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -144900,7 +155498,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_resource_api.py#L435" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -144915,7 +155513,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -144933,7 +155531,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -144957,7 +155555,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -144972,7 +155570,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" }, "streamlit.query_params.update": { "name": "update", @@ -144997,7 +155595,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -145018,11 +155616,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -145046,11 +155644,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -145073,7 +155671,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L354" }, { "name": "query", @@ -145146,7 +155744,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L224" }, { "name": "reset", @@ -145162,7 +155760,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" } ], "properties": [ @@ -145179,7 +155777,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L383" }, { "name": "engine", @@ -145194,7 +155792,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L370" }, { "name": "session", @@ -145210,10 +155808,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L396" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -145238,7 +155836,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L463" }, { "name": "query", @@ -145287,7 +155885,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L266" }, { "name": "reset", @@ -145303,7 +155901,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "session", @@ -145319,7 +155917,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L535" }, { "name": "write_pandas", @@ -145384,7 +155982,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L381" } ], "properties": [ @@ -145402,10 +156000,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L496" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L42", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L42", "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -145447,7 +156045,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -145463,7 +156061,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, { "name": "safe_session", @@ -145472,7 +156070,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -145483,10 +156081,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -145504,7 +156102,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L354" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -145519,7 +156117,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L383" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -145534,7 +156132,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L370" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -145607,7 +156205,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L224" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -145623,7 +156221,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -145639,7 +156237,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L396" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -145672,7 +156270,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -145688,7 +156286,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -145697,7 +156295,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -145706,7 +156304,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -145722,7 +156320,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L463" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -145771,7 +156369,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L266" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -145787,7 +156385,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L496" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -145803,7 +156401,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -145819,7 +156417,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L535" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -145884,7 +156482,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/snowflake_connection.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L381" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -145900,11 +156498,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", - "signature": "st.column_config.AreaChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "signature": "st.column_config.AreaChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure an area chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ @@ -145913,7 +156511,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -145921,7 +156519,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -145929,7 +156527,15 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null }, { @@ -145937,7 +156543,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "description": "

The minimum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the minimum of its data.

\n", "default": null }, { @@ -145945,16 +156551,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "description": "

The maximum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the maximum of its data.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1152" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", - "signature": "st.column_config.BarChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "signature": "st.column_config.BarChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a bar chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ @@ -145963,7 +156569,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -145971,7 +156577,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -145979,7 +156585,15 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null }, { @@ -145987,7 +156601,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "description": "

The minimum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the minimum of its data.

\n", "default": null }, { @@ -145995,16 +156609,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "description": "

The maximum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the maximum of its data.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L792" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L963" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", - "signature": "st.column_config.CheckboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None)", + "signature": "st.column_config.CheckboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a checkbox column in st.dataframe or st.data_editor.

\n

This is the default column type for boolean values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a checkbox widget.

\n", "args": [ @@ -146013,7 +156627,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146021,7 +156635,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146029,7 +156643,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146037,32 +156651,40 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L735" }, "streamlit.column_config.Column": { "name": "Column", - "signature": "st.column_config.Column(label=None, *, width=None, help=None, disabled=None, required=None)", + "signature": "st.column_config.Column(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n
\n", "description": "

Configure a generic column in st.dataframe or st.data_editor.

\n

The type of the column will be automatically inferred from the data type.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n

To change the type of the column and enable type-specific configuration options,\nuse one of the column types in the st.column_config namespace,\ne.g. st.column_config.NumberColumn.

\n", "args": [ @@ -146071,7 +156693,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146079,7 +156701,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146087,7 +156709,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146095,24 +156717,32 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L196" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L218" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", - "signature": "st.column_config.DateColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "signature": "st.column_config.DateColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", "examples": "
\n
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a date column in st.dataframe or st.data_editor.

\n

This is the default column type for date values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When used\nwith st.data_editor, editing will be enabled with a date picker widget.

\n", "args": [ @@ -146121,7 +156751,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146129,7 +156759,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146137,7 +156767,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146145,23 +156775,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "datetime.date or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146169,7 +156807,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nYYYY-MM-DD.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -146177,7 +156815,7 @@ "type_name": "datetime.date or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum date that can be entered.\nIf None (default), there will be no minimum.

\n", + "description": "

The minimum date that can be entered. If this is None (default),\nthere will be no minimum.

\n", "default": null }, { @@ -146185,7 +156823,7 @@ "type_name": "datetime.date or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum date that can be entered.\nIf None (default), there will be no maximum.

\n", + "description": "

The maximum date that can be entered. If this is None (default),\nthere will be no maximum.

\n", "default": null }, { @@ -146193,16 +156831,16 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The stepping interval in days. If None (default), the step will be 1 day.

\n", + "description": "

The stepping interval in days. If this is None (default), the step\nwill be 1 day.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1411" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1708" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", - "signature": "st.column_config.DatetimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None, timezone=None)", + "signature": "st.column_config.DatetimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None, timezone=None)", "examples": "
\n
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a datetime column in st.dataframe or st.data_editor.

\n

This is the default column type for datetime values. This command needs to be\nused in the column_config parameter of st.dataframe or\nst.data_editor. When used with st.data_editor, editing will be enabled\nwith a datetime picker widget.

\n", "args": [ @@ -146211,7 +156849,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146219,7 +156857,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146227,7 +156865,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146235,23 +156873,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "datetime.datetime or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146259,7 +156905,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for available\nformats. If None (default), uses YYYY-MM-DD HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", + "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nYYYY-MM-DD HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -146267,7 +156913,7 @@ "type_name": "datetime.datetime or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum datetime that can be entered.\nIf None (default), there will be no minimum.

\n", + "description": "

The minimum datetime that can be entered. If this is None\n(default), there will be no minimum.

\n", "default": null }, { @@ -146275,7 +156921,7 @@ "type_name": "datetime.datetime or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum datetime that can be entered.\nIf None (default), there will be no maximum.

\n", + "description": "

The maximum datetime that can be entered. If this is None\n(default), there will be no maximum.

\n", "default": null }, { @@ -146283,7 +156929,7 @@ "type_name": "int, float, datetime.timedelta, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The stepping interval in seconds. If None (default), the step will be 1 second.

\n", + "description": "

The stepping interval in seconds. If this is None (default), the\nstep will be 1 second.

\n", "default": null }, { @@ -146291,16 +156937,16 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The timezone of this column. If None (default),\nthe timezone is inferred from the underlying data.

\n", + "description": "

The timezone of this column. If this is None (default), the\ntimezone is inferred from the underlying data.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1170" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1417" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", - "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None)", + "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None, pinned=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", "args": [ @@ -146309,7 +156955,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146317,7 +156963,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146325,16 +156971,24 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1034" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1247" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", - "signature": "st.column_config.LineChartColumn(label=None, *, width=None, help=None, y_min=None, y_max=None)", + "signature": "st.column_config.LineChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a line chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ @@ -146343,7 +156997,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146351,7 +157005,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146359,7 +157013,15 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null }, { @@ -146367,7 +157029,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value on the y-axis for all cells in the column.\nIf None (default), every cell will use the minimum of its data.

\n", + "description": "

The minimum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the minimum of its data.

\n", "default": null }, { @@ -146375,16 +157037,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum value on the y-axis for all cells in the column. If None (default),\nevery cell will use the maximum of its data.

\n", + "description": "

The maximum value on the y-axis for all cells in the column. If this is\nNone (default), every cell will use the maximum of its data.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L872" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1057" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", - "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None, display_text=None)", + "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, max_chars=None, validate=None, display_text=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate=r"^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text=r"https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a link column in st.dataframe or st.data_editor.

\n

The cell values need to be string and will be shown as clickable links.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor. When used with st.data_editor, editing will be enabled\nwith a text input widget.

\n", "args": [ @@ -146393,7 +157055,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146401,7 +157063,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146409,7 +157071,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146417,23 +157079,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146441,7 +157111,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of characters that can be entered. If None (default),\nthere will be no maximum.

\n", + "description": "

The maximum number of characters that can be entered. If this is\nNone (default), there will be no maximum.

\n", "default": null }, { @@ -146449,7 +157119,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A regular expression (JS flavor, e.g. "^https://.+$") that edited values are validated against.\nIf the input is invalid, it will not be submitted.

\n", + "description": "

A JS-flavored regular expression (e.g. "^https://.+$") that edited\nvalues are validated against. If the user input is invalid, it will not\nbe submitted.

\n", "default": null }, { @@ -146457,16 +157127,16 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The text that is displayed in the cell. Can be one of:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A regular expression (JS flavor, detected by usage of parentheses)\nto extract a part of the URL via a capture group, e.g. "https://(.*?)\\.example\\.com"\nto extract the display text "foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.\nText formatting from column_config always takes precedence over\ntext formatting from pandas.Styler.

\n", + "description": "

The text that is displayed in the cell. This can be one of the\nfollowing:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A JS-flavored regular expression (detected by usage of parentheses)\nto extract a part of the URL via a capture group. For example, use\n"https://(.*?)\\.example\\.com" to extract the display text\n"foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.\nText formatting from column_config always takes precedence over\ntext formatting from pandas.Styler.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L478" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L578" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", - "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None)", + "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None, pinned=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", "args": [ @@ -146475,7 +157145,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146483,7 +157153,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146491,16 +157161,24 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1105" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1335" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", - "signature": "st.column_config.NumberColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "signature": "st.column_config.NumberColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a number column in st.dataframe or st.data_editor.

\n

This is the default column type for integer and float values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a numeric input widget.

\n", "args": [ @@ -146509,7 +157187,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146517,7 +157195,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146525,7 +157203,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146533,23 +157211,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146557,7 +157243,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. Valid formatters: %d %e %f %g %i %u.\nYou can also add prefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", + "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. The following formatters are\nvalid: %d, %e, %f, %g, %i, %u. You can also add\nprefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix. If\nthis is None (default), the numbers are not formatted.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -146565,7 +157251,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value that can be entered.\nIf None (default), there will be no minimum.

\n", + "description": "

The minimum value that can be entered. If this is None (default),\nthere will be no minimum.

\n", "default": null }, { @@ -146573,7 +157259,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum value that can be entered.\nIf None (default), there will be no maximum.

\n", + "description": "

The maximum value that can be entered. If this is None (default),\nthere will be no maximum.

\n", "default": null }, { @@ -146581,16 +157267,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The stepping interval. Specifies the precision of numbers that can be entered.\nIf None (default), uses 1 for integers and unrestricted precision for floats.

\n", + "description": "

The precision of numbers that can be entered. If this None\n(default), integer columns will have a step of 1 and float columns will\nhave unrestricted precision. In this case, some floats may display like\nintegers. Setting step for float columns will ensure a consistent\nnumber of digits after the decimal even without setting format.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L319" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", - "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, format=None, min_value=None, max_value=None)", + "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, pinned=None, format=None, min_value=None, max_value=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a progress column in st.dataframe or st.data_editor.

\n

Cells need to contain a number. Progress columns are not editable at the moment.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n", "args": [ @@ -146599,7 +157285,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146607,7 +157293,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146615,7 +157301,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146623,7 +157309,15 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A printf-style format string controlling how numbers are displayed.\nValid formatters: %d %e %f %g %i %u. You can also add prefixes and suffixes,\ne.g. "$ %.2f" to show a dollar prefix.

\n", + "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. The following formatters are\nvalid: %d, %e, %f, %g, %i, %u. You can also add\nprefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix. If\nthis is None (default), the numbers are not formatted.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null }, { @@ -146631,7 +157325,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value of the progress bar.\nIf None (default), will be 0.

\n", + "description": "

The minimum value of the progress bar. If this is None (default),\nthe minimum will be 0.

\n", "default": null }, { @@ -146639,16 +157333,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum value of the progress bar. If None (default), will be 100 for\ninteger values and 1 for float values.

\n", + "description": "

The maximum value of the progress bar. If this is None (default),\nthe maximum will be 100 for integer values and 1.0 for float values.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1527" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1849" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", - "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, options=None)", + "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, options=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a selectbox column in st.dataframe or st.data_editor.

\n

This is the default column type for Pandas categorical values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a selectbox widget.

\n", "args": [ @@ -146657,7 +157351,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146665,7 +157359,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146673,7 +157367,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146681,23 +157375,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "str, int, float, bool, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146705,16 +157407,16 @@ "type_name": "Iterable of str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The options that can be selected during editing. If None (default), this will be\ninferred from the underlying dataframe column if its dtype is "category"\n(see Pandas docs on categorical data).

\n", + "description": "

The options that can be selected during editing. If this is None\n(default), the options will be inferred from the underlying dataframe\ncolumn if its dtype is "category". For more information, see Pandas docs).

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L693" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L840" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", - "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, max_chars=None, validate=None)", + "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, max_chars=None, validate=None)", "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate=r"^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a text column in st.dataframe or st.data_editor.

\n

This is the default column type for string values. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor. When used with\nst.data_editor, editing will be enabled with a text input widget.

\n", "args": [ @@ -146723,7 +157425,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146731,7 +157433,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146739,7 +157441,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146747,23 +157449,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146771,7 +157481,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of characters that can be entered. If None (default),\nthere will be no maximum.

\n", + "description": "

The maximum number of characters that can be entered. If this is\nNone (default), there will be no maximum.

\n", "default": null }, { @@ -146779,16 +157489,16 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A regular expression (JS flavor, e.g. "^[a-z]+$") that edited values are validated against.\nIf the input is invalid, it will not be submitted.

\n", + "description": "

A JS-flavored regular expression (e.g. "^[a-z]+$") that edited\nvalues are validated against. If the user input is invalid, it will not\nbe submitted.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L460" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", - "signature": "st.column_config.TimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, default=None, format=None, min_value=None, max_value=None, step=None)", + "signature": "st.column_config.TimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", "examples": "
\n
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", "description": "

Configure a time column in st.dataframe or st.data_editor.

\n

This is the default column type for time values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When\nused with st.data_editor, editing will be enabled with a time picker widget.

\n", "args": [ @@ -146797,7 +157507,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The label shown at the top of the column. If None (default),\nthe column name is used.

\n", + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", "default": null }, { @@ -146805,7 +157515,7 @@ "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. Can be one of "small", "medium", or "large".\nIf None (default), the column will be sized to fit the cell contents.

\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", "default": null }, { @@ -146813,7 +157523,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column label.

\n", + "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", "default": null }, { @@ -146821,23 +157531,31 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. Defaults to False.

\n", - "default": "False" + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null }, { "name": "required", "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether edited cells in the column need to have a value. If True, an edited cell\ncan only be submitted if it has a value other than None. Defaults to False.

\n", - "default": "False" + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null }, { "name": "default", "type_name": "datetime.time or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the default value in this column when a new row is added by the user.

\n", + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", "default": "value" }, { @@ -146845,7 +157563,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for available\nformats. If None (default), uses HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", + "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nHH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", "default": null }, { @@ -146853,7 +157571,7 @@ "type_name": "datetime.time or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The minimum time that can be entered.\nIf None (default), there will be no minimum.

\n", + "description": "

The minimum time that can be entered. If this is None (default),\nthere will be no minimum.

\n", "default": null }, { @@ -146861,7 +157579,7 @@ "type_name": "datetime.time or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum time that can be entered.\nIf None (default), there will be no maximum.

\n", + "description": "

The maximum time that can be entered. If this is None (default),\nthere will be no maximum.

\n", "default": null }, { @@ -146869,12 +157587,12 @@ "type_name": "int, float, datetime.timedelta, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The stepping interval in seconds. If None (default), the step will be 1 second.

\n", + "description": "

The stepping interval in seconds. If this is None (default), the\nstep will be 1 second.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/column_types.py#L1294" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1566" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -146891,10 +157609,10 @@ }, { "name": "path", - "type_name": "str or None", + "type_name": "str, Path, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The path to serve the component's frontend files from. If path is\nNone (default), Streamlit will serve the component from the\nlocation in url. Either path or url must be specified, but\nnot both.

\n", + "description": "

The path to serve the component's frontend files from. The path should\nbe absolute. If path is None (default), Streamlit will serve\nthe component from the location in url. Either path or url\nmust be specified, but not both.

\n", "default": null }, { @@ -146914,7 +157632,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/components/v1/component_registry.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/components/v1/component_registry.py#L51" }, "streamlit.components.v1.html": { "name": "html", @@ -146956,7 +157674,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -146998,7 +157716,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -147024,7 +157742,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L681" }, "StatusContainer.update": { "name": "update", @@ -147057,7 +157775,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -147086,7 +157804,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1026" }, { "name": "run", @@ -147110,7 +157828,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L370" }, { "name": "switch_page", @@ -147134,7 +157852,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L393" } ], "properties": [ @@ -147151,7 +157869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L447" }, { "name": "button_group", @@ -147166,7 +157884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L462" }, { "name": "caption", @@ -147181,7 +157899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L476" }, { "name": "chat_input", @@ -147196,7 +157914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L490" }, { "name": "chat_message", @@ -147211,7 +157929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L504" }, { "name": "checkbox", @@ -147226,7 +157944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L518" }, { "name": "code", @@ -147241,7 +157959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L532" }, { "name": "color_picker", @@ -147256,7 +157974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L546" }, { "name": "columns", @@ -147271,7 +157989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L560" }, { "name": "dataframe", @@ -147286,7 +158004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L577" }, { "name": "date_input", @@ -147301,7 +158019,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L591" }, { "name": "divider", @@ -147316,7 +158034,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L605" }, { "name": "error", @@ -147331,7 +158049,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L619" }, { "name": "exception", @@ -147346,7 +158064,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L633" }, { "name": "expander", @@ -147361,7 +158079,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L647" }, { "name": "header", @@ -147376,7 +158094,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L661" }, { "name": "info", @@ -147391,7 +158109,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L675" }, { "name": "json", @@ -147406,7 +158124,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L689" }, { "name": "latex", @@ -147421,7 +158139,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L703" }, { "name": "main", @@ -147436,7 +158154,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L421" }, { "name": "markdown", @@ -147451,7 +158169,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L717" }, { "name": "metric", @@ -147466,7 +158184,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L731" }, { "name": "multiselect", @@ -147481,7 +158199,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L745" }, { "name": "number_input", @@ -147496,7 +158214,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L759" }, { "name": "radio", @@ -147511,7 +158229,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L773" }, { "name": "select_slider", @@ -147526,7 +158244,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L787" }, { "name": "selectbox", @@ -147541,7 +158259,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L801" }, { "name": "sidebar", @@ -147556,7 +158274,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L434" }, { "name": "slider", @@ -147571,7 +158289,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L815" }, { "name": "status", @@ -147586,7 +158304,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L857" }, { "name": "subheader", @@ -147601,7 +158319,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L829" }, { "name": "success", @@ -147616,7 +158334,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L843" }, { "name": "table", @@ -147631,7 +158349,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L871" }, { "name": "tabs", @@ -147646,7 +158364,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L885" }, { "name": "text", @@ -147661,7 +158379,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L905" }, { "name": "text_area", @@ -147676,7 +158394,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L919" }, { "name": "text_input", @@ -147691,7 +158409,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L933" }, { "name": "time_input", @@ -147706,7 +158424,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L947" }, { "name": "title", @@ -147721,7 +158439,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L961" }, { "name": "toast", @@ -147736,7 +158454,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L975" }, { "name": "toggle", @@ -147751,7 +158469,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L989" }, { "name": "warning", @@ -147766,10 +158484,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1003" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L96", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L96", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -147809,7 +158527,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L447" }, "AppTest.button_group": { "name": "button_group", @@ -147824,7 +158542,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L462" }, "AppTest.caption": { "name": "caption", @@ -147839,7 +158557,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L476" }, "AppTest.chat_input": { "name": "chat_input", @@ -147854,7 +158572,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L490" }, "AppTest.chat_message": { "name": "chat_message", @@ -147869,7 +158587,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L504" }, "AppTest.checkbox": { "name": "checkbox", @@ -147884,7 +158602,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L518" }, "AppTest.code": { "name": "code", @@ -147899,7 +158617,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L532" }, "AppTest.color_picker": { "name": "color_picker", @@ -147914,7 +158632,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L546" }, "AppTest.columns": { "name": "columns", @@ -147929,7 +158647,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L560" }, "AppTest.dataframe": { "name": "dataframe", @@ -147944,7 +158662,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L577" }, "AppTest.date_input": { "name": "date_input", @@ -147959,7 +158677,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L591" }, "AppTest.divider": { "name": "divider", @@ -147974,7 +158692,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L605" }, "AppTest.error": { "name": "error", @@ -147989,7 +158707,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L619" }, "AppTest.exception": { "name": "exception", @@ -148004,7 +158722,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L633" }, "AppTest.expander": { "name": "expander", @@ -148019,7 +158737,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L647" }, "AppTest.from_file": { "name": "from_file", @@ -148028,7 +158746,7 @@ "args": [ { "name": "script_path", - "type_name": "str", + "type_name": "str | Path", "is_optional": false, "is_kwarg_only": false, "description": "

Path to a script file. The path should be absolute or relative to\nthe file calling .from_file.

\n", @@ -148051,7 +158769,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -148099,7 +158817,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -148131,7 +158849,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -148155,7 +158873,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1026" }, "AppTest.header": { "name": "header", @@ -148170,7 +158888,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L661" }, "AppTest.info": { "name": "info", @@ -148185,7 +158903,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L675" }, "AppTest.json": { "name": "json", @@ -148200,7 +158918,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L689" }, "AppTest.latex": { "name": "latex", @@ -148215,7 +158933,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L703" }, "AppTest.main": { "name": "main", @@ -148230,7 +158948,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L421" }, "AppTest.markdown": { "name": "markdown", @@ -148245,7 +158963,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L717" }, "AppTest.metric": { "name": "metric", @@ -148260,7 +158978,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L731" }, "AppTest.multiselect": { "name": "multiselect", @@ -148275,7 +158993,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L745" }, "AppTest.number_input": { "name": "number_input", @@ -148290,7 +159008,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L759" }, "AppTest.radio": { "name": "radio", @@ -148305,7 +159023,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L773" }, "AppTest.run": { "name": "run", @@ -148329,7 +159047,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L368" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L370" }, "AppTest.select_slider": { "name": "select_slider", @@ -148344,7 +159062,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L787" }, "AppTest.selectbox": { "name": "selectbox", @@ -148359,7 +159077,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L801" }, "AppTest.sidebar": { "name": "sidebar", @@ -148374,7 +159092,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L434" }, "AppTest.slider": { "name": "slider", @@ -148389,7 +159107,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L815" }, "AppTest.status": { "name": "status", @@ -148404,7 +159122,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L857" }, "AppTest.subheader": { "name": "subheader", @@ -148419,7 +159137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L829" }, "AppTest.success": { "name": "success", @@ -148434,7 +159152,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L843" }, "AppTest.switch_page": { "name": "switch_page", @@ -148458,7 +159176,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L391" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L393" }, "AppTest.table": { "name": "table", @@ -148473,7 +159191,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L871" }, "AppTest.tabs": { "name": "tabs", @@ -148488,7 +159206,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L885" }, "AppTest.text": { "name": "text", @@ -148503,7 +159221,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L905" }, "AppTest.text_area": { "name": "text_area", @@ -148518,7 +159236,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L919" }, "AppTest.text_input": { "name": "text_input", @@ -148533,7 +159251,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L933" }, "AppTest.time_input": { "name": "time_input", @@ -148548,7 +159266,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L947" }, "AppTest.title": { "name": "title", @@ -148563,7 +159281,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L961" }, "AppTest.toast": { "name": "toast", @@ -148578,7 +159296,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L975" }, "AppTest.toggle": { "name": "toggle", @@ -148593,7 +159311,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L989" }, "AppTest.warning": { "name": "warning", @@ -148608,7 +159326,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1003" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -148621,7 +159339,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -148638,7 +159356,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -148646,7 +159364,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -148656,10 +159374,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -148684,7 +159402,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -148692,7 +159410,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L750" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L750" }, { "name": "set_value", @@ -148700,7 +159418,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -148708,7 +159426,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L765" } ], "properties": [ @@ -148718,7 +159436,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "indices", @@ -148726,7 +159444,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "value", @@ -148734,10 +159452,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L723" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -148762,7 +159480,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -148770,7 +159488,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -148780,10 +159498,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -148799,7 +159517,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -148816,7 +159534,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -148824,7 +159542,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -148832,7 +159550,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -148842,10 +159560,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -148861,7 +159579,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -148878,7 +159596,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -148886,7 +159604,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -148896,10 +159614,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -148924,7 +159642,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -148932,7 +159650,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -148942,10 +159660,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -148970,7 +159688,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -148980,10 +159698,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -149008,7 +159726,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -149016,7 +159734,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -149024,7 +159742,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -149032,7 +159750,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L853" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L853" } ], "properties": [ @@ -149042,7 +159760,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -149050,7 +159768,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L821" }, { "name": "value", @@ -149058,10 +159776,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L811" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L811" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L782", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L782", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -149077,7 +159795,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L926" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L926" }, { "name": "increment", @@ -149085,7 +159803,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L918" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L918" }, { "name": "run", @@ -149102,7 +159820,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149110,7 +159828,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L893" } ], "properties": [ @@ -149120,10 +159838,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L906" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L906" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L873", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L873", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -149148,7 +159866,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149156,7 +159874,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L977" } ], "properties": [ @@ -149166,7 +159884,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L971" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L971" }, { "name": "index", @@ -149174,7 +159892,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "value", @@ -149182,10 +159900,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L961" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L935", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L935", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -149210,7 +159928,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -149218,7 +159936,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1123" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1123" }, { "name": "set_value", @@ -149226,7 +159944,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1085" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1085" } ], "properties": [ @@ -149236,7 +159954,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "value", @@ -149244,10 +159962,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1106" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1106" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1067", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1067", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -149272,7 +159990,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -149280,7 +159998,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1044" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1044" }, { "name": "select_index", @@ -149288,7 +160006,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "set_value", @@ -149296,7 +160014,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1039" } ], "properties": [ @@ -149306,7 +160024,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1033" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1033" }, { "name": "index", @@ -149314,7 +160032,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1013" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1013" }, { "name": "value", @@ -149322,10 +160040,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1023" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1023" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L995", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L995", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -149350,7 +160068,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -149358,7 +160076,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "set_value", @@ -149366,7 +160084,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1147" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1147" } ], "properties": [ @@ -149376,10 +160094,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1128", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1128", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -149395,7 +160113,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1257" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1257" }, { "name": "run", @@ -149412,7 +160130,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149420,7 +160138,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1233" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1233" } ], "properties": [ @@ -149430,10 +160148,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1215", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1215", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -149449,7 +160167,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1310" }, { "name": "run", @@ -149466,7 +160184,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149474,7 +160192,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1286" } ], "properties": [ @@ -149484,10 +160202,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1299" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1299" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1268", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1268", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -149503,7 +160221,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1375" }, { "name": "increment", @@ -149511,7 +160229,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1368" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1368" }, { "name": "run", @@ -149528,7 +160246,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149536,7 +160254,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1340" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1340" } ], "properties": [ @@ -149546,10 +160264,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1324", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1324", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -149574,7 +160292,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149582,7 +160300,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1432" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1432" } ], "properties": [ @@ -149592,10 +160310,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1422" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L1399", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1399", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -149620,7 +160338,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -149628,7 +160346,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -149638,10 +160356,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -149659,7 +160377,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L86" }, "context.cookies": { "name": "cookies", @@ -149668,7 +160386,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L178" }, "context.headers": { "name": "headers", @@ -149677,7 +160395,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L136" }, "CachedFunc.clear": { "name": "clear", @@ -149703,7 +160421,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/caching/cache_utils.py#L328" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_utils.py#L347" }, "StreamlitPage": { "name": "StreamlitPage", @@ -149716,7 +160434,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L271" } ], "properties": [ @@ -149726,7 +160444,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L248" }, { "name": "title", @@ -149734,7 +160452,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L237" }, { "name": "url_path", @@ -149742,10 +160460,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L256" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L134", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L134", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -149778,7 +160496,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L248" }, "StreamlitPage.run": { "name": "run", @@ -149786,7 +160504,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L271" }, "StreamlitPage.title": { "name": "title", @@ -149794,7 +160512,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L237" }, "StreamlitPage.url_path": { "name": "url_path", @@ -149802,7 +160520,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L256" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -149822,11 +160540,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L86" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/user_info.py#L36", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L36", "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", "args": [ { @@ -149852,7 +160570,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L178" }, { "name": "headers", @@ -149861,10 +160579,10 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/runtime/context.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L125", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -149874,7 +160592,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L169", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L169", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -149894,7 +160612,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/plotly_chart.py#L81", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L81", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -149935,7 +160653,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/vega_charts.py#L100", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L100", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -149955,7 +160673,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -149974,7 +160692,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -150001,7 +160719,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -150020,7 +160738,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.40.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -150043,7 +160761,7 @@ "is_attribute_dict": true } }, - "1.41.0": { + "1.42.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -150099,12 +160817,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", - "signature": "st.altair_chart(altair_chart, *, use_container_width=False, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c, use_container_width=True)\n
\n
\n", + "signature": "st.altair_chart(altair_chart, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", + "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c)\n
\n
\n", "description": "

Display a chart using the Vega-Altair library.

\n

Vega-Altair is a declarative\nstatistical visualization library for Python, based on Vega and\nVega-Lite.

\n", "args": [ { @@ -150117,10 +160835,10 @@ }, { "name": "use_container_width", - "type_name": "bool", + "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the chart's native width with the width of\nthe parent container. This can be one of the following:

\n
    \n
  • None (default): Streamlit will use the parent container's\nwidth for all charts except those with known incompatibility\n(altair.Facet, altair.HConcatChart, and\naltair.RepeatChart).
  • \n
  • True: Streamlit sets the width of the chart to match the\nwidth of the parent container.
  • \n
  • False: Streamlit sets the width of the chart to fit its\ncontents according to the plotting library, up to the width of\nthe parent container.
  • \n
\n", "default": null }, { @@ -150164,7 +160882,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1489" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1501" }, "streamlit.area_chart": { "name": "area_chart", @@ -150254,7 +160972,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L758" }, "streamlit.audio": { "name": "audio", @@ -150320,7 +161038,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/media.py#L72" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", @@ -150346,10 +161064,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -150397,11 +161115,11 @@ { "type_name": "None or UploadedFile", "is_generator": false, - "description": "

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected. The MIME type for the audio data is audio/wav.

\n", + "description": "

The UploadedFile class is a subclass of BytesIO, and\ntherefore is "file-like". This means you can pass an instance of it\nanywhere a file is expected. The MIME type for the audio data is\naudio/wav.

\n
\n

Note

\n

The resulting UploadedFile is subject to the size\nlimitation configured in server.maxUploadSize. If you\nexpect large sound files, update the configuration option\nappropriately.

\n
\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/audio_input.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/audio_input.py#L90" }, "streamlit.balloons": { "name": "balloons", @@ -150410,7 +161128,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -150508,12 +161226,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L989" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L999" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", - "signature": "st.bokeh_chart(figure, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p, use_container_width=True)\n
\n
\n", + "signature": "st.bokeh_chart(figure, use_container_width=True)", + "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p)\n
\n
\n", "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand.

\n
\n", "args": [ { @@ -150529,12 +161247,12 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is True (default),\nStreamlit sets the width of the figure to match the width of the parent\ncontainer. If use_container_width is False, Streamlit sets the\nwidth of the chart to fit its contents according to the plotting library,\nup to the width of the parent container.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/bokeh_chart.py#L37" }, "streamlit.button": { "name": "button", @@ -150560,10 +161278,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "description": "

A tooltip that gets displayed when the button is hovered over. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -150631,7 +161349,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L87" }, "streamlit.cache": { "name": "cache", @@ -150705,7 +161423,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -150775,7 +161493,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -150845,7 +161563,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -150871,10 +161589,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -150926,7 +161644,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", @@ -150952,15 +161670,15 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the caption.

\n", + "description": "

A tooltip that gets displayed next to the caption. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L175" }, "streamlit.chat_input": { "name": "chat_input", @@ -151033,7 +161751,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/chat.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/chat.py#L240" }, "streamlit.chat_message": { "name": "chat_message", @@ -151066,7 +161784,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/chat.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/chat.py#L126" }, "streamlit.checkbox": { "name": "checkbox", @@ -151100,10 +161818,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -151155,11 +161873,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", - "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False)", + "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False, height=None)", "examples": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\nimport streamlit as st\ncode = '''Is it a crown or boat?\n                        ii\n                      iiiiii\nWWw                 .iiiiiiii.                ...:\n WWWWWWw          .iiiiiiiiiiii.         ........\n  WWWWWWWWWWw    iiiiiiiiiiiiiiii    ...........\n   WWWWWWWWWWWWWWwiiiiiiiiiiiiiiiii............\n    WWWWWWWWWWWWWWWWWWwiiiiiiiiiiiiii.........\n     WWWWWWWWWWWWWWWWWWWWWWwiiiiiiiiii.......\n      WWWWWWWWWWWWWWWWWWWWWWWWWWwiiiiiii....\n       WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwiiii.\n          -MMMWWWWWWWWWWWWWWWWWWWWWWMMM-\n'''\nst.code(code, language=None)\n
\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ @@ -151194,10 +161912,18 @@ "is_kwarg_only": true, "description": "

An optional boolean indicating whether to wrap lines. This defaults\nto False.

\n", "default": "s" + }, + { + "name": "height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Desired height of the code block expressed in pixels. If height\nis None (default), Streamlit sets the element's height to fit\nits content. Vertical scrolling within the element is enabled when\nthe height does not accomodate all lines.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -151231,10 +161957,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -151286,7 +162012,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -151335,7 +162061,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", @@ -151392,7 +162118,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -151426,7 +162152,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L42" }, "streamlit.data_editor": { "name": "data_editor", @@ -151547,7 +162273,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/data_editor.py#L579" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/data_editor.py#L580" }, "streamlit.dataframe": { "name": "dataframe", @@ -151644,7 +162370,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L256" }, "streamlit.date_input": { "name": "date_input", @@ -151694,10 +162420,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -151757,7 +162483,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/time_widgets.py#L570" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/time_widgets.py#L634" }, "streamlit.dialog": { "name": "dialog", @@ -151783,7 +162509,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -151792,7 +162518,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L276" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L290" }, "streamlit.download_button": { "name": "download_button", @@ -151842,10 +162568,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "description": "

A tooltip that gets displayed when the button is hovered over. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -151913,7 +162639,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L253" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L258" }, "streamlit.echo": { "name": "echo", @@ -151931,7 +162657,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/echo.py#L30" }, "streamlit.empty": { "name": "empty", @@ -151940,7 +162666,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -151953,7 +162679,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The error text to display.

\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -151966,7 +162692,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", @@ -151984,7 +162710,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/exception.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/exception.py#L42" }, "streamlit.expander": { "name": "expander", @@ -152018,7 +162744,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L489" }, "streamlit.experimental_audio_input": { "name": "experimental_audio_input", @@ -152026,7 +162752,7 @@ "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/audio_input.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/audio_input.py#L204" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -152034,7 +162760,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -152042,7 +162768,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/fragment.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/fragment.py#L472" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -152058,7 +162784,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -152076,7 +162802,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -152141,7 +162867,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -152183,10 +162909,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -152238,7 +162964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/file_uploader.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/file_uploader.py#L220" }, "streamlit.form": { "name": "form", @@ -152280,7 +163006,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -152292,7 +163018,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A short label explaining to the user what this button is for.\nDefaults to "Submit".

\n", + "description": "

A short label explaining to the user what this button is for. This\ndefaults to "Submit". The label can optionally contain\nGitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": "s" }, { @@ -152300,8 +163026,8 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A tooltip that gets displayed when the button is hovered over.\nDefaults to None.

\n", - "default": "None" + "description": "

A tooltip that gets displayed when the button is hovered over. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", + "default": null }, { "name": "on_click", @@ -152368,7 +163094,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -152394,7 +163120,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/fragment.py#L307" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/fragment.py#L307" }, "streamlit.get_option": { "name": "get_option", @@ -152412,7 +163138,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/config.py#L141" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/config.py#L163" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -152438,7 +163164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/graphviz_chart.py#L41" }, "streamlit.header": { "name": "header", @@ -152464,10 +163190,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the header.

\n", + "description": "

A tooltip that gets displayed next to the header. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -152480,7 +163206,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", @@ -152498,7 +163224,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -152516,7 +163242,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/html.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/html.py#L31" }, "streamlit.image": { "name": "image", @@ -152537,7 +163263,7 @@ "type_name": "str or list of str", "is_optional": false, "is_kwarg_only": false, - "description": "

Image caption(s). If this is None (default), no caption is\ndisplayed. If image is a list of multiple images,\ncaption must be a list of captions (one caption for each\nimage) or None.

\n", + "description": "

Image caption(s). If this is None (default), no caption is\ndisplayed. If image is a list of multiple images, caption\nmust be a list of captions (one caption for each image) or\nNone.

\n

Captions can optionally contain GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -152594,7 +163320,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -152607,7 +163333,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The info text to display.

\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -152620,7 +163346,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L116" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L130" }, "streamlit.json": { "name": "json", @@ -152646,7 +163372,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", @@ -152664,15 +163390,15 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the LaTeX expression.

\n", + "description": "

A tooltip that gets displayed next to the LaTeX expression. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L238" }, "streamlit.line_chart": { "name": "line_chart", @@ -152754,7 +163480,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L552" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L562" }, "streamlit.link_button": { "name": "link_button", @@ -152780,10 +163506,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when the button is\nhovered over.

\n", + "description": "

A tooltip that gets displayed when the button is hovered over. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -152820,7 +163546,25 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L461" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L470" + }, + "streamlit.login": { + "name": "login", + "signature": "st.login(provider=None)", + "examples": "
\n

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.experimental_user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!)\n
\n
\n", + "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.experimental_user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.experimental_user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command.
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.
  • \n
  • For security reasons, authentication is not supported for embedded\napps.
  • \n
\n
\n", + "args": [ + { + "name": "provider", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The name of your provider configuration to use for login.

\n

If provider is None (default), Streamlit will use all settings\nin the [auth] dictionary within your app's secrets.toml file.\nOtherwise, use an [auth.{provider}] dictionary for the named\nprovider, as shown in the examples that follow. When you pass a string\nto provider, Streamlit will use redirect_uri and\ncookie_secret, while ignoring any other values in the [auth]\ndictionary.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L49" }, "streamlit.logo": { "name": "logo", @@ -152862,7 +163606,16 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/logo.py#L33" + }, + "streamlit.logout": { + "name": "logout", + "signature": "st.logout()", + "example": "
\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n
\n", + "description": "

Logout the current user.

\n

This command removes the user's information from st.experimental_user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.experimental_user will not be cleared in any other session.\nst.experimental_user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.experimental_user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L291" }, "streamlit.map": { "name": "map", @@ -152944,7 +163697,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/map.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/map.py#L76" }, "streamlit.markdown": { "name": "markdown", @@ -152970,15 +163723,15 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the Markdown.

\n", + "description": "

A tooltip that gets displayed next to the Markdown. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -153020,10 +163773,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the metric label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the metric label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153044,7 +163797,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -153094,10 +163847,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153165,7 +163918,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/multiselect.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/multiselect.py#L105" }, "streamlit.navigation": { "name": "navigation", @@ -153206,7 +163959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/navigation.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/navigation.py#L56" }, "streamlit.number_input": { "name": "number_input", @@ -153272,10 +164025,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153335,7 +164088,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", @@ -153369,10 +164122,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when the link is\nhovered over.

\n", + "description": "

A tooltip that gets displayed when the link is hovered over. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153393,7 +164146,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button.py#L574" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L587" }, "streamlit.pills": { "name": "pills", @@ -153414,8 +164167,8 @@ "type_name": "Iterable of V", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", - "default": null + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default and can\noptionally contain GitHub-flavored Markdown, including the Markdown\ndirectives described in the body parameter of st.markdown.

\n", + "default": "and" }, { "name": "selection_mode", @@ -153438,7 +164191,7 @@ "type_name": "function", "is_optional": false, "is_kwarg_only": true, - "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command. The output can optionally contain GitHub-flavored\nMarkdown, including the Markdown directives described in the\nbody parameter of st.markdown.

\n", "default": null }, { @@ -153451,10 +164204,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153506,12 +164259,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L423" }, "streamlit.plotly_chart": { "name": "plotly_chart", - "signature": "st.plotly_chart(figure_or_data, use_container_width=False, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", - "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig, use_container_width=True)\n
\n
\n", + "signature": "st.plotly_chart(figure_or_data, use_container_width=True, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", + "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n
\n", "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly to use this command. Your app's\nperformance may be enhanced by installing orjson as well.

\n
\n", "args": [ { @@ -153527,7 +164280,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is True (default),\nStreamlit sets the width of the figure to match the width of the parent\ncontainer. If use_container_width is False, Streamlit sets the\nwidth of the chart to fit its contents according to the plotting library,\nup to the width of the parent container.

\n", "default": null }, { @@ -153579,7 +164332,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L306" }, "streamlit.popover": { "name": "popover", @@ -153597,10 +164350,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when the popover button is\nhovered over.

\n", + "description": "

A tooltip that gets displayed when the popover button is hovered\nover. If this is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153629,7 +164382,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L604" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L604" }, "streamlit.progress": { "name": "progress", @@ -153655,11 +164408,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", - "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=False, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", + "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=True, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ @@ -153676,7 +164429,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is True (default),\nStreamlit sets the width of the figure to match the width of the parent\ncontainer. If use_container_width is False, Streamlit sets the\nwidth of the chart to fit its contents according to the plotting library,\nup to the width of the parent container.

\n", "default": null }, { @@ -153728,7 +164481,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", @@ -153770,7 +164523,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -153820,10 +164573,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -153891,7 +164644,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/radio.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/radio.py#L122" }, "streamlit.rerun": { "name": "rerun", @@ -153908,7 +164661,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L102" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -153998,7 +164751,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1255" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1265" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -154019,8 +164772,8 @@ "type_name": "Iterable of V", "is_optional": false, "is_kwarg_only": false, - "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default.

\n", - "default": null + "description": "

Labels for the select options in an Iterable. This can be a\nlist, set, or anything supported by st.dataframe. If\noptions is dataframe-like, the first column will be used. Each\nlabel will be cast to str internally by default and can\noptionally contain GitHub-flavored Markdown, including the Markdown\ndirectives described in the body parameter of st.markdown.

\n", + "default": "and" }, { "name": "selection_mode", @@ -154043,7 +164796,7 @@ "type_name": "function", "is_optional": false, "is_kwarg_only": true, - "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command.

\n", + "description": "

Function to modify the display of the options. It receives\nthe raw option as an argument and should output the label to be\nshown for that option. This has no impact on the return value of\nthe command. The output can optionally contain GitHub-flavored\nMarkdown, including the Markdown directives described in the\nbody parameter of st.markdown.

\n", "default": null }, { @@ -154056,10 +164809,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154111,7 +164864,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/button_group.py#L626" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L634" }, "streamlit.select_slider": { "name": "select_slider", @@ -154161,10 +164914,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154216,7 +164969,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/select_slider.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/select_slider.py#L159" }, "streamlit.selectbox": { "name": "selectbox", @@ -154266,10 +165019,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154329,7 +165082,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/selectbox.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/selectbox.py#L113" }, "streamlit.set_option": { "name": "set_option", @@ -154355,7 +165108,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/config.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/config.py#L115" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -154405,7 +165158,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/page_config.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/page_config.py#L132" }, "streamlit.slider": { "name": "slider", @@ -154471,10 +165224,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154526,7 +165279,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/slider.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/slider.py#L334" }, "streamlit.snow": { "name": "snow", @@ -154535,25 +165288,33 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", - "signature": "st.spinner(text=\"In progress...\")", - "example": "
\n
\nimport time\nimport streamlit as st\n\nwith st.spinner('Wait for it...'):\n    time.sleep(5)\nst.success("Done!")\n
\n
\n", - "description": "

Temporarily displays a message while executing a block of code.

\n", + "signature": "st.spinner(text=\"In progress...\", *, show_time=False)", + "example": "
\n
\nimport streamlit as st\nimport time\n\nwith st.spinner("Wait for it...", show_time=True):\n    time.sleep(5)\nst.success("Done!")\nst.button("Rerun")\n
\n
\n", + "description": "

Display a loading spinner while executing a block of code.

\n", "args": [ { "name": "text", "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A message to display while executing that block

\n", + "description": "

The text to display next to the spinner. This defaults to\n"In progress...".

\n

The text can optionally contain GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional, supported\nMarkdown directives.

\n", + "default": "s" + }, + { + "name": "show_time", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show the elapsed time next to the spinner text. If this is\nFalse (default), no time is displayed. If this is True,\nelapsed time is displayed with a precision of 0.1 seconds. The time\nformat is not configurable.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/spinner.py#L25" }, "streamlit.status": { "name": "status", @@ -154594,7 +165355,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L740" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L744" }, "streamlit.stop": { "name": "stop", @@ -154603,7 +165364,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -154629,10 +165390,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the subheader.

\n", + "description": "

A tooltip that gets displayed next to the subheader. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154645,7 +165406,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L110" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L115" }, "streamlit.success": { "name": "success", @@ -154658,7 +165419,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The success text to display.

\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -154671,7 +165432,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L160" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L181" }, "streamlit.switch_page": { "name": "switch_page", @@ -154689,25 +165450,25 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/commands/execution_control.py#L154" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L154" }, "streamlit.table": { "name": "table", "signature": "st.table(data=None)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n
\n", - "description": "

Display a static table.

\n

This differs from st.dataframe in that the table in this case is\nstatic: its entire contents are laid out directly on the page.

\n", + "examples": "
\n

Example 1: Display a simple dataframe as a static table

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n

Example 2: Display a table of Markdown strings

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        "Command": ["**st.table**", "*st.dataframe*"],\n        "Type": ["`static`", "`interactive`"],\n        "Docs": [\n            "[:rainbow[docs]](https://docs.streamlit.io/develop/api-reference/data/st.dataframe)",\n            "[:book:](https://docs.streamlit.io/develop/api-reference/data/st.table)",\n        ],\n    }\n)\nst.table(df)\n
\n
\n", + "description": "

Display a static table.

\n

While st.dataframe is geared towards large datasets and interactive\ndata exploration, st.table is useful for displaying small, styled\ntables without sorting or scrolling. For example, st.table may be\nthe preferred way to display a confusion matrix or leaderboard.\nAdditionally, st.table supports Markdown.

\n", "args": [ { "name": "data", "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, - "description": "

The table data.

\n", + "description": "

The table data.

\n

All cells including the index and column headers can optionally\ncontain GitHub-flavored Markdown. Syntax information can be found\nat: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L632" }, "streamlit.tabs": { "name": "tabs", @@ -154732,7 +165493,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/layouts.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L384" }, "streamlit.text": { "name": "text", @@ -154750,15 +165511,15 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the text.

\n", + "description": "

A tooltip that gets displayed next to the text. If this is None\n(default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -154808,10 +165569,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154871,7 +165632,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/text_widgets.py#L392" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/text_widgets.py#L396" }, "streamlit.text_input": { "name": "text_input", @@ -154921,10 +165682,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -154992,7 +165753,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -155026,10 +165787,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -155089,7 +165850,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/time_widgets.py#L346" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/time_widgets.py#L350" }, "streamlit.title": { "name": "title", @@ -155115,20 +165876,20 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed next to the title.

\n", + "description": "

A tooltip that gets displayed next to the title. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/heading.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L187" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -155149,7 +165910,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -155183,10 +165944,10 @@ }, { "name": "help", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tooltip that gets displayed next to the widget label.\nStreamlit only displays the tooltip when\nlabel_visibility="visible".

\n", + "description": "

A tooltip that gets displayed next to the widget label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, { @@ -155238,11 +165999,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/widgets/checkbox.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/checkbox.py#L170" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", - "signature": "st.vega_lite_chart(data=None, spec=None, *, use_container_width=False, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None, **kwargs)", + "signature": "st.vega_lite_chart(data=None, spec=None, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None, **kwargs)", "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n
\n", "description": "

Display a chart using the Vega-Lite library.

\n

Vega-Lite is a high-level\ngrammar for defining interactive graphics.

\n", "args": [ @@ -155264,10 +166025,10 @@ }, { "name": "use_container_width", - "type_name": "bool", + "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "description": "

Whether to override the chart's native width with the width of\nthe parent container. This can be one of the following:

\n
    \n
  • None (default): Streamlit will use the parent container's\nwidth for all charts except those with known incompatibility\n(altair.Facet, altair.HConcatChart, and\naltair.RepeatChart).
  • \n
  • True: Streamlit sets the width of the chart to match the\nwidth of the parent container.
  • \n
  • False: Streamlit sets the width of the chart to fit its\ncontents according to the plotting library, up to the width of\nthe parent container.
  • \n
\n", "default": null }, { @@ -155319,7 +166080,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L1643" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1663" }, "streamlit.video": { "name": "video", @@ -155393,7 +166154,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/media.py#L212" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/media.py#L212" }, "streamlit.warning": { "name": "warning", @@ -155406,7 +166167,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The warning text to display.

\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -155419,20 +166180,20 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/alert.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L80" }, "streamlit.write": { "name": "write", "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", - "example": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n
\n", - "description": "

Write arguments to the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit commands,\nwrite() has some unique properties:

\n
    \n
  1. You can pass in multiple arguments, all of which will be written.
  2. \n
  3. Its behavior depends on the input types as follows.
  4. \n
  5. It returns None, so its "slot" in the App cannot be reused.
  6. \n
\n", + "examples": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n
\n", + "description": "

Displays arguments in the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit\ncommands, st.write() has some unique properties:

\n
    \n
  • You can pass in multiple arguments, all of which will be displayed.
  • \n
  • Its behavior depends on the input type(s).
  • \n
\n", "args": [ { "name": "*args", "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

One or many objects to print to the App.

\n

Arguments are handled as follows:

\n
    \n
  • \n
    write(string) : Prints the formatted Markdown string, with
    \n
    support for LaTeX expression, emoji shortcodes, and colored text.\nSee docs for st.markdown for more.
    \n
    \n
  • \n
  • write(dataframe) : Displays any dataframe-like object in an interactive table.
  • \n
  • write(dict) : Displays dict-like in an interactive viewer.
  • \n
  • write(list) : Displays list-like in an interactive viewer.
  • \n
  • write(error) : Prints an exception specially.
  • \n
  • write(func) : Displays information about a function.
  • \n
  • write(module) : Displays information about a module.
  • \n
  • write(class) : Displays information about a class.
  • \n
  • write(DeltaGenerator) : Displays information about a DeltaGenerator.
  • \n
  • write(mpl_fig) : Displays a Matplotlib figure.
  • \n
  • write(generator) : Streams the output of a generator.
  • \n
  • write(openai.Stream) : Streams the output of an OpenAI stream.
  • \n
  • write(altair) : Displays an Altair chart.
  • \n
  • write(PIL.Image) : Displays an image.
  • \n
  • write(keras) : Displays a Keras model.
  • \n
  • write(graphviz) : Displays a Graphviz graph.
  • \n
  • write(plotly_fig) : Displays a Plotly figure.
  • \n
  • write(bokeh_fig) : Displays a Bokeh figure.
  • \n
  • write(sympy_expr) : Prints SymPy expression using LaTeX.
  • \n
  • write(htmlable) : Prints _repr_html_() for the object if available.
  • \n
  • write(db_cursor) : Displays DB API 2.0 cursor results in a table.
  • \n
  • write(obj) : Prints str(obj) if otherwise unknown.
  • \n
\n", + "description": "

One or many objects to display in the app.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Each type of argument is handled as follows:
TypeHandling
strUses st.markdown().
dataframe-like, dict, or listUses st.dataframe().
ExceptionUses st.exception().
function, module, or classUses st.help().
DeltaGeneratorUses st.help().
Altair chartUses st.altair_chart().
Bokeh figureUses st.bokeh_chart().
Graphviz graphUses st.graphviz_chart().
Keras modelConverts model and uses st.graphviz_chart().
Matplotlib figureUses st.pyplot().
Plotly figureUses st.plotly_chart().
PIL.ImageUses st.image().
generator or stream (like openai.Stream)Uses st.write_stream().
SymPy expressionUses st.latex().
An object with ._repr_html()Uses st.html().
Database cursorDisplays DB API 2.0 cursor results in a table.
AnyDisplays str(arg) as inline code.
\n", "default": null }, { @@ -155456,8 +166217,15 @@ } } ], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/write.py#L253" + "returns": [ + { + "type_name": "None", + "is_generator": false, + "description": "", + "return_name": null + } + ], + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/write.py#L252" }, "streamlit.write_stream": { "name": "write_stream", @@ -155482,7 +166250,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/write.py#L67" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/write.py#L66" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -155490,7 +166258,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -155498,7 +166266,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -155513,7 +166281,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L134" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -155531,7 +166299,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L176" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -155555,7 +166323,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L111" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -155570,7 +166338,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L146" }, "streamlit.query_params.update": { "name": "update", @@ -155595,7 +166363,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/state/query_params_proxy.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L89" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -155616,11 +166384,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -155644,11 +166412,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -155671,7 +166439,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L354" }, { "name": "query", @@ -155744,7 +166512,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L224" }, { "name": "reset", @@ -155760,7 +166528,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -155777,7 +166545,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L383" }, { "name": "engine", @@ -155792,7 +166560,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L370" }, { "name": "session", @@ -155808,10 +166576,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L396" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -155836,7 +166604,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L456" }, { "name": "query", @@ -155885,7 +166653,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L278" }, { "name": "reset", @@ -155901,7 +166669,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -155917,7 +166685,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L528" }, { "name": "write_pandas", @@ -155982,7 +166750,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L374" } ], "properties": [ @@ -156000,11 +166768,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L489" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L42", - "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments (with or\nwithout secrets.toml). For example, if your Snowflake account supports\nSSO, you can set up a quick local connection for development using browser-based SSO.

\n
\nimport streamlit as st\nconn = st.connection(\n    "snowflake", account="xxx-xxx", user="xxx", authenticator="externalbrowser"\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L45", + "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], "returns": [] @@ -156045,7 +166813,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L95" }, { "name": "reset", @@ -156061,7 +166829,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -156070,7 +166838,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L188" } ], "properties": [ @@ -156081,10 +166849,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L47", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -156102,7 +166870,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L354" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -156117,7 +166885,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L383" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -156132,7 +166900,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L370" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -156205,7 +166973,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L224" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -156221,7 +166989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -156237,7 +167005,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L396" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -156270,7 +167038,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L95" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -156286,7 +167054,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -156295,7 +167063,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L188" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -156304,7 +167072,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L165" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -156320,7 +167088,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L456" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -156369,7 +167137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L278" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -156385,7 +167153,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L489" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -156401,7 +167169,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -156417,7 +167185,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L528" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -156482,7 +167250,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/snowflake_connection.py#L381" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L374" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -156498,7 +167266,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/connections/base_connection.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -156527,7 +167295,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156556,7 +167324,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1152" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1188" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -156585,7 +167353,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156614,7 +167382,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L991" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -156643,7 +167411,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156680,7 +167448,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L735" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L755" }, "streamlit.column_config.Column": { "name": "Column", @@ -156709,7 +167477,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156738,7 +167506,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L222" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -156767,7 +167535,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156836,7 +167604,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1708" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1764" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -156865,7 +167633,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156942,7 +167710,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1417" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1465" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -156971,7 +167739,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -156984,7 +167752,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1247" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1287" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -157013,7 +167781,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157042,7 +167810,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1057" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1089" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -157071,7 +167839,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157132,7 +167900,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L578" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L594" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -157161,7 +167929,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157174,7 +167942,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1335" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1379" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -157203,7 +167971,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157272,7 +168040,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L319" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L327" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -157301,7 +168069,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157338,7 +168106,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1849" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1909" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -157367,7 +168135,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157412,7 +168180,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L840" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L864" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -157441,7 +168209,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157494,7 +168262,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L472" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -157523,7 +168291,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tooltip that gets displayed when hovering over the column\nlabel. If this is None (default), no tooltip is displayed.

\n", + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", "default": null }, { @@ -157592,7 +168360,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/column_types.py#L1566" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1618" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -157632,7 +168400,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/components/v1/component_registry.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/components/v1/component_registry.py#L51" }, "streamlit.components.v1.html": { "name": "html", @@ -157674,7 +168442,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -157716,7 +168484,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -157742,7 +168510,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L681" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L716" }, "StatusContainer.update": { "name": "update", @@ -157775,7 +168543,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -157804,7 +168572,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1026" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1026" }, { "name": "run", @@ -157828,7 +168596,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L370" }, { "name": "switch_page", @@ -157852,7 +168620,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L393" } ], "properties": [ @@ -157869,7 +168637,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L447" }, { "name": "button_group", @@ -157884,7 +168652,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L462" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L462" }, { "name": "caption", @@ -157899,7 +168667,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L476" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L476" }, { "name": "chat_input", @@ -157914,7 +168682,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L490" }, { "name": "chat_message", @@ -157929,7 +168697,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L504" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L504" }, { "name": "checkbox", @@ -157944,7 +168712,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L518" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L518" }, { "name": "code", @@ -157959,7 +168727,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L532" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L532" }, { "name": "color_picker", @@ -157974,7 +168742,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L546" }, { "name": "columns", @@ -157989,7 +168757,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L560" }, { "name": "dataframe", @@ -158004,7 +168772,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L577" }, { "name": "date_input", @@ -158019,7 +168787,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L591" }, { "name": "divider", @@ -158034,7 +168802,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L605" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L605" }, { "name": "error", @@ -158049,7 +168817,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L619" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L619" }, { "name": "exception", @@ -158064,7 +168832,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L633" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L633" }, { "name": "expander", @@ -158079,7 +168847,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L647" }, { "name": "header", @@ -158094,7 +168862,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L661" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L661" }, { "name": "info", @@ -158109,7 +168877,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L675" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L675" }, { "name": "json", @@ -158124,7 +168892,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L689" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L689" }, { "name": "latex", @@ -158139,7 +168907,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L703" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L703" }, { "name": "main", @@ -158154,7 +168922,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L421" }, { "name": "markdown", @@ -158169,7 +168937,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L717" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L717" }, { "name": "metric", @@ -158184,7 +168952,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L731" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L731" }, { "name": "multiselect", @@ -158199,7 +168967,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L745" }, { "name": "number_input", @@ -158214,7 +168982,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L759" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L759" }, { "name": "radio", @@ -158229,7 +168997,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L773" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L773" }, { "name": "select_slider", @@ -158244,7 +169012,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L787" }, { "name": "selectbox", @@ -158259,7 +169027,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L801" }, { "name": "sidebar", @@ -158274,7 +169042,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L434" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L434" }, { "name": "slider", @@ -158289,7 +169057,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L815" }, { "name": "status", @@ -158304,7 +169072,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L857" }, { "name": "subheader", @@ -158319,7 +169087,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L829" }, { "name": "success", @@ -158334,7 +169102,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L843" }, { "name": "table", @@ -158349,7 +169117,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L871" }, { "name": "tabs", @@ -158364,7 +169132,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L885" }, { "name": "text", @@ -158379,7 +169147,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L905" }, { "name": "text_area", @@ -158394,7 +169162,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L919" }, { "name": "text_input", @@ -158409,7 +169177,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L933" }, { "name": "time_input", @@ -158424,7 +169192,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L947" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L947" }, { "name": "title", @@ -158439,7 +169207,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L961" }, { "name": "toast", @@ -158454,7 +169222,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L975" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L975" }, { "name": "toggle", @@ -158469,7 +169237,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L989" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L989" }, { "name": "warning", @@ -158484,10 +169252,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1003" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1003" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L96", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L96", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -158527,7 +169295,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L447" }, "AppTest.button_group": { "name": "button_group", @@ -158542,7 +169310,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L462" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L462" }, "AppTest.caption": { "name": "caption", @@ -158557,7 +169325,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L476" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L476" }, "AppTest.chat_input": { "name": "chat_input", @@ -158572,7 +169340,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L490" }, "AppTest.chat_message": { "name": "chat_message", @@ -158587,7 +169355,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L504" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L504" }, "AppTest.checkbox": { "name": "checkbox", @@ -158602,7 +169370,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L518" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L518" }, "AppTest.code": { "name": "code", @@ -158617,7 +169385,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L532" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L532" }, "AppTest.color_picker": { "name": "color_picker", @@ -158632,7 +169400,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L546" }, "AppTest.columns": { "name": "columns", @@ -158647,7 +169415,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L560" }, "AppTest.dataframe": { "name": "dataframe", @@ -158662,7 +169430,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L577" }, "AppTest.date_input": { "name": "date_input", @@ -158677,7 +169445,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L591" }, "AppTest.divider": { "name": "divider", @@ -158692,7 +169460,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L605" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L605" }, "AppTest.error": { "name": "error", @@ -158707,7 +169475,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L619" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L619" }, "AppTest.exception": { "name": "exception", @@ -158722,7 +169490,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L633" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L633" }, "AppTest.expander": { "name": "expander", @@ -158737,7 +169505,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L647" }, "AppTest.from_file": { "name": "from_file", @@ -158769,7 +169537,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L266" }, "AppTest.from_function": { "name": "from_function", @@ -158817,7 +169585,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L219" }, "AppTest.from_string": { "name": "from_string", @@ -158849,7 +169617,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L176" }, "AppTest.get": { "name": "get", @@ -158873,7 +169641,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1026" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1026" }, "AppTest.header": { "name": "header", @@ -158888,7 +169656,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L661" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L661" }, "AppTest.info": { "name": "info", @@ -158903,7 +169671,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L675" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L675" }, "AppTest.json": { "name": "json", @@ -158918,7 +169686,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L689" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L689" }, "AppTest.latex": { "name": "latex", @@ -158933,7 +169701,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L703" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L703" }, "AppTest.main": { "name": "main", @@ -158948,7 +169716,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L421" }, "AppTest.markdown": { "name": "markdown", @@ -158963,7 +169731,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L717" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L717" }, "AppTest.metric": { "name": "metric", @@ -158978,7 +169746,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L731" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L731" }, "AppTest.multiselect": { "name": "multiselect", @@ -158993,7 +169761,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L745" }, "AppTest.number_input": { "name": "number_input", @@ -159008,7 +169776,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L759" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L759" }, "AppTest.radio": { "name": "radio", @@ -159023,7 +169791,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L773" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L773" }, "AppTest.run": { "name": "run", @@ -159047,7 +169815,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L370" }, "AppTest.select_slider": { "name": "select_slider", @@ -159062,7 +169830,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L787" }, "AppTest.selectbox": { "name": "selectbox", @@ -159077,7 +169845,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L801" }, "AppTest.sidebar": { "name": "sidebar", @@ -159092,7 +169860,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L434" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L434" }, "AppTest.slider": { "name": "slider", @@ -159107,7 +169875,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L815" }, "AppTest.status": { "name": "status", @@ -159122,7 +169890,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L857" }, "AppTest.subheader": { "name": "subheader", @@ -159137,7 +169905,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L829" }, "AppTest.success": { "name": "success", @@ -159152,7 +169920,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L843" }, "AppTest.switch_page": { "name": "switch_page", @@ -159176,7 +169944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L393" }, "AppTest.table": { "name": "table", @@ -159191,7 +169959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L871" }, "AppTest.tabs": { "name": "tabs", @@ -159206,7 +169974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L885" }, "AppTest.text": { "name": "text", @@ -159221,7 +169989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L905" }, "AppTest.text_area": { "name": "text_area", @@ -159236,7 +170004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L919" }, "AppTest.text_input": { "name": "text_input", @@ -159251,7 +170019,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L933" }, "AppTest.time_input": { "name": "time_input", @@ -159266,7 +170034,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L947" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L947" }, "AppTest.title": { "name": "title", @@ -159281,7 +170049,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L961" }, "AppTest.toast": { "name": "toast", @@ -159296,7 +170064,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L975" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L975" }, "AppTest.toggle": { "name": "toggle", @@ -159311,7 +170079,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L989" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L989" }, "AppTest.warning": { "name": "warning", @@ -159326,7 +170094,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/app_test.py#L1003" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1003" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -159339,7 +170107,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -159356,7 +170124,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159364,7 +170132,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -159374,10 +170142,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -159402,7 +170170,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -159410,7 +170178,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L750" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L750" }, { "name": "set_value", @@ -159418,7 +170186,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "unselect", @@ -159426,7 +170194,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L765" } ], "properties": [ @@ -159436,7 +170204,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "indices", @@ -159444,7 +170212,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "value", @@ -159452,10 +170220,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L723" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L697", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -159480,7 +170248,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159488,7 +170256,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -159498,10 +170266,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -159517,7 +170285,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L418" }, { "name": "run", @@ -159534,7 +170302,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159542,7 +170310,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L413" }, { "name": "uncheck", @@ -159550,7 +170318,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L422" } ], "properties": [ @@ -159560,10 +170328,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L403" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L381", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -159579,7 +170347,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -159596,7 +170364,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159604,7 +170372,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -159614,10 +170382,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L464" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L449", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -159642,7 +170410,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159650,7 +170418,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -159660,10 +170428,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -159688,7 +170456,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" } ], "properties": [ @@ -159698,10 +170466,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L104", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -159726,7 +170494,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -159734,7 +170502,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -159742,7 +170510,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -159750,7 +170518,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L853" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L853" } ], "properties": [ @@ -159760,7 +170528,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -159768,7 +170536,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L821" }, { "name": "value", @@ -159776,10 +170544,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L811" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L811" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L782", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L782", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -159795,7 +170563,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L926" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L926" }, { "name": "increment", @@ -159803,7 +170571,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L918" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L918" }, { "name": "run", @@ -159820,7 +170588,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159828,7 +170596,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L893" } ], "properties": [ @@ -159838,10 +170606,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L906" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L906" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L873", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L873", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -159866,7 +170634,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -159874,7 +170642,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L977" } ], "properties": [ @@ -159884,7 +170652,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L971" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L971" }, { "name": "index", @@ -159892,7 +170660,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L954" }, { "name": "value", @@ -159900,10 +170668,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L961" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L935", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L935", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -159928,7 +170696,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -159936,7 +170704,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1123" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1123" }, { "name": "set_value", @@ -159944,7 +170712,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1085" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1085" } ], "properties": [ @@ -159954,7 +170722,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "value", @@ -159962,10 +170730,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1106" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1106" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1067", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1067", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -159990,7 +170758,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "select", @@ -159998,7 +170766,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1044" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1044" }, { "name": "select_index", @@ -160006,7 +170774,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "set_value", @@ -160014,7 +170782,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1039" } ], "properties": [ @@ -160024,7 +170792,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1033" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1033" }, { "name": "index", @@ -160032,7 +170800,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1013" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1013" }, { "name": "value", @@ -160040,10 +170808,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1023" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1023" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L995", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L995", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -160068,7 +170836,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_range", @@ -160076,7 +170844,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1176" }, { "name": "set_value", @@ -160084,7 +170852,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1147" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1147" } ], "properties": [ @@ -160094,10 +170862,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1165" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1128", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1128", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -160113,7 +170881,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1257" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1257" }, { "name": "run", @@ -160130,7 +170898,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -160138,7 +170906,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1233" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1233" } ], "properties": [ @@ -160148,10 +170916,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1215", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1215", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -160167,7 +170935,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1310" }, { "name": "run", @@ -160184,7 +170952,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -160192,7 +170960,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1286" } ], "properties": [ @@ -160202,10 +170970,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1299" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1299" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1268", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1268", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -160221,7 +170989,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1375" }, { "name": "increment", @@ -160229,7 +170997,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1368" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1368" }, { "name": "run", @@ -160246,7 +171014,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -160254,7 +171022,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1340" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1340" } ], "properties": [ @@ -160264,10 +171032,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1324", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1324", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -160292,7 +171060,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -160300,7 +171068,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1432" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1432" } ], "properties": [ @@ -160310,10 +171078,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1422" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L1399", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1399", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -160338,7 +171106,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" }, { "name": "set_value", @@ -160346,7 +171114,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L194" } ], "properties": [ @@ -160356,10 +171124,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L133" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L179", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -160377,7 +171145,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L506" }, "context.cookies": { "name": "cookies", @@ -160386,7 +171154,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L178" }, "context.headers": { "name": "headers", @@ -160395,7 +171163,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L136" }, "CachedFunc.clear": { "name": "clear", @@ -160421,7 +171189,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/caching/cache_utils.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_utils.py#L347" }, "StreamlitPage": { "name": "StreamlitPage", @@ -160434,7 +171202,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L274" } ], "properties": [ @@ -160444,7 +171212,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L251" }, { "name": "title", @@ -160452,7 +171220,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L240" }, { "name": "url_path", @@ -160460,10 +171228,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L259" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L134", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L134", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -160496,7 +171264,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L251" }, "StreamlitPage.run": { "name": "run", @@ -160504,7 +171272,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L274" }, "StreamlitPage.title": { "name": "title", @@ -160512,7 +171280,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L240" }, "StreamlitPage.url_path": { "name": "url_path", @@ -160520,7 +171288,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/navigation/page.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L259" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -160540,18 +171308,19 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L506" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/user_info.py#L36", - "description": "

A read-only, dict-like object for accessing information about current user.

\n

st.experimental_user is dependant on the host platform running the\nStreamlit app. If the host platform has not configured the function, it\nwill behave as it does in a locally running app.

\n

Properties can by accessed via key or attribute notation. For example,\nst.experimental_user["email"] or st.experimental_user.email.

\n", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L371", + "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.experimental_user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.experimental_user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", + "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.experimental_user is dependent on the host platform running your\nStreamlit app. If the host platform has not configured the function, it\nwill behave as in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.experimental_user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.experimental_user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.experimental_user["email"] or st.experimental_user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ { - "name": "email", - "type_name": "str", + "name": "is_logged_in", + "type_name": "bool", "is_optional": false, - "description": "

If running locally, this property returns the string literal\n"test@example.com".

\n

If running on Streamlit Community Cloud, this\nproperty returns one of two values:

\n
    \n
  • None if the user is not logged in or not a member of the app's workspace. Such users appear under anonymous pseudonyms in the app's analytics.
  • \n
  • The user's email if the the user is logged in and a member of the app's workspace. Such users are identified by their email in the app's analytics.
  • \n
\n", + "description": "

Whether a user is logged in. For a locally running app, this attribute\nis only available when authentication (st.login()) is configured in\nsecrets.toml. Otherwise, it does not exist.

\n", "default": null } ], @@ -160570,7 +171339,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L178" }, { "name": "headers", @@ -160579,10 +171348,10 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/runtime/context.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L125", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -160592,7 +171361,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L169", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L169", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -160612,7 +171381,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/plotly_chart.py#L81", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L81", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -160653,7 +171422,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/vega_charts.py#L100", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L110", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -160673,7 +171442,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -160692,7 +171461,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -160719,7 +171488,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -160738,7 +171507,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.41.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -160761,12 +171530,12 @@ "is_attribute_dict": true } }, - "1.42.0": { + "1.43.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", - "example": "
\n
\nimport streamlit as st\n\ndef page2():\n    st.title("Second page")\n\npg = st.navigation([\n    st.Page("page1.py", title="First page", icon="\ud83d\udd25"),\n    st.Page(page2, title="Second page", icon=":material/favorite:"),\n])\npg.run()\n
\n
\n", - "description": "

Configure a page for st.navigation in a multipage app.

\n

Call st.Page to initialize a StreamlitPage object, and pass it to\nst.navigation to declare a page in your app.

\n

When a user navigates to a page, st.navigation returns the selected\nStreamlitPage object. Call .run() on the returned StreamlitPage\nobject to execute the page. You can only run the page returned by\nst.navigation, and you can only run it once per app rerun.

\n

A page can be defined by a Python file or Callable. Python files used\nas a StreamlitPage source will have __name__ == "__page__".\nFunctions used as a StreamlitPage source will have __name__\ncorresponding to the module they were imported from. Only the entrypoint\nfile and functions defined within the entrypoint file have\n__name__ == "__main__" to adhere to Python convention.

\n", + "example": "
\nimport streamlit as st\n\ndef page2():\n    st.title("Second page")\n\npg = st.navigation([\n    st.Page("page1.py", title="First page", icon="\ud83d\udd25"),\n    st.Page(page2, title="Second page", icon=":material/favorite:"),\n])\npg.run()\n
\n", + "description": "

Configure a page for st.navigation in a multipage app.

\n

Call st.Page to initialize a StreamlitPage object, and pass it to\nst.navigation to declare a page in your app.

\n

When a user navigates to a page, st.navigation returns the selected\nStreamlitPage object. Call .run() on the returned StreamlitPage\nobject to execute the page. You can only run the page returned by\nst.navigation, and you can only run it once per app rerun.

\n

A page can be defined by a Python file or Callable.

\n", "args": [ { "name": "page", @@ -160817,12 +171586,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c)\n
\n
\n", + "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c)\n
\n", "description": "

Display a chart using the Vega-Altair library.

\n

Vega-Altair is a declarative\nstatistical visualization library for Python, based on Vega and\nVega-Lite.

\n", "args": [ { @@ -160882,12 +171651,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1501" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1498" }, "streamlit.area_chart": { "name": "area_chart", "signature": "st.area_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, stack=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.area_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can adjust the stacking behavior by setting stack. Create a\nsteamgraph:

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.unemployment_across_industries()\n\nst.area_chart(source, x="date", y="count", color="series", stack="center")\n
\n
\n", + "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.area_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can adjust the stacking behavior by setting stack. Create a\nsteamgraph:

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.unemployment_across_industries()\n\nst.area_chart(source, x="date", y="count", color="series", stack="center")\n
\n", "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -160972,12 +171741,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L758" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L755" }, "streamlit.audio": { "name": "audio", "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False, autoplay=False)", - "examples": "
\n

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n
\n", + "examples": "

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n", "description": "

Display an audio player.

\n", "args": [ { @@ -160993,7 +171762,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The MIME type for the audio file. This defaults to "audio/wav".\nFor more information, see https://tools.ietf.org/html/rfc4281.

\n", + "description": "

The MIME type for the audio file. This defaults to "audio/wav".\nFor more information about MIME types, see\nhttps://www.iana.org/assignments/media-types/media-types.xhtml.

\n", "default": "s" }, { @@ -161038,12 +171807,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/media.py#L72" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", "signature": "st.audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\naudio_value = st.audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\naudio_value = st.audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n", "description": "

Display a widget that returns an audio recording from the user's microphone.

\n", "args": [ { @@ -161119,21 +171888,21 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/audio_input.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/audio_input.py#L90" }, "streamlit.balloons": { "name": "balloons", "signature": "st.balloons()", - "example": "
\n
\nimport streamlit as st\n\nst.balloons()\n
\n

...then watch your app and get ready for a celebration!

\n
\n", + "example": "
\nimport streamlit as st\n\nst.balloons()\n
\n

...then watch your app and get ready for a celebration!

\n", "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", "signature": "st.bar_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, horizontal=False, stack=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": np.random.randn(60),\n        "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n    }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": np.random.randn(20),\n        "col3": np.random.randn(20),\n    }\n)\n\nst.bar_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n

You can unstack your bar charts.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="year", y="yield", color="site", stack=False)\n
\n
\n", + "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": np.random.randn(60),\n        "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n    }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": np.random.randn(20),\n        "col3": np.random.randn(20),\n    }\n)\n\nst.bar_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n

You can unstack your bar charts.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="year", y="yield", color="site", stack=False)\n
\n", "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -161226,13 +171995,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L999" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L996" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", "signature": "st.bokeh_chart(figure, use_container_width=True)", - "example": "
\n
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p)\n
\n
\n", - "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand.

\n
\n", + "example": "
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p)\n
\n", + "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand.

\n

If you need a newer version of Bokeh, use our streamlit-bokeh\ncustom component instead.

\n
\n", "args": [ { "name": "figure", @@ -161252,12 +172021,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/bokeh_chart.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "
\n

Example 1: Customize your button type

\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n\nif st.button("Aloha", type="tertiary"):\n    st.write("Ciao")\n
\n

Example 2: Add icons to your button

\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n
\n", + "examples": "

Example 1: Customize your button type

\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n\nif st.button("Aloha", type="tertiary"):\n    st.write("Ciao")\n
\n

Example 2: Add icons to your button

\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -161349,12 +172118,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L87" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L88" }, "streamlit.cache": { "name": "cache", "signature": "st.cache(func=None, persist=False, allow_output_mutation=False, show_spinner=True, suppress_st_warning=False, hash_funcs=None, max_entries=None, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to\nTrue:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id)\nlike this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n
\n", + "example": "
\nimport streamlit as st\n\n@st.cache\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\n@st.cache(persist=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To disable hashing return values, set the allow_output_mutation parameter to\nTrue:

\n
\n@st.cache(allow_output_mutation=True)\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. MongoClient) to a hash function (id)\nlike this:

\n
\n@st.cache(hash_funcs={MongoClient: id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "pymongo.mongo_client.MongoClient") to the hash function instead:

\n
\n@st.cache(hash_funcs={"pymongo.mongo_client.MongoClient": id})\ndef connect_to_database(url):\n    return MongoClient(url)\n
\n", "description": "

Legacy caching decorator (deprecated).

\n

Legacy caching with st.cache has been removed from Streamlit. This is\nnow an alias for st.cache_data and st.cache_resource.

\n", "args": [ { @@ -161423,12 +172192,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n
\n", + "example": "
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n", "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { @@ -161493,12 +172262,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", - "example": "
\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n
\n", + "example": "
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n", "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ { @@ -161563,12 +172332,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", "signature": "st.camera_input(label, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\nenable = st.checkbox("Enable camera")\npicture = st.camera_input("Take a picture", disabled=not enable)\n\nif picture:\n    st.image(picture)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nenable = st.checkbox("Enable camera")\npicture = st.camera_input("Take a picture", disabled=not enable)\n\nif picture:\n    st.image(picture)\n
\n", "description": "

Display a widget that returns pictures from the user's webcam.

\n", "args": [ { @@ -161644,12 +172413,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/camera_input.py#L86" }, "streamlit.caption": { "name": "caption", "signature": "st.caption(body, unsafe_allow_html=False, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.caption("This is a string that explains something above.")\nst.caption("A caption with _italics_ :blue[colors] and emojis :sunglasses:")\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nst.caption("This is a string that explains something above.")\nst.caption("A caption with _italics_ :blue[colors] and emojis :sunglasses:")\n
\n", "description": "

Display text in small font.

\n

This should be used for captions, asides, footnotes, sidenotes, and\nother explanatory text.

\n", "args": [ { @@ -161678,12 +172447,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L175" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L177" }, "streamlit.chat_input": { "name": "chat_input", - "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, disabled=False, on_submit=None, args=None, kwargs=None)", - "examples": "
\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n
\n", + "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, accept_file=False, file_type=None, disabled=False, on_submit=None, args=None, kwargs=None)", + "examples": "

Example 1: Pin the the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n", "description": "

Display a chat input widget.

\n", "args": [ { @@ -161691,7 +172460,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

A placeholder text shown when the chat input is empty. Defaults to\n"Your message". For accessibility reasons, you should not use an\nempty string.

\n", + "description": "

A placeholder text shown when the chat input is empty. This\ndefaults to "Your message". For accessibility reasons, you\nshould not use an empty string.

\n", "default": "s" }, { @@ -161707,7 +172476,23 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The maximum number of characters that can be entered. If None\n(default), there will be no maximum.

\n", + "description": "

The maximum number of characters that can be entered. If this is\nNone (default), there will be no maximum.

\n", + "default": null + }, + { + "name": "accept_file", + "type_name": "bool or str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the chat input should accept files. This can be one of the\nfollowing values:

\n
    \n
  • False (default): No files are accepted and the user can only\nsubmit a message.
  • \n
  • True: The user can add a single file to their submission.
  • \n
  • "multiple": The user can add multiple files to their\nsubmission.
  • \n
\n

When the widget is configured to accept files, the accepted file\ntypes can be configured with the file_type parameter.

\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option.\nFor more information on how to set config options, see\nconfig.toml.

\n", + "default": null + }, + { + "name": "file_type", + "type_name": "str, Sequence[str], or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n", "default": null }, { @@ -161715,7 +172500,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether the chat input should be disabled. Defaults to False.

\n", + "description": "

Whether the chat input should be disabled. This defaults to\nFalse.

\n", "default": "s" }, { @@ -161745,18 +172530,18 @@ ], "returns": [ { - "type_name": "str or None", + "type_name": "None, str, or dict-like", "is_generator": false, - "description": "

The current (non-empty) value of the text input widget on the last\nrun of the app. Otherwise, None.

\n", + "description": "

The user's submission. This is one of the following types:

\n
    \n
  • None: If the user didn't submit a message or file in the last\nrerun, the widget returns None.
  • \n
  • A string: When the widget is not configured to accept files and\nthe user submitted a message in the last rerun, the widget\nreturns the user's message as a string.
  • \n
  • A dict-like object: When the widget is configured to accept files\nand the user submitted a message and/or file(s) in the last\nrerun, the widget returns a dict-like object with two attributes,\ntext and files.
  • \n
\n

When the widget is configured to accept files and the user submits\nsomething in the last rerun, you can access the user's submission\nwith key or attribute notation from the dict-like object. This is\nshown in Example 3 below.

\n

The text attribute holds a string, which is the user's message.\nThis is an empty string if the user only submitted one or more\nfiles.

\n

The files attribute holds a list of UploadedFile objects.\nThe list is empty if the user only submitted a message. Unlike\nst.file_uploader, this attribute always returns a list, even\nwhen the widget is configured to accept only one file at a time.

\n

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/chat.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/chat.py#L358" }, "streamlit.chat_message": { "name": "chat_message", "signature": "st.chat_message(name, *, avatar=None)", - "examples": "
\n

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n
\n", + "examples": "

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n", "description": "

Insert a chat message container.

\n

To add elements to the returned container, you can use with notation\n(preferred) or just call methods directly on the returned object. See the\nexamples below.

\n", "args": [ { @@ -161784,12 +172569,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/chat.py#L126" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/chat.py#L214" }, "streamlit.checkbox": { "name": "checkbox", "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n", "description": "

Display a checkbox widget.

\n", "args": [ { @@ -161873,12 +172658,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False, height=None)", - "examples": "
\n
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\nimport streamlit as st\ncode = '''Is it a crown or boat?\n                        ii\n                      iiiiii\nWWw                 .iiiiiiii.                ...:\n WWWWWWw          .iiiiiiiiiiii.         ........\n  WWWWWWWWWWw    iiiiiiiiiiiiiiii    ...........\n   WWWWWWWWWWWWWWwiiiiiiiiiiiiiiiii............\n    WWWWWWWWWWWWWWWWWWwiiiiiiiiiiiiii.........\n     WWWWWWWWWWWWWWWWWWWWWWwiiiiiiiiii.......\n      WWWWWWWWWWWWWWWWWWWWWWWWWWwiiiiiii....\n       WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwiiii.\n          -MMMWWWWWWWWWWWWWWWWWWWWWWMMM-\n'''\nst.code(code, language=None)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\nimport streamlit as st\ncode = '''Is it a crown or boat?\n                        ii\n                      iiiiii\nWWw                 .iiiiiiii.                ...:\n WWWWWWw          .iiiiiiiiiiii.         ........\n  WWWWWWWWWWw    iiiiiiiiiiiiiiii    ...........\n   WWWWWWWWWWWWWWwiiiiiiiiiiiiiiiii............\n    WWWWWWWWWWWWWWWWWWwiiiiiiiiiiiiii.........\n     WWWWWWWWWWWWWWWWWWWWWWwiiiiiiiiii.......\n      WWWWWWWWWWWWWWWWWWWWWWWWWWwiiiiiii....\n       WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwiiii.\n          -MMMWWWWWWWWWWWWWWWWWWWWWWMMM-\n'''\nst.code(code, language=None)\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ { @@ -161923,12 +172708,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n
\n", + "example": "
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n", "description": "

Display a color picker widget.

\n", "args": [ { @@ -162012,12 +172797,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\", border=False)", - "examples": "
\n

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n
\n", + "examples": "

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n", "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This\nis only possible in the main area of the app.

\n
\n", "args": [ { @@ -162061,12 +172846,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L177" }, "streamlit.connection": { "name": "connection", "signature": "st.connection(name, type=None, max_entries=None, ttl=None, **kwargs)", - "examples": "
\n

Example 1: Inferred connection type

\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile. The following example creates a "sql"-type connection.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("sql")\n
\n

Example 2: Named connections

\n

Creating a connection with a custom name requires you to explicitly\nspecify the type. If type is not passed as a keyword argument, it must\nbe set in the appropriate section of secrets.toml. The following\nexample creates two "sql"-type connections, each with their own\ncustom name. The first defines type in the st.connection command;\nthe second defines type in secrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.first_connection]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n\n[connections.second_connection]\ntype = "sql"\ndialect = "yyy"\nhost = "yyy"\nusername = "yyy"\npassword = "yyy"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn1 = st.connection("first_connection", type="sql")\nconn2 = st.connection("second_connection")\n
\n

Example 3: Using a path to the connection class

\n

Passing the full module path to the connection class can be useful,\nespecially when working with a custom connection. Although this is not the\ntypical way to create first party connections, the following example\ncreates the same type of connection as one with type="sql". Note that\ntype is a string path.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection(\n    "my_sql_connection", type="streamlit.connections.SQLConnection"\n)\n
\n

Example 4: Importing the connection class

\n

You can pass the connection class directly to the st.connection\ncommand. Doing so allows static type checking tools such as mypy to\ninfer the exact return type of st.connection. The following example\ncreates the same connection as in Example 3.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n
\n", + "examples": "

Example 1: Inferred connection type

\n

The easiest way to create a first-party (SQL, Snowflake, or Snowpark) connection is\nto use their default names and define corresponding sections in your secrets.toml\nfile. The following example creates a "sql"-type connection.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("sql")\n
\n

Example 2: Named connections

\n

Creating a connection with a custom name requires you to explicitly\nspecify the type. If type is not passed as a keyword argument, it must\nbe set in the appropriate section of secrets.toml. The following\nexample creates two "sql"-type connections, each with their own\ncustom name. The first defines type in the st.connection command;\nthe second defines type in secrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.first_connection]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n\n[connections.second_connection]\ntype = "sql"\ndialect = "yyy"\nhost = "yyy"\nusername = "yyy"\npassword = "yyy"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn1 = st.connection("first_connection", type="sql")\nconn2 = st.connection("second_connection")\n
\n

Example 3: Using a path to the connection class

\n

Passing the full module path to the connection class can be useful,\nespecially when working with a custom connection. Although this is not the\ntypical way to create first party connections, the following example\ncreates the same type of connection as one with type="sql". Note that\ntype is a string path.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection(\n    "my_sql_connection", type="streamlit.connections.SQLConnection"\n)\n
\n

Example 4: Importing the connection class

\n

You can pass the connection class directly to the st.connection\ncommand. Doing so allows static type checking tools such as mypy to\ninfer the exact return type of st.connection. The following example\ncreates the same connection as in Example 3.

\n

.streamlit/secrets.toml:

\n
\n[connections.my_sql_connection]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nfrom streamlit.connections import SQLConnection\nconn = st.connection("my_sql_connection", type=SQLConnection)\n
\n", "description": "

Create a new connection to a data store or API, or return an existing one.

\n

Configuration options, credentials, and secrets for connections are\ncombined from the following sources:

\n
    \n
  • The keyword arguments passed to this command.
  • \n
  • The app's secrets.toml files.
  • \n
  • Any connection-specific configuration files.
  • \n
\n

The connection returned from st.connection is internally cached with\nst.cache_resource and is therefore shared between sessions.

\n", "args": [ { @@ -162118,12 +172903,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", "signature": "st.container(*, height=None, border=None, key=None)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n
\n", + "examples": "

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n", "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", "args": [ { @@ -162152,12 +172937,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L43" }, "streamlit.data_editor": { "name": "data_editor", - "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=False, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index, column_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n
\n", + "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=None, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None, row_height=None)", + "examples": "
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index,\ncolumn_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n", "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n", "args": [ { @@ -162189,7 +172974,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the data editor's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe data editor to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If this is True (default), Streamlit sets the width\nof the data editor to match the width of the parent container. If\nthis is False, Streamlit sets the data editor's width according\nto width.

\n", "default": null }, { @@ -162263,6 +173048,14 @@ "is_kwarg_only": true, "description": "

An optional dict of kwargs to pass to the callback.

\n", "default": null + }, + { + "name": "row_height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The height of each row in the data editor in pixels. If row_height\nis None (default), Streamlit will use a default row height,\nwhich fits one line of text.

\n", + "default": "row" } ], "returns": [ @@ -162273,12 +173066,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/data_editor.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/data_editor.py#L581" }, "streamlit.dataframe": { "name": "dataframe", - "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=False, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\")", - "examples": "
\n

Example 1: Display a dataframe

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nimport streamlit as st\nimport pandas as pd\nfrom datetime import date\n\ndf = pd.DataFrame(\n    {\n        "Date": [date(2024, 1, 1), date(2024, 2, 1), date(2024, 3, 1)],\n        "Total": [13429, 23564, 23452],\n    }\n)\ndf.set_index("Date", inplace=True)\n\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n
\n", + "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=None, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\", row_height=None)", + "examples": "

Example 1: Display a dataframe

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nimport streamlit as st\nimport pandas as pd\nfrom datetime import date\n\ndf = pd.DataFrame(\n    {\n        "Date": [date(2024, 1, 1), date(2024, 2, 1), date(2024, 3, 1)],\n        "Total": [13429, 23564, 23452],\n    }\n)\ndf.set_index("Date", inplace=True)\n\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n", "description": "

Display a dataframe as an interactive table.

\n

This command works with a wide variety of collection-like and\ndataframe-like object types.

\n", "args": [ { @@ -162310,7 +173103,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the dataframe's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe dataframe to match the width of the parent container.

\n", + "description": "

Whether to override width with the width of the parent\ncontainer. If this is True (default), Streamlit sets the width\nof the dataframe to match the width of the parent container. If\nthis is False, Streamlit sets the dataframe's width according\nto width.

\n", "default": null }, { @@ -162360,6 +173153,14 @@ "is_kwarg_only": true, "description": "

The types of selections Streamlit should allow when selections are\nenabled with on_select. This can be one of the following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", "default": null + }, + { + "name": "row_height", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The height of each row in the dataframe in pixels. If row_height\nis None (default), Streamlit will use a default row height,\nwhich fits one line of text.

\n", + "default": "row" } ], "returns": [ @@ -162370,12 +173171,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L258" }, "streamlit.date_input": { "name": "date_input", "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n
\n", + "examples": "
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n", "description": "

Display a date input widget.

\n

The first day of the week is determined from the user's locale in their\nbrowser.

\n", "args": [ { @@ -162483,12 +173284,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/time_widgets.py#L634" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/time_widgets.py#L632" }, "streamlit.dialog": { "name": "dialog", "signature": "st.dialog(title, *, width=\"small\")", - "examples": "
\n

The following example demonstrates the basic usage of @st.dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n
\n", + "examples": "

The following example demonstrates the basic usage of @st.dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n", "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing ESC on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.dialog inherits behavior from st.fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time.

\n
\n", "args": [ { @@ -162509,21 +173310,21 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", "signature": "st.divider()", - "example": "
\n
\nimport streamlit as st\n\nst.divider()\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.divider()\n
\n", "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L292" }, "streamlit.download_button": { "name": "download_button", - "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "
\n

Download a large DataFrame as a CSV:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef convert_df(df):\n    # IMPORTANT: Cache the conversion to prevent computation on every rerun\n    return df.to_csv().encode("utf-8")\n\ncsv = convert_df(my_large_df)\n\nst.download_button(\n    label="Download data as CSV",\n    data=csv,\n    file_name="large_df.csv",\n    mime="text/csv",\n)\n
\n

Download a string as a file:

\n
\nimport streamlit as st\n\ntext_contents = '''This is some text'''\nst.download_button("Download some text", text_contents)\n
\n

Download a binary file:

\n
\nimport streamlit as st\n\nbinary_contents = b"example content"\n# Defaults to "application/octet-stream"\nst.download_button("Download binary file", binary_contents)\n
\n

Download an image:

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    btn = st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n
\n", + "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=\"rerun\", args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\neffeciently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

You can pass a string to the data argument and Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ { @@ -162536,10 +173337,10 @@ }, { "name": "data", - "type_name": "str or bytes or file", + "type_name": "str, bytes, or file", "is_optional": false, "is_kwarg_only": false, - "description": "

The contents of the file to be downloaded. See example below for\ncaching techniques to avoid recomputing this data unnecessarily.

\n", + "description": "

The contents of the file to be downloaded.

\n

To prevent unncecessary recomputation, use caching when converting\nyour data for download. For more information, see the Example 1\nbelow.

\n", "default": null }, { @@ -162547,7 +173348,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional string to use as the name of the file to be downloaded,\nsuch as 'my_file.csv'. If not specified, the name will be\nautomatically generated.

\n", + "description": "

An optional string to use as the name of the file to be downloaded,\nsuch as "my_file.csv". If not specified, the name will be\nautomatically generated.

\n", "default": null }, { @@ -162555,8 +173356,8 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The MIME type of the data. If None, defaults to "text/plain"\n(if data is of type str or is a textual file) or\n"application/octet-stream" (if data is of type bytes or is a\nbinary file).

\n", - "default": "s" + "description": "

The MIME type of the data. If this is None (default), Streamlit\nsets the MIME type depending on the value of data as follows:

\n
    \n
  • If data is a string or textual file (i.e. str or\nio.TextIOWrapper object), Streamlit uses the "text/plain"\nMIME type.
  • \n
  • If data is a binary file or bytes (i.e. bytes,\nio.BytesIO, io.BufferedReader, or io.RawIOBase\nobject), Streamlit uses the "application/octet-stream" MIME type.
  • \n
\n

For more information about MIME types, see\nhttps://www.iana.org/assignments/media-types/media-types.xhtml.

\n", + "default": null }, { "name": "key", @@ -162576,10 +173377,10 @@ }, { "name": "on_click", - "type_name": "callable", + "type_name": "callable, \"rerun\", \"ignore\", or None", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional callback invoked when this button is clicked.

\n", + "description": "

How the button should respond to user interaction. This controls\nwhether or not the button triggers a rerun and if a callback\nfunction is called. This can be one of the following values:

\n
    \n
  • "rerun" (default): The user downloads the file and the app\nreruns. No callback function is called.
  • \n
  • "ignore": The user downloads the file and the app doesn't\nrerun. No callback function is called.
  • \n
  • A callable: The user downloads the file and app reruns. The\ncallable is called before the rest of the app.
  • \n
  • None: This is same as on_click="rerun". This value exists\nfor backwards compatibility and shouldn't be used.
  • \n
\n", "default": null }, { @@ -162639,12 +173440,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L259" }, "streamlit.echo": { "name": "echo", "signature": "st.echo(code_location=\"above\")", - "example": "
\n
\nimport streamlit as st\n\nwith st.echo():\n    st.write('This code will be printed')\n
\n
\n", + "example": "
\nimport streamlit as st\n\nwith st.echo():\n    st.write('This code will be printed')\n
\n", "description": "

Use in a with block to draw some code on the app, then execute it.

\n", "args": [ { @@ -162657,21 +173458,21 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/echo.py#L30" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", "signature": "st.empty()", - "examples": "
\n

Inside a with st.empty(): block, each displayed element will\nreplace the previous one.

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(10):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write(":material/check: 10 seconds over!")\nst.button("Rerun")\n
\n

You can use an st.empty to replace multiple elements in\nsuccession. Use st.container inside st.empty to display (and\nlater replace) a group of elements.

\n
\nimport streamlit as st\nimport time\n\nst.button("Start over")\n\nplaceholder = st.empty()\nplaceholder.markdown("Hello")\ntime.sleep(1)\n\nplaceholder.progress(0, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(50, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(100, "Wait for it...")\ntime.sleep(1)\n\nwith placeholder.container():\n    st.line_chart({"data": [1, 5, 2, 6]})\n    time.sleep(1)\n    st.markdown("3...")\n    time.sleep(1)\n    st.markdown("2...")\n    time.sleep(1)\n    st.markdown("1...")\n    time.sleep(1)\n\nplaceholder.markdown("Poof!")\ntime.sleep(1)\n\nplaceholder.empty()\n
\n
\n", + "examples": "

Inside a with st.empty(): block, each displayed element will\nreplace the previous one.

\n
\nimport streamlit as st\nimport time\n\nwith st.empty():\n    for seconds in range(10):\n        st.write(f"\u23f3 {seconds} seconds have passed")\n        time.sleep(1)\n    st.write(":material/check: 10 seconds over!")\nst.button("Rerun")\n
\n

You can use an st.empty to replace multiple elements in\nsuccession. Use st.container inside st.empty to display (and\nlater replace) a group of elements.

\n
\nimport streamlit as st\nimport time\n\nst.button("Start over")\n\nplaceholder = st.empty()\nplaceholder.markdown("Hello")\ntime.sleep(1)\n\nplaceholder.progress(0, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(50, "Wait for it...")\ntime.sleep(1)\nplaceholder.progress(100, "Wait for it...")\ntime.sleep(1)\n\nwith placeholder.container():\n    st.line_chart({"data": [1, 5, 2, 6]})\n    time.sleep(1)\n    st.markdown("3...")\n    time.sleep(1)\n    st.markdown("2...")\n    time.sleep(1)\n    st.markdown("1...")\n    time.sleep(1)\n\nplaceholder.markdown("Poof!")\ntime.sleep(1)\n\nplaceholder.empty()\n
\n", "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", "signature": "st.error(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.error('This is an error', icon="\ud83d\udea8")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.error('This is an error', icon="\ud83d\udea8")\n
\n", "description": "

Display error message.

\n", "args": [ { @@ -162692,12 +173493,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", "signature": "st.exception(exception)", - "example": "
\n
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n
\n", + "example": "
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n", "description": "

Display an exception.

\n", "args": [ { @@ -162710,12 +173511,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/exception.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/exception.py#L42" }, "streamlit.expander": { "name": "expander", "signature": "st.expander(label, expanded=False, *, icon=None)", - "examples": "
\n

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n
\n", + "examples": "

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n", "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", "args": [ { @@ -162744,7 +173545,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L490" }, "streamlit.experimental_audio_input": { "name": "experimental_audio_input", @@ -162752,7 +173553,7 @@ "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/audio_input.py#L204" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/audio_input.py#L204" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -162760,7 +173561,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -162768,12 +173569,12 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/fragment.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/fragment.py#L470" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", "signature": "st.experimental_get_query_params()", - "example": "
\n

Let's say the user's web browser is at\nhttp://localhost:8501/?show_map=True&selected=asia&selected=america.\nThen, you can get the query parameters using the following:

\n
\nimport streamlit as st\n\nst.experimental_get_query_params()\n{"show_map": ["True"], "selected": ["asia", "america"]}\n
\n

Note that the values in the returned dict are always lists. This is\nbecause we internally use Python's urllib.parse.parse_qs(), which behaves\nthis way. And this behavior makes sense when you consider that every item\nin a query string is potentially a 1-element array.

\n
\n", + "example": "

Let's say the user's web browser is at\nhttp://localhost:8501/?show_map=True&selected=asia&selected=america.\nThen, you can get the query parameters using the following:

\n
\nimport streamlit as st\n\nst.experimental_get_query_params()\n{"show_map": ["True"], "selected": ["asia", "america"]}\n
\n

Note that the values in the returned dict are always lists. This is\nbecause we internally use Python's urllib.parse.parse_qs(), which behaves\nthis way. And this behavior makes sense when you consider that every item\nin a query string is potentially a 1-element array.

\n", "description": "

Return the query parameters that is currently showing in the browser's URL bar.

\n", "args": [], "returns": [ @@ -162784,12 +173585,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", "signature": "st.experimental_set_query_params(**query_params)", - "example": "
\n

To point the user's web browser to something like\n"http://localhost:8501/?show_map=True&selected=asia&selected=america",\nyou would do the following:

\n
\nimport streamlit as st\n\nst.experimental_set_query_params(\n    show_map=True,\n    selected=["asia", "america"],\n)\n
\n
\n", + "example": "

To point the user's web browser to something like\n"http://localhost:8501/?show_map=True&selected=asia&selected=america",\nyou would do the following:

\n
\nimport streamlit as st\n\nst.experimental_set_query_params(\n    show_map=True,\n    selected=["asia", "america"],\n)\n
\n", "description": "

Set the query parameters that are shown in the browser's URL bar.

\n
\n

Warning

\n

Query param embed cannot be set using this method.

\n
\n", "args": [ { @@ -162802,12 +173603,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", "signature": "st.feedback(options=\"thumbs\", *, key=None, disabled=False, on_change=None, args=None, kwargs=None)", - "examples": "
\n

Display a feedback widget with stars, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = ["one", "two", "three", "four", "five"]\nselected = st.feedback("stars")\nif selected is not None:\n    st.markdown(f"You selected {sentiment_mapping[selected]} star(s).")\n
\n

Display a feedback widget with thumbs, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = [":material/thumb_down:", ":material/thumb_up:"]\nselected = st.feedback("thumbs")\nif selected is not None:\n    st.markdown(f"You selected: {sentiment_mapping[selected]}")\n
\n
\n", + "examples": "

Display a feedback widget with stars, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = ["one", "two", "three", "four", "five"]\nselected = st.feedback("stars")\nif selected is not None:\n    st.markdown(f"You selected {sentiment_mapping[selected]} star(s).")\n
\n

Display a feedback widget with thumbs, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = [":material/thumb_down:", ":material/thumb_up:"]\nselected = st.feedback("thumbs")\nif selected is not None:\n    st.markdown(f"You selected: {sentiment_mapping[selected]}")\n
\n", "description": "

Display a feedback widget.

\n

A feedback widget is an icon-based button group available in three\nstyles, as described in options. It is commonly used in chat and AI\napps to allow users to rate responses.

\n", "args": [ { @@ -162867,13 +173668,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Choose a CSV file", accept_multiple_files=True\n)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n
\n", - "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200MB. You can configure\nthis using the server.maxUploadSize config option. For more info\non how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml

\n", + "examples": "

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Choose a CSV file", accept_multiple_files=True\n)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n", + "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option. For\nmore information on how to set config options, see config.toml.

\n", "args": [ { "name": "label", @@ -162888,16 +173689,16 @@ "type_name": "str or list of str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Array of allowed extensions. ['png', 'jpg']\nThe default is None, which means all extensions are allowed.

\n", - "default": "None" + "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n", + "default": null }, { "name": "accept_multiple_files", "type_name": "bool", "is_optional": false, "is_kwarg_only": false, - "description": "

If True, allows the user to upload multiple files at the same time,\nin which case the return value will be a list of files.\nDefault: False

\n", - "default": "False" + "description": "

Whether to accept more than one file in a submission. If this is\nFalse (default), the user can only submit one file at a time.\nIf this is True, the user can upload multiple files at the same\ntime, in which case the return value will be a list of files.

\n", + "default": null }, { "name": "key", @@ -162958,18 +173759,18 @@ ], "returns": [ { - "type_name": "None or UploadedFile or list of UploadedFile", + "type_name": "None, UploadedFile, or list of UploadedFile", "is_generator": false, "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True, returns a list with the\nuploaded files as UploadedFile objects. If no files were\nuploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/file_uploader.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/file_uploader.py#L222" }, "streamlit.form": { "name": "form", "signature": "st.form(key, clear_on_submit=False, *, enter_to_submit=True, border=True)", - "examples": "
\n

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n    st.write("Inside the form")\n    slider_val = st.slider("Form slider")\n    checkbox_val = st.checkbox("Form checkbox")\n\n    # Every form must have a submit button.\n    submitted = st.form_submit_button("Submit")\n    if submitted:\n        st.write("slider", slider_val, "checkbox", checkbox_val)\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n
\n", + "examples": "

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n    st.write("Inside the form")\n    slider_val = st.slider("Form slider")\n    checkbox_val = st.checkbox("Form checkbox")\n\n    # Every form must have a submit button.\n    submitted = st.form_submit_button("Submit")\n    if submitted:\n        st.write("slider", slider_val, "checkbox", checkbox_val)\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n", "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ { @@ -163006,7 +173807,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -163094,12 +173895,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", "signature": "st.fragment(func=None, *, run_every=None)", - "examples": "
\n

The following example demonstrates basic usage of\n@st.fragment. As an analogy, "inflating balloons" is a slow process that happens\noutside of the fragment. "Releasing balloons" is a quick process that happens inside\nof the fragment.

\n
\nimport streamlit as st\nimport time\n\n@st.fragment\ndef release_the_balloons():\n    st.button("Release the balloons", help="Fragment rerun")\n    st.balloons()\n\nwith st.spinner("Inflating balloons..."):\n    time.sleep(5)\nrelease_the_balloons()\nst.button("Inflate more balloons", help="Full rerun")\n
\n

This next example demonstrates how elements both inside and outside of a\nfragement update with each app or fragment rerun. In this app, clicking\n"Rerun full app" will increment both counters and update all values\ndisplayed in the app. In contrast, clicking "Rerun fragment" will only\nincrement the counter within the fragment. In this case, the st.write\ncommand inside the fragment will update the app's frontend, but the two\nst.write commands outside the fragment will not update the frontend.

\n
\nimport streamlit as st\n\nif "app_runs" not in st.session_state:\n    st.session_state.app_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.fragment\ndef my_fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.app_runs += 1\nmy_fragment()\nst.button("Rerun full app")\nst.write(f"Full app says it ran {st.session_state.app_runs} times.")\nst.write(f"Full app sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger an app rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n
\n", + "examples": "

The following example demonstrates basic usage of\n@st.fragment. As an analogy, "inflating balloons" is a slow process that happens\noutside of the fragment. "Releasing balloons" is a quick process that happens inside\nof the fragment.

\n
\nimport streamlit as st\nimport time\n\n@st.fragment\ndef release_the_balloons():\n    st.button("Release the balloons", help="Fragment rerun")\n    st.balloons()\n\nwith st.spinner("Inflating balloons..."):\n    time.sleep(5)\nrelease_the_balloons()\nst.button("Inflate more balloons", help="Full rerun")\n
\n

This next example demonstrates how elements both inside and outside of a\nfragement update with each app or fragment rerun. In this app, clicking\n"Rerun full app" will increment both counters and update all values\ndisplayed in the app. In contrast, clicking "Rerun fragment" will only\nincrement the counter within the fragment. In this case, the st.write\ncommand inside the fragment will update the app's frontend, but the two\nst.write commands outside the fragment will not update the frontend.

\n
\nimport streamlit as st\n\nif "app_runs" not in st.session_state:\n    st.session_state.app_runs = 0\n    st.session_state.fragment_runs = 0\n\n@st.fragment\ndef my_fragment():\n    st.session_state.fragment_runs += 1\n    st.button("Rerun fragment")\n    st.write(f"Fragment says it ran {st.session_state.fragment_runs} times.")\n\nst.session_state.app_runs += 1\nmy_fragment()\nst.button("Rerun full app")\nst.write(f"Full app says it ran {st.session_state.app_runs} times.")\nst.write(f"Full app sees that fragment ran {st.session_state.fragment_runs} times.")\n
\n

You can also trigger an app rerun from inside a fragment by calling\nst.rerun.

\n
\nimport streamlit as st\n\nif "clicks" not in st.session_state:\n    st.session_state.clicks = 0\n\n@st.fragment\ndef count_to_five():\n    if st.button("Plus one!"):\n        st.session_state.clicks += 1\n        if st.session_state.clicks % 5 == 0:\n            st.rerun()\n    return\n\ncount_to_five()\nst.header(f"Multiples of five clicks: {st.session_state.clicks // 5}")\n\nif st.button("Check click count"):\n    st.toast(f"## Total clicks: {st.session_state.clicks}")\n
\n", "description": "

Decorator to turn a function into a fragment which can rerun independently of the full app.

\n

When a user interacts with an input widget created inside a fragment,\nStreamlit only reruns the fragment instead of the full app. If\nrun_every is set, Streamlit will also rerun the fragment at the\nspecified interval while the session is active, even if the user is not\ninteracting with your app.

\n

To trigger an app rerun from inside a fragment, call st.rerun()\ndirectly. To trigger a fragment rerun from within itself, call\nst.rerun(scope="fragment"). Any values from the fragment that need to\nbe accessed from the wider app should generally be stored in Session State.

\n

When Streamlit element commands are called directly in a fragment, the\nelements are cleared and redrawn on each fragment rerun, just like all\nelements are redrawn on each app rerun. The rest of the app is persisted\nduring a fragment rerun. When a fragment renders elements into externally\ncreated containers, the elements will not be cleared with each fragment\nrerun. Instead, elements will accumulate in those containers with each\nfragment rerun, until the next app rerun.

\n

Calling st.sidebar in a fragment is not supported. To write elements to\nthe sidebar with a fragment, call your fragment function inside a\nwith st.sidebar context manager.

\n

Fragment code can interact with Session State, imported modules, and\nother Streamlit elements created outside the fragment. Note that these\ninteractions are additive across multiple fragment reruns. You are\nresponsible for handling any side effects of that behavior.

\n
\n

Warning

\n
    \n
  • Fragments can only contain widgets in their main body. Fragments\ncan't render widgets to externally created containers.
  • \n
\n
\n", "args": [ { @@ -163120,12 +173921,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/fragment.py#L307" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/fragment.py#L305" }, "streamlit.get_option": { "name": "get_option", "signature": "st.get_option(key)", - "example": "
\n
\nimport streamlit as st\n\ncolor = st.get_option("theme.primaryColor")\n
\n
\n", + "example": "
\nimport streamlit as st\n\ncolor = st.get_option("theme.primaryColor")\n
\n", "description": "

Return the current value of a given Streamlit configuration option.

\n

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

\n", "args": [ { @@ -163138,12 +173939,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/config.py#L163" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/config.py#L163" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge("run", "intr")\ngraph.edge("intr", "runbl")\ngraph.edge("runbl", "run")\ngraph.edge("run", "kernel")\ngraph.edge("kernel", "zombie")\ngraph.edge("kernel", "sleep")\ngraph.edge("kernel", "runmem")\ngraph.edge("sleep", "swap")\ngraph.edge("swap", "runswap")\ngraph.edge("runswap", "new")\ngraph.edge("runswap", "runmem")\ngraph.edge("new", "runmem")\ngraph.edge("sleep", "runmem")\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n
\n", + "example": "
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge("run", "intr")\ngraph.edge("intr", "runbl")\ngraph.edge("runbl", "run")\ngraph.edge("run", "kernel")\ngraph.edge("kernel", "zombie")\ngraph.edge("kernel", "sleep")\ngraph.edge("kernel", "runmem")\ngraph.edge("sleep", "swap")\ngraph.edge("swap", "runswap")\ngraph.edge("runswap", "new")\ngraph.edge("runswap", "runmem")\ngraph.edge("new", "runmem")\ngraph.edge("sleep", "runmem")\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n", "description": "

Display a graph using the dagre-d3 library.

\n", "args": [ { @@ -163164,12 +173965,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/graphviz_chart.py#L41" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", "signature": "st.header(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.header("_Streamlit_ is :blue[cool] :sunglasses:")\nst.header("This is a header with a divider", divider="gray")\nst.header("These headers have rotating dividers", divider=True)\nst.header("One", divider=True)\nst.header("Two", divider=True)\nst.header("Three", divider=True)\nst.header("Four", divider=True)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nst.header("_Streamlit_ is :blue[cool] :sunglasses:")\nst.header("This is a header with a divider", divider="gray")\nst.header("These headers have rotating dividers", divider=True)\nst.header("One", divider=True)\nst.header("Two", divider=True)\nst.header("Three", divider=True)\nst.header("Four", divider=True)\n
\n", "description": "

Display text in header formatting.

\n", "args": [ { @@ -163206,12 +174007,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", "signature": "st.help(obj=)", - "example": "
\n

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n
\n", + "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ { @@ -163224,12 +174025,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", "signature": "st.html(body)", - "example": "
\n
\nimport streamlit as st\n\nst.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n", "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", "args": [ { @@ -163242,12 +174043,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/html.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/html.py#L31" }, "streamlit.image": { "name": "image", "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\", *, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\nst.image("sunrise.jpg", caption="Sunrise by the mountains")\n
\n
\n", + "example": "
\nimport streamlit as st\nst.image("sunrise.jpg", caption="Sunrise by the mountains")\n
\n", "description": "

Display an image or list of images.

\n", "args": [ { @@ -163320,12 +174121,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", "signature": "st.info(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.info('This is a purely informational message', icon="\u2139\ufe0f")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.info('This is a purely informational message', icon="\u2139\ufe0f")\n
\n", "description": "

Display an informational message.

\n", "args": [ { @@ -163346,12 +174147,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L130" }, "streamlit.json": { "name": "json", "signature": "st.json(body, *, expanded=True)", - "example": "
\n
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n        ],\n        "level1": {"level2": {"level3": {"a": "b"}}},\n    },\n    expanded=2,\n)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n        ],\n        "level1": {"level2": {"level3": {"a": "b"}}},\n    },\n    expanded=2,\n)\n
\n", "description": "

Display an object or string as a pretty-printed, interactive JSON string.

\n", "args": [ { @@ -163372,12 +174173,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/json.py#L42" }, "streamlit.latex": { "name": "latex", "signature": "st.latex(body, *, help=None)", - "example": "
\n
\nimport streamlit as st\n\nst.latex(r'''\n    a + ar + a r^2 + a r^3 + \\cdots + a r^{n-1} =\n    \\sum_{k=0}^{n-1} ar^k =\n    a \\left(\\frac{1-r^{n}}{1-r}\\right)\n    ''')\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.latex(r'''\n    a + ar + a r^2 + a r^3 + \\cdots + a r^{n-1} =\n    \\sum_{k=0}^{n-1} ar^k =\n    a \\left(\\frac{1-r^{n}}{1-r}\\right)\n    ''')\n
\n", "description": "

Display mathematical expressions formatted as LaTeX.

\n

Supported LaTeX functions are listed at\nhttps://katex.org/docs/supported.html.

\n", "args": [ { @@ -163398,12 +174199,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L240" }, "streamlit.line_chart": { "name": "line_chart", "signature": "st.line_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.line_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n
\n", + "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.line_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n", "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -163480,12 +174281,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L562" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L559" }, "streamlit.link_button": { "name": "link_button", "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "example": "
\n
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n", "description": "

Display a link button element.

\n

When clicked, a new tab will be opened to the specified URL. This will\ncreate a new session for the user if directed within the app.

\n", "args": [ { @@ -163546,12 +174347,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L470" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L546" }, "streamlit.login": { "name": "login", "signature": "st.login(provider=None)", - "examples": "
\n

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.experimental_user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!)\n
\n
\n", + "examples": "

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"  # fmt: skip\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.experimental_user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!)\n
\n", "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.experimental_user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.experimental_user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command.
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.
  • \n
  • For security reasons, authentication is not supported for embedded\napps.
  • \n
\n
\n", "args": [ { @@ -163559,12 +174360,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The name of your provider configuration to use for login.

\n

If provider is None (default), Streamlit will use all settings\nin the [auth] dictionary within your app's secrets.toml file.\nOtherwise, use an [auth.{provider}] dictionary for the named\nprovider, as shown in the examples that follow. When you pass a string\nto provider, Streamlit will use redirect_uri and\ncookie_secret, while ignoring any other values in the [auth]\ndictionary.

\n", + "description": "

The name of your provider configuration to use for login.

\n

If provider is None (default), Streamlit will use all settings\nin the [auth] dictionary within your app's secrets.toml file.\nOtherwise, use an [auth.{provider}] dictionary for the named\nprovider, as shown in the examples that follow. When you pass a string\nto provider, Streamlit will use redirect_uri and\ncookie_secret, while ignoring any other values in the [auth]\ndictionary.

\n

Due to internal implementation details, Streamlit does not support\nusing an underscore within provider at this time.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L50" }, "streamlit.logo": { "name": "logo", @@ -163606,21 +174407,21 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.logout": { "name": "logout", "signature": "st.logout()", - "example": "
\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n
\n", + "example": "

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n", "description": "

Logout the current user.

\n

This command removes the user's information from st.experimental_user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.experimental_user will not be cleared in any other session.\nst.experimental_user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.experimental_user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L291" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L289" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True, width=None, height=None)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n
\n", + "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n", "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { @@ -163697,12 +174498,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/map.py#L76" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n", "description": "

Display string formatted as Markdown.

\n", "args": [ { @@ -163710,7 +174511,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
  • Small text, using the syntax :small[text to show small].
  • \n
\n", "default": "primary" }, { @@ -163731,12 +174532,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False)", - "examples": "
\n

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n
\n", + "examples": "

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ { @@ -163797,12 +174598,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n
\n", + "example": "
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ { @@ -163918,28 +174719,28 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/multiselect.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/multiselect.py#L106" }, "streamlit.navigation": { "name": "navigation", "signature": "st.navigation(pages, *, position=\"sidebar\", expanded=False)", - "examples": "

The following examples show possible entrypoint files, which is the file\nyou pass to streamlit run. Your entrypoint file manages your app's\nnavigation and serves as a router between pages.

\n

Example 1: Use a callable or Python file as a page

\n

You can declare pages from callables or file paths.

\n

page_1.py (in the same directory as your entrypoint file):

\n
\nimport streamlit as st\n\nst.title("Page 1")\n
\n

Your entrypoint file:

\n
\nimport streamlit as st\n\ndef page_2():\n    st.title("Page 2")\n\npg = st.navigation([st.Page("page_1.py"), st.Page(page_2)])\npg.run()\n
\n

Example 2: Group pages into sections

\n

You can use a dictionary to create sections within your navigation menu. In\nthe following example, each page is similar to Page 1 in Example 1, and all\npages are in the same directory. However, you can use Python files from\nanywhere in your repository. For more information, see st.Page.

\n

Directory structure:

\n
\nyour_repository/\n\u251c\u2500\u2500 create_account.py\n\u251c\u2500\u2500 learn.py\n\u251c\u2500\u2500 manage_account.py\n\u251c\u2500\u2500 streamlit_app.py\n\u2514\u2500\u2500 trial.py\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Example 3: Stateful widgets across multiple pages

\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([st.Page(page1), st.Page(page2)])\npg.run()\n
\n", - "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file with one or more pages\ndefined by st.Page. st.navigation returns the current page, which\ncan be executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation draws the available pages in the\nside navigation if there is more than one page. This behavior can be\nchanged using the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", + "examples": "

The following examples show different possible entrypoint files, each named\nstreamlit_app.py. An entrypoint file is passed to streamlit run. It\nmanages your app's navigation and serves as a router between pages.

\n

Example 1: Use a callable or Python file as a page

\n

You can declare pages from callables or file paths. If you pass callables\nor paths to st.navigation as a page-like objects, they are internally\nconverted to StreamlitPage objects using st.Page. In this case, the\npage titles, icons, and paths are inferred from the file or callable names.

\n

page_1.py (in the same directory as your entrypoint file):

\n
\nimport streamlit as st\n\nst.title("Page 1")\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page_2():\n    st.title("Page 2")\n\npg = st.navigation(["page_1.py", page_2])\npg.run()\n
\n

Example 2: Group pages into sections and customize them with ``st.Page``

\n

You can use a dictionary to create sections within your navigation menu. In\nthe following example, each page is similar to Page 1 in Example 1, and all\npages are in the same directory. However, you can use Python files from\nanywhere in your repository. st.Page is used to give each page a custom\ntitle. For more information, see st.Page.

\n

Directory structure:

\n
\nyour_repository/\n\u251c\u2500\u2500 create_account.py\n\u251c\u2500\u2500 learn.py\n\u251c\u2500\u2500 manage_account.py\n\u251c\u2500\u2500 streamlit_app.py\n\u2514\u2500\u2500 trial.py\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Example 3: Stateful widgets across multiple pages

\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([page1, page2])\npg.run()\n
\n", + "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file to define the available\npages for your app. st.navigation returns the current page, which can\nbe executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation displays the available pages in\nthe sidebar if there is more than one page. This behavior can be changed\nusing the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", "args": [ { "name": "pages", - "type_name": "list[StreamlitPage] or dict[str, list[StreamlitPage]]", + "type_name": "list[page-like], dict[str, list[page-like]]", "is_optional": false, "is_kwarg_only": false, - "description": "

The available pages for the app.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of StreamlitPage objects for\nthat section.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of StreamlitPage objects.

\n

Use st.Page to create StreamlitPage objects.

\n", - "default": null + "description": "

The available pages for the app.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of page-like objects. Page-like objects are\nanything that can be passed to st.Page or a StreamlitPage\nobject returned by st.Page.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of page-like objects for\nthat section.

\n

When you use a string or path as a page-like object, they are\ninternally passed to st.Page and converted to StreamlitPage\nobjects. In this case, the page will have the default title, icon, and\npath inferred from its path or filename. To customize these attributes\nfor your page, initialize your page with st.Page.

\n", + "default": "title" }, { "name": "position", "type_name": "\"sidebar\" or \"hidden\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The position of the navigation menu. If position is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nposition is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", + "description": "

The position of the navigation menu. If this is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nthis is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", "default": null }, { @@ -163955,16 +174756,16 @@ { "type_name": "StreamlitPage", "is_generator": false, - "description": "

The current page selected by the user.

\n", + "description": "

The current page selected by the user. To run the page, you must use\nthe .run() method on it.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/navigation.py#L56" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/navigation.py#L81" }, "streamlit.number_input": { "name": "number_input", "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input(\n    "Insert a number", value=None, placeholder="Type a number..."\n)\nst.write("The current number is ", number)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input(\n    "Insert a number", value=None, placeholder="Type a number..."\n)\nst.write("The current number is ", number)\n
\n", "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -164012,7 +174813,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. The output must be purely numeric. This does not\nimpact the return value of the widget. Formatting is handled by\nsprintf.js.

\n

For example, format="%0.1f" adjusts the displayed decimal\nprecision to only show one digit after the decimal.

\n", + "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. The output must be purely numeric. This does not\nimpact the return value of the widget. For more information about\nthe formatting specification, see sprintf.js.

\n

For example, format="%0.1f" adjusts the displayed decimal\nprecision to only show one digit after the decimal.

\n", "default": null }, { @@ -164088,12 +174889,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n
\n", + "example": "

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ { @@ -164146,12 +174947,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button.py#L587" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L663" }, "streamlit.pills": { "name": "pills", "signature": "st.pills(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", - "examples": "
\n

Example 1: Multi-select pills

\n

Display a multi-select pills widget, and show the selection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.pills("Directions", options, selection_mode="multi")\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select pills with icons

\n

Display a single-select pills widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.pills(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n
\n", + "examples": "

Example 1: Multi-select pills

\n

Display a multi-select pills widget, and show the selection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.pills("Directions", options, selection_mode="multi")\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select pills with icons

\n

Display a single-select pills widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.pills(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n", "description": "

Display a pills widget.

\n

A pills widget is similar to a st.selectbox or st.multiselect\nwhere the options are displayed as pill-buttons instead of a\ndrop-down list.

\n", "args": [ { @@ -164259,12 +175060,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L423" }, "streamlit.plotly_chart": { "name": "plotly_chart", "signature": "st.plotly_chart(figure_or_data, use_container_width=True, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", - "example": "
\n

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n
\n", + "example": "

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n", "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly to use this command. Your app's\nperformance may be enhanced by installing orjson as well.

\n
\n", "args": [ { @@ -164332,12 +175133,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", "signature": "st.popover(label, *, help=None, icon=None, disabled=False, use_container_width=False)", - "examples": "
\n

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n
\n", + "examples": "

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n", "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", "args": [ { @@ -164382,12 +175183,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L604" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L605" }, "streamlit.progress": { "name": "progress", "signature": "st.progress(value, text=None)", - "example": "
\n

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n
\n", + "example": "

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n", "description": "

Display a progress bar.

\n", "args": [ { @@ -164408,12 +175209,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=True, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", - "example": "
\n

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n
\n", + "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", "args": [ { @@ -164481,12 +175282,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" }, "streamlit.pyplot": { "name": "pyplot", "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n
\n", + "example": "
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n", "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib to use this command.

\n
\n", "args": [ { @@ -164523,12 +175324,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions=[\n        "Laugh out loud.",\n        "Get the popcorn.",\n        "Never stop learning.",\n    ],\n)\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n
\n", + "example": "
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions=[\n        "Laugh out loud.",\n        "Get the popcorn.",\n        "Never stop learning.",\n    ],\n)\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n", "description": "

Display a radio button widget.

\n", "args": [ { @@ -164644,7 +175445,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/radio.py#L122" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/radio.py#L124" }, "streamlit.rerun": { "name": "rerun", @@ -164661,12 +175462,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L102" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L104" }, "streamlit.scatter_chart": { "name": "scatter_chart", "signature": "st.scatter_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, size=None, width=None, height=None, use_container_width=True)", - "examples": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\nchart_data["col4"] = np.random.choice(["A", "B", "C"], 20)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y="col2",\n    color="col4",\n    size="col3",\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"]\n)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    size="col4",\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n
\n", + "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\nchart_data["col4"] = np.random.choice(["A", "B", "C"], 20)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y="col2",\n    color="col4",\n    size="col3",\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"]\n)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    size="col4",\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n", "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -164751,12 +175552,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1265" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1262" }, "streamlit.segmented_control": { "name": "segmented_control", "signature": "st.segmented_control(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", - "examples": "
\n

Example 1: Multi-select segmented control

\n

Display a multi-select segmented control widget, and show the\nselection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.segmented_control(\n    "Directions", options, selection_mode="multi"\n)\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select segmented control with icons

\n

Display a single-select segmented control widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.segmented_control(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n
\n", + "examples": "

Example 1: Multi-select segmented control

\n

Display a multi-select segmented control widget, and show the\nselection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.segmented_control(\n    "Directions", options, selection_mode="multi"\n)\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select segmented control with icons

\n

Display a single-select segmented control widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.segmented_control(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n", "description": "

Display a segmented control widget.

\n

A segmented control widget is a linear set of segments where each of\nthe passed options functions like a toggle button.

\n", "args": [ { @@ -164864,7 +175665,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/button_group.py#L634" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L634" }, "streamlit.select_slider": { "name": "select_slider", @@ -164969,12 +175770,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/select_slider.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/select_slider.py#L159" }, "streamlit.selectbox": { "name": "selectbox", "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n
\n", + "example": "
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n", "description": "

Display a select widget.

\n", "args": [ { @@ -165082,12 +175883,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/selectbox.py#L113" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/selectbox.py#L115" }, "streamlit.set_option": { "name": "set_option", "signature": "st.set_option(key, value)", - "example": "
\n
\nimport streamlit as st\n\nst.set_option("client.showErrorDetails", True)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.set_option("client.showErrorDetails", True)\n
\n", "description": "

Set a configuration option.

\n

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

\n
\n
    \n
  • client.showErrorDetails
  • \n
  • client.showSidebarNavigation
  • \n
  • client.toolbarMode
  • \n
\n
\n

Calling st.set_option with any other option will raise a\nStreamlitAPIException. When changing a configuration option in a\nrunning app, you may need to trigger a rerun after changing the option to\nsee the effects.

\n

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

\n", "args": [ { @@ -165108,7 +175909,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/config.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/config.py#L115" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -165129,7 +175930,7 @@ "type_name": "Anything supported by st.image (except list), str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (except list), the\nfollowing strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above. Emoji icons are\ncourtesy of Twemoji and loaded from MaxCDN.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", + "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (except list), the\nfollowing strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, page_icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", "default": null }, { @@ -165158,12 +175959,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/page_config.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/page_config.py#L133" }, "streamlit.slider": { "name": "slider", "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "examples": "
\n
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider("Select a range of values", 0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:", value=(time(11, 30), time(12, 45))\n)\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm",\n)\nst.write("Start time:", start_time)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider("Select a range of values", 0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:", value=(time(11, 30), time(12, 45))\n)\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm",\n)\nst.write("Start time:", start_time)\n
\n", "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { @@ -165211,7 +176012,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. This does not impact the return value.\nFormatter for int/float supports: %d %e %f %g %i\nFormatter for date/time/datetime uses Moment.js notation:\nhttps://momentjs.com/docs/#/displaying/format/

\n", + "description": "

A printf-style format string controlling how the interface should\ndisplay numbers. This does not impact the return value.

\n

For information about formatting integers and floats, see\nsprintf.js.\nFor example, format="%0.1f" adjusts the displayed decimal\nprecision to only show one digit after the decimal.

\n

For information about formatting datetimes, dates, and times, see\nmomentJS.\nFor example, format="ddd ha" adjusts the displayed datetime to\nshow the day of the week and the hour ("Tue 8pm").

\n", "default": null }, { @@ -165279,21 +176080,21 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/slider.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/slider.py#L332" }, "streamlit.snow": { "name": "snow", "signature": "st.snow()", - "example": "
\n
\nimport streamlit as st\n\nst.snow()\n
\n

...then watch your app and get ready for a cool celebration!

\n
\n", + "example": "
\nimport streamlit as st\n\nst.snow()\n
\n

...then watch your app and get ready for a cool celebration!

\n", "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", "signature": "st.spinner(text=\"In progress...\", *, show_time=False)", - "example": "
\n
\nimport streamlit as st\nimport time\n\nwith st.spinner("Wait for it...", show_time=True):\n    time.sleep(5)\nst.success("Done!")\nst.button("Rerun")\n
\n
\n", + "example": "
\nimport streamlit as st\nimport time\n\nwith st.spinner("Wait for it...", show_time=True):\n    time.sleep(5)\nst.success("Done!")\nst.button("Rerun")\n
\n", "description": "

Display a loading spinner while executing a block of code.

\n", "args": [ { @@ -165314,12 +176115,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/spinner.py#L25" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/spinner.py#L28" }, "streamlit.status": { "name": "status", "signature": "st.status(label, *, expanded=False, state=\"running\")", - "examples": "
\n

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(\n        label="Download complete!", state="complete", expanded=False\n    )\n\nst.button("Rerun")\n
\n
\n", + "examples": "

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(\n        label="Download complete!", state="complete", expanded=False\n    )\n\nst.button("Rerun")\n
\n", "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", "args": [ { @@ -165355,21 +176156,21 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L745" }, "streamlit.stop": { "name": "stop", "signature": "st.stop()", - "example": "
\n
\nimport streamlit as st\n\nname = st.text_input("Name")\nif not name:\n  st.warning('Please input a name.')\n  st.stop()\nst.success("Thank you for inputting a name.")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nname = st.text_input("Name")\nif not name:\n  st.warning('Please input a name.')\n  st.stop()\nst.success("Thank you for inputting a name.")\n
\n", "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", "signature": "st.subheader(body, anchor=None, *, help=None, divider=False)", - "examples": "
\n
\nimport streamlit as st\n\nst.subheader("_Streamlit_ is :blue[cool] :sunglasses:")\nst.subheader("This is a subheader with a divider", divider="gray")\nst.subheader("These subheaders have rotating dividers", divider=True)\nst.subheader("One", divider=True)\nst.subheader("Two", divider=True)\nst.subheader("Three", divider=True)\nst.subheader("Four", divider=True)\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nst.subheader("_Streamlit_ is :blue[cool] :sunglasses:")\nst.subheader("This is a subheader with a divider", divider="gray")\nst.subheader("These subheaders have rotating dividers", divider=True)\nst.subheader("One", divider=True)\nst.subheader("Two", divider=True)\nst.subheader("Three", divider=True)\nst.subheader("Four", divider=True)\n
\n", "description": "

Display text in subheader formatting.

\n", "args": [ { @@ -165406,12 +176207,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L115" }, "streamlit.success": { "name": "success", "signature": "st.success(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.success('This is a success message!', icon="\u2705")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.success('This is a success message!', icon="\u2705")\n
\n", "description": "

Display a success message.

\n", "args": [ { @@ -165432,12 +176233,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L181" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L181" }, "streamlit.switch_page": { "name": "switch_page", "signature": "st.switch_page(page)", - "example": "
\n

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n
\n", + "example": "

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nif st.button("Home"):\n    st.switch_page("your_app.py")\nif st.button("Page 1"):\n    st.switch_page("pages/page_1.py")\nif st.button("Page 2"):\n    st.switch_page("pages/page_2.py")\n
\n", "description": "

Programmatically switch the current page in a multipage app.

\n

When st.switch_page is called, the current page execution stops and\nthe specified page runs as if the user clicked on it in the sidebar\nnavigation. The specified page must be recognized by Streamlit's multipage\narchitecture (your main Python file or a Python file in a pages/\nfolder). Arbitrary Python scripts cannot be passed to st.switch_page.

\n", "args": [ { @@ -165450,12 +176251,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/commands/execution_control.py#L154" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L156" }, "streamlit.table": { "name": "table", "signature": "st.table(data=None)", - "examples": "
\n

Example 1: Display a simple dataframe as a static table

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n

Example 2: Display a table of Markdown strings

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        "Command": ["**st.table**", "*st.dataframe*"],\n        "Type": ["`static`", "`interactive`"],\n        "Docs": [\n            "[:rainbow[docs]](https://docs.streamlit.io/develop/api-reference/data/st.dataframe)",\n            "[:book:](https://docs.streamlit.io/develop/api-reference/data/st.table)",\n        ],\n    }\n)\nst.table(df)\n
\n
\n", + "examples": "

Example 1: Display a simple dataframe as a static table

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n

Example 2: Display a table of Markdown strings

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        "Command": ["**st.table**", "*st.dataframe*"],\n        "Type": ["`static`", "`interactive`"],\n        "Docs": [\n            "[:rainbow[docs]](https://docs.streamlit.io/develop/api-reference/data/st.dataframe)",\n            "[:book:](https://docs.streamlit.io/develop/api-reference/data/st.table)",\n        ],\n    }\n)\nst.table(df)\n
\n", "description": "

Display a static table.

\n

While st.dataframe is geared towards large datasets and interactive\ndata exploration, st.table is useful for displaying small, styled\ntables without sorting or scrolling. For example, st.table may be\nthe preferred way to display a confusion matrix or leaderboard.\nAdditionally, st.table supports Markdown.

\n", "args": [ { @@ -165468,12 +176269,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L652" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs)", - "examples": "
\n

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n
\n", + "examples": "

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n", "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", "args": [ { @@ -165493,12 +176294,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/layouts.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L385" }, "streamlit.text": { "name": "text", "signature": "st.text(body, *, help=None)", - "example": "
\n
\nimport streamlit as st\n\nst.text("This is text\\n[and more text](that's not a Markdown link).")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.text("This is text\\n[and more text](that's not a Markdown link).")\n
\n", "description": "

Write text without Markdown or HTML parsing.

\n

For monospace text, use st.code.

\n", "args": [ { @@ -165519,12 +176320,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n)\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n
\n", + "example": "
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n)\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n", "description": "

Display a multi-line text input widget.

\n", "args": [ { @@ -165632,12 +176433,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/text_widgets.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/text_widgets.py#L396" }, "streamlit.text_input": { "name": "text_input", "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n
\n", + "example": "
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n", "description": "

Display a single-line text input widget.

\n", "args": [ { @@ -165753,12 +176554,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00)", - "example": "
\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n
\n", + "example": "
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n", "description": "

Display a time input widget.

\n", "args": [ { @@ -165850,12 +176651,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/time_widgets.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/time_widgets.py#L348" }, "streamlit.title": { "name": "title", "signature": "st.title(body, anchor=None, *, help=None)", - "examples": "
\n
\nimport streamlit as st\n\nst.title("This is a title")\nst.title("_Streamlit_ is :blue[cool] :sunglasses:")\n
\n
\n", + "examples": "
\nimport streamlit as st\n\nst.title("This is a title")\nst.title("_Streamlit_ is :blue[cool] :sunglasses:")\n
\n", "description": "

Display text in title formatting.

\n

Each document should have a single st.title(), although this is not\nenforced.

\n", "args": [ { @@ -165884,12 +176685,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/heading.py#L187" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L187" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -165910,12 +176711,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", - "example": "
\n
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n
\n", + "example": "
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n", "description": "

Display a toggle widget.

\n", "args": [ { @@ -165999,12 +176800,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/widgets/checkbox.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/checkbox.py#L170" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", "signature": "st.vega_lite_chart(data=None, spec=None, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n
\n", + "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n", "description": "

Display a chart using the Vega-Lite library.

\n

Vega-Lite is a high-level\ngrammar for defining interactive graphics.

\n", "args": [ { @@ -166080,12 +176881,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L1663" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1660" }, "streamlit.video": { "name": "video", "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False)", - "example": "
\n
\nimport streamlit as st\n\nvideo_file = open("myvideo.mp4", "rb")\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n
\n", + "example": "
\nimport streamlit as st\n\nvideo_file = open("myvideo.mp4", "rb")\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n", "description": "

Display a video player.

\n", "args": [ { @@ -166101,7 +176902,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The MIME type for the video file. This defaults to "video/mp4".\nFor more information, see https://tools.ietf.org/html/rfc4281.

\n", + "description": "

The MIME type for the video file. This defaults to "video/mp4".\nFor more information about MIME types, see\nhttps://www.iana.org/assignments/media-types/media-types.xhtml.

\n", "default": "s" }, { @@ -166154,12 +176955,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/media.py#L212" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/media.py#L213" }, "streamlit.warning": { "name": "warning", "signature": "st.warning(body, *, icon=None)", - "example": "
\n
\nimport streamlit as st\n\nst.warning('This is a warning', icon="\u26a0\ufe0f")\n
\n
\n", + "example": "
\nimport streamlit as st\n\nst.warning('This is a warning', icon="\u26a0\ufe0f")\n
\n", "description": "

Display warning message.

\n", "args": [ { @@ -166180,12 +176981,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/alert.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L80" }, "streamlit.write": { "name": "write", "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", - "examples": "
\n

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n
\n", + "examples": "

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n", "description": "

Displays arguments in the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit\ncommands, st.write() has some unique properties:

\n
    \n
  • You can pass in multiple arguments, all of which will be displayed.
  • \n
  • Its behavior depends on the input type(s).
  • \n
\n", "args": [ { @@ -166225,12 +177026,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/write.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/write.py#L255" }, "streamlit.write_stream": { "name": "write_stream", "signature": "st.write_stream(stream)", - "example": "
\n

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n
\n", + "example": "

You can pass an OpenAI stream as shown in our tutorial, Build a basic LLM chat app. Alternatively,\nyou can pass a generic generator function as input:

\n
\nimport time\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n_LOREM_IPSUM = """\nLorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n"""\n\n\ndef stream_data():\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n    yield pd.DataFrame(\n        np.random.randn(5, 10),\n        columns=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],\n    )\n\n    for word in _LOREM_IPSUM.split(" "):\n        yield word + " "\n        time.sleep(0.02)\n\n\nif st.button("Stream data"):\n    st.write_stream(stream_data)\n
\n", "description": "

Stream a generator, iterable, or stream-like sequence to the app.

\n

st.write_stream iterates through the given sequences and writes all\nchunks to the app. String chunks will be written using a typewriter effect.\nOther data types will be written using st.write.

\n", "args": [ { @@ -166250,7 +177051,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/write.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -166258,7 +177059,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -166266,7 +177067,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -166281,7 +177082,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -166299,7 +177100,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -166323,7 +177124,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L111" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -166338,7 +177139,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -166363,7 +177164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/state/query_params_proxy.py#L89" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -166373,7 +177174,7 @@ { "name": "reset", "signature": "st.connections.reset.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [ @@ -166384,11 +177185,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -166401,7 +177202,7 @@ { "name": "reset", "signature": "st.connections.reset.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [ @@ -166412,11 +177213,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -166439,12 +177240,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L354" }, { "name": "query", "signature": "st.connections.query.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n", "description": "

Run a read-only query.

", "args": [ { @@ -166512,12 +177313,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L224" }, { "name": "reset", "signature": "st.connections.reset.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [ @@ -166528,7 +177329,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -166545,7 +177346,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L383" }, { "name": "engine", @@ -166560,12 +177361,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L370" }, { "name": "session", "signature": "st.connections.session.session", - "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", + "example": "
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n", "description": "

Return a SQLAlchemy Session.

", "args": [], "returns": [ @@ -166576,11 +177377,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L396" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L54", - "examples": "
\n

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L54", + "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], "returns": [] @@ -166593,7 +177394,7 @@ { "name": "cursor", "signature": "st.connections.cursor.cursor()", - "example": "
\n

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n
\n", + "example": "

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n", "description": "

Create a new cursor object from this connection.

", "args": [], "returns": [ @@ -166604,12 +177405,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L456" }, { "name": "query", "signature": "st.connections.query.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n", "description": "

Run a read-only SQL query.

", "args": [ { @@ -166653,12 +177454,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L278" }, { "name": "reset", "signature": "st.connections.reset.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [ @@ -166669,12 +177470,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", "signature": "st.connections.session.session()", - "example": "
\n

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n
\n", + "example": "

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n", "description": "

Create a new Snowpark session from this connection.

", "args": [], "returns": [ @@ -166685,12 +177486,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L528" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L528" }, { "name": "write_pandas", "signature": "st.connections.write_pandas.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", - "example": "
\n

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n
\n", + "example": "

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n", "description": "

Write a pandas.DataFrame to a table in a Snowflake database.

", "args": [ { @@ -166750,14 +177551,14 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L374" } ], "properties": [ { "name": "raw_connection", "signature": "st.connections.raw_connection.raw_connection", - "example": "
\n

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n
\n", + "example": "

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n", "description": "

Access the underlying connection object from the Snowflake Connector for Python.

", "args": [], "returns": [ @@ -166768,11 +177569,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L489" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L45", - "examples": "
\n

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L45", + "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], "returns": [] @@ -166785,7 +177586,7 @@ { "name": "query", "signature": "st.connections.query.query(sql, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

Run a read-only SQL query.

", "args": [ { @@ -166813,12 +177614,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", "signature": "st.connections.reset.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

", "args": [], "returns": [ @@ -166829,30 +177630,30 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", "signature": "st.connections.safe_session.safe_session()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n", "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ { "name": "session", "signature": "st.connections.session.session", - "example": "
\n
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n", "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L47", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -166870,7 +177671,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L354" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -166885,7 +177686,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L383" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -166900,12 +177701,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L370" }, "streamlit.connections.SQLConnection.query": { "name": "query", "signature": "SQLConnection.query(sql, *, show_spinner=\"Running `sql.query(...)`.\", ttl=None, index_col=None, chunksize=None, params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query(\n    "SELECT * FROM pet_owners WHERE owner = :owner",\n    ttl=3600,\n    params={"owner": "barbara"},\n)\nst.dataframe(df)\n
\n", "description": "

Run a read-only query.

\n

This method implements query result caching and simple error\nhandling/retries. The caching behavior is identical to that of using\n@st.cache_data.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n

All keyword arguments passed to this function are passed down to\npandas.read_sql, except ttl.

\n", "args": [ { @@ -166973,12 +177774,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L224" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", "signature": "SQLConnection.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [ @@ -166989,12 +177790,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", "signature": "SQLConnection.session", - "example": "
\n
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n
\n", + "example": "
\nimport streamlit as st\nconn = st.connection("sql")\nn = st.slider("Pick a number")\nif st.button("Add the number!"):\n    with conn.session as session:\n        session.execute("INSERT INTO numbers (val) VALUES (:n);", {"n": n})\n        session.commit()\n
\n", "description": "

Return a SQLAlchemy Session.

\n

Users of this connection should use the contextmanager pattern for writes,\ntransactions, and anything more complex than simple read queries.

\n

See the usage example below, which assumes we have a table numbers with a\nsingle integer column val. The SQLAlchemy docs also contain\nmuch more information on the usage of sessions.

\n", "args": [], "returns": [ @@ -167005,12 +177806,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L396" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", "signature": "SnowparkConnection.query(sql, ttl=None)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowpark")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

Run a read-only SQL query.

\n

This method implements both query result caching (with caching behavior\nidentical to that of using @st.cache_data) as well as simple error handling/retries.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached indefinitely.

\n
\n", "args": [ { @@ -167038,12 +177839,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", "signature": "SnowparkConnection.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [ @@ -167054,30 +177855,30 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", "signature": "SnowparkConnection.safe_session()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowpark")\nwith conn.safe_session() as session:\n    df = session.table("mytable").limit(10).to_pandas()\n\nst.dataframe(df)\n
\n", "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L188" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", "signature": "SnowparkConnection.session", - "example": "
\n
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nsession = st.connection("snowpark").session\ndf = session.table("mytable").limit(10).to_pandas()\nst.dataframe(df)\n
\n", "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowpark_connection.py#L165" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", "signature": "SnowflakeConnection.cursor()", - "example": "
\n

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n
\n", + "example": "

The following example uses a cursor to insert multiple rows into a\ntable. The qmark parameter style is specified as an optional\nkeyword argument. Alternatively, the parameter style can be declared in\nyour connection configuration file. For more information, see the\nSnowflake Connector for Python documentation.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake", "paramstyle"="qmark")\nrows_to_insert = [("Mary", "dog"), ("John", "cat"), ("Robert", "bird")]\nconn.cursor().executemany(\n    "INSERT INTO mytable (name, pet) VALUES (?, ?)", rows_to_insert\n)\n
\n", "description": "

Create a new cursor object from this connection.

\n

Snowflake Connector cursors implement the Python Database API v2.0\nspecification (PEP-249). For more information, see the\nSnowflake Connector for Python documentation.

\n", "args": [], "returns": [ @@ -167088,12 +177889,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L456" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", "signature": "SnowflakeConnection.query(sql, *, ttl=None, show_spinner=\"Running `snowflake.query(...)`.\", params=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\nst.dataframe(df)\n
\n", "description": "

Run a read-only SQL query.

\n

This method implements query result caching and simple error\nhandling/retries. The caching behavior is identical to that of using\n@st.cache_data.

\n
\n

Note

\n

Queries that are run without a specified ttl are cached\nindefinitely.

\n
\n", "args": [ { @@ -167137,12 +177938,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L278" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", "signature": "SnowflakeConnection.raw_connection", - "example": "
\n

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n
\n", + "example": "

The following example uses a cursor to submit an asynchronous query,\nsaves the query ID, then periodically checks the query status through\nthe connection before retrieving the results.

\n
\nimport streamlit as st\nimport time\n\nconn = st.connection("snowflake")\ncur = conn.cursor()\ncur.execute_async("SELECT * FROM my_table")\nquery_id = cur.sfqid\nwhile True:\n    status = conn.raw_connection.get_query_status(query_id)\n    if conn.raw_connection.is_still_running(status):\n        time.sleep(1)\n    else:\n        break\ncur.get_results_from_sfqid(query_id)\ndf = cur.fetchall()\n
\n", "description": "

Access the underlying connection object from the Snowflake Connector for Python.

\n

For information on how to use the Snowflake Connector for Python, see\nthe Snowflake Connector for Python documentation.

\n", "args": [], "returns": [ @@ -167153,12 +177954,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L489" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", "signature": "SnowflakeConnection.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [ @@ -167169,12 +177970,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", "signature": "SnowflakeConnection.session()", - "example": "
\n

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n
\n", + "example": "

The following example creates a new Snowpark session and uses it to run\na query.

\n
\nimport streamlit as st\n\nconn = st.connection("snowflake")\nsession = conn.session()\ndf = session.sql("SELECT * FROM my_table").collect()\n
\n", "description": "

Create a new Snowpark session from this connection.

\n

For information on how to use Snowpark sessions, see the\nSnowpark developer guide\nand Snowpark API Reference.

\n", "args": [], "returns": [ @@ -167185,12 +177986,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L528" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L528" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", "signature": "SnowflakeConnection.write_pandas(df, table_name, database=None, schema=None, chunk_size=None, **kwargs)", - "example": "
\n

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n
\n", + "example": "

The following example uses the database and schema currently in use in\nthe session and copies the data into a table named "my_table."

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {"Name": ["Mary", "John", "Robert"], "Pet": ["dog", "cat", "bird"]}\n)\nconn = st.connection("snowflake")\nconn.write_pandas(df, "my_table")\n
\n", "description": "

Write a pandas.DataFrame to a table in a Snowflake database.

\n

This convenience method is a thin wrapper around\nsnowflake.connector.pandas_tools.write_pandas() using the\nunderlying connection. The conn parameter is passed automatically.\nFor more information and additional keyword arguments, see the\nSnowflake Connector for Python documentation.

\n", "args": [ { @@ -167250,12 +178051,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/snowflake_connection.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L374" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", "signature": "BaseConnection.reset()", - "example": "
\n
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n
\n", + "example": "
\nimport streamlit as st\n\nconn = st.connection("my_conn")\n\n# Reset the connection before using it if it isn't healthy\n# Note: is_healthy() isn't a real method and is just shown for example here.\nif not conn.is_healthy():\n    conn.reset()\n\n# Do stuff with conn...\n
\n", "description": "

Reset this connection so that it gets reinitialized the next time it's used.

\n

This method can be useful when a connection has become stale, an auth token has\nexpired, or in similar scenarios where a broken connection might be fixed by\nreinitializing it. Note that some connection methods may already use reset()\nin their error handling code.

\n", "args": [], "returns": [ @@ -167266,12 +178067,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", "signature": "st.column_config.AreaChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.AreaChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure an area chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -167324,12 +178125,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1188" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1226" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", "signature": "st.column_config.BarChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.BarChartColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a bar chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -167382,12 +178183,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L991" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1029" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", "signature": "st.column_config.CheckboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n        "favorite": [True, False, False, True],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "favorite": st.column_config.CheckboxColumn(\n            "Your favorite?",\n            help="Select your **favorite** widgets",\n            default=False,\n        )\n    },\n    disabled=["widgets"],\n    hide_index=True,\n)\n
\n", "description": "

Configure a checkbox column in st.dataframe or st.data_editor.

\n

This is the default column type for boolean values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a checkbox widget.

\n", "args": [ { @@ -167448,12 +178249,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L755" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L793" }, "streamlit.column_config.Column": { "name": "Column", "signature": "st.column_config.Column(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.Column(\n            "Streamlit Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            width="medium",\n            required=True,\n        )\n    },\n    hide_index=True,\n    num_rows="dynamic",\n)\n
\n", "description": "

Configure a generic column in st.dataframe or st.data_editor.

\n

The type of the column will be automatically inferred from the data type.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n

To change the type of the column and enable type-specific configuration options,\nuse one of the column types in the st.column_config namespace,\ne.g. st.column_config.NumberColumn.

\n", "args": [ { @@ -167506,12 +178307,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L245" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", "signature": "st.column_config.DateColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nfrom datetime import date\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "birthday": [\n            date(1980, 1, 1),\n            date(1990, 5, 3),\n            date(1974, 5, 19),\n            date(2001, 8, 17),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "birthday": st.column_config.DateColumn(\n            "Birthday",\n            min_value=date(1900, 1, 1),\n            max_value=date(2005, 1, 1),\n            format="DD.MM.YYYY",\n            step=1,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a date column in st.dataframe or st.data_editor.

\n

This is the default column type for date values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When used\nwith st.data_editor, editing will be enabled with a date picker widget.

\n", "args": [ { @@ -167572,11 +178373,11 @@ }, { "name": "format", - "type_name": "str or None", + "type_name": "str, \"localized\", \"distance\", \"iso8601\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nYYYY-MM-DD.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", - "default": null + "description": "

A format string controlling how dates are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Show the date in "YYYY-MM-DD" format (e.g.\n"2025-03-04").
  • \n
  • "localized": Show the date in the default locale format (e.g.\n"Mar 4, 2025" in the America/Los_Angeles timezone).
  • \n
  • "distance": Show the date in a relative format (e.g.\n"a few seconds ago").
  • \n
  • "iso8601": Show the date in ISO 8601 format (e.g.\n"2025-03-04").
  • \n
  • A momentJS format string: Format the date with a string, like\n"ddd, MMM Do" to show "Tue, Mar 4th". For available formats, see\nmomentJS.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "default": "locale" }, { "name": "min_value", @@ -167604,12 +178405,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1764" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1824" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", "signature": "st.column_config.DatetimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None, timezone=None)", - "examples": "
\n
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nfrom datetime import datetime\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            datetime(2024, 2, 5, 12, 30),\n            datetime(2023, 11, 10, 18, 0),\n            datetime(2024, 3, 11, 20, 10),\n            datetime(2023, 9, 12, 3, 0),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.DatetimeColumn(\n            "Appointment",\n            min_value=datetime(2023, 6, 1),\n            max_value=datetime(2025, 1, 1),\n            format="D MMM YYYY, h:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a datetime column in st.dataframe or st.data_editor.

\n

This is the default column type for datetime values. This command needs to be\nused in the column_config parameter of st.dataframe or\nst.data_editor. When used with st.data_editor, editing will be enabled\nwith a datetime picker widget.

\n", "args": [ { @@ -167670,11 +178471,11 @@ }, { "name": "format", - "type_name": "str or None", + "type_name": "str, \"localized\", \"distance\", \"calendar\", \"iso8601\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how datetimes are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nYYYY-MM-DD HH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", - "default": null + "description": "

A format string controlling how datetimes are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Show the datetime in "YYYY-MM-DD HH:mm:ss"\nformat (e.g. "2025-03-04 20:00:00").
  • \n
  • "localized": Show the datetime in the default locale format (e.g.\n"Mar 4, 2025, 12:00:00 PM" in the America/Los_Angeles timezone).
  • \n
  • "distance": Show the datetime in a relative format (e.g.\n"a few seconds ago").
  • \n
  • "calendar": Show the datetime in a calendar format (e.g.\n"Today at 8:00 PM").
  • \n
  • "iso8601": Show the datetime in ISO 8601 format (e.g.\n"2025-03-04T20:00:00.000Z").
  • \n
  • A momentJS format string: Format the datetime with a string, like\n"ddd ha" to show "Tue 8pm". For available formats, see\nmomentJS.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "default": "locale" }, { "name": "min_value", @@ -167710,12 +178511,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1465" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1503" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", "signature": "st.column_config.ImageColumn(label=None, *, width=None, help=None, pinned=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/5435b8cb-6c6c-490b-9608-799b543655d3/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/ef9a7627-13f2-47e5-8f65-3f69bb38a5c2/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/31b99099-8eae-4ff8-aa89-042895ed3843/Home_Page.png",\n            "https://storage.googleapis.com/s4a-prod-share-preview/default/st_app_screenshot_image/6a399b09-241e-4ae7-a31f-7640dc1d181e/Home_Page.png",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.ImageColumn(\n            "Preview Image", help="Streamlit app preview screenshots"\n        )\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure an image column in st.dataframe or st.data_editor.

\n

The cell values need to be one of:

\n
    \n
  • A URL to fetch the image from. This can also be a relative URL of an image\ndeployed via static file serving.\nNote that you can NOT use an arbitrary local image if it is not available through\na public URL.
  • \n
  • A data URL containing an SVG XML like data:image/svg+xml;utf8,<svg xmlns=...</svg>.
  • \n
  • A data URL containing a Base64 encoded image like data:image/png;base64,iVBO....
  • \n
\n

Image columns are not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", "args": [ { @@ -167752,12 +178553,54 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1287" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1325" + }, + "streamlit.column_config.JsonColumn": { + "name": "JsonColumn", + "signature": "st.column_config.JsonColumn(label=None, *, width=None, help=None, pinned=None)", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "json": [\n            {"foo": "bar", "bar": "baz"},\n            {"foo": "baz", "bar": "qux"},\n            {"foo": "qux", "bar": "foo"},\n            None,\n        ],\n    }\n)\n\nst.dataframe(\n    data_df,\n    column_config={\n        "json": st.column_config.JsonColumn(\n            "JSON Data",\n            help="JSON strings or objects",\n            width="large",\n        ),\n    },\n    hide_index=True,\n)\n
\n", + "description": "

Configure a JSON column in st.dataframe or st.data_editor.

\n

Cells need to contain JSON strings or JSON-compatible objects. JSON columns\nare not editable at the moment. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor.

\n", + "args": [ + { + "name": "label", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label shown at the top of the column. If this is None\n(default), the column name is used.

\n", + "default": null + }, + { + "name": "width", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "default": null + }, + { + "name": "help", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A tooltip that gets displayed when hovering over the column label. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown, including\nthe Markdown directives described in the body parameter of\nst.markdown.

\n", + "default": null + }, + { + "name": "pinned", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L2105" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", "signature": "st.column_config.LineChartColumn(label=None, *, width=None, help=None, pinned=None, y_min=None, y_max=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.LineChartColumn(\n            "Sales (last 6 months)",\n            width="medium",\n            help="The sales volume in the last 6 months",\n            y_min=0,\n            y_max=100,\n         ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a line chart column in st.dataframe or st.data_editor.

\n

Cells need to contain a list of numbers. Chart columns are not editable\nat the moment. This command needs to be used in the column_config parameter\nof st.dataframe or st.data_editor.

\n", "args": [ { @@ -167810,12 +178653,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1089" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1127" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", "signature": "st.column_config.LinkColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, max_chars=None, validate=None, display_text=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate=r"^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text=r"https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "apps": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n            "https://30days.streamlit.app",\n        ],\n        "creator": [\n            "https://github.com/streamlit",\n            "https://github.com/arnaudmiribel",\n            "https://github.com/streamlit",\n            "https://github.com/streamlit",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "apps": st.column_config.LinkColumn(\n            "Trending apps",\n            help="The top trending Streamlit apps",\n            validate=r"^https://[a-z]+\\.streamlit\\.app$",\n            max_chars=100,\n            display_text=r"https://(.*?)\\.streamlit\\.app"\n        ),\n        "creator": st.column_config.LinkColumn(\n            "App Creator", display_text="Open profile"\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a link column in st.dataframe or st.data_editor.

\n

The cell values need to be string and will be shown as clickable links.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor. When used with st.data_editor, editing will be enabled\nwith a text input widget.

\n", "args": [ { @@ -167900,12 +178743,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L594" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L632" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None, pinned=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", "args": [ { @@ -167942,12 +178785,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1379" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1417" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", "signature": "st.column_config.NumberColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "price": [20, 950, 250, 500],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "price": st.column_config.NumberColumn(\n            "Price (in USD)",\n            help="The price of the product in USD",\n            min_value=0,\n            max_value=1000,\n            step=1,\n            format="$%d",\n        )\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a number column in st.dataframe or st.data_editor.

\n

This is the default column type for integer and float values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a numeric input widget.

\n", "args": [ { @@ -168008,11 +178851,11 @@ }, { "name": "format", - "type_name": "str or None", + "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. The following formatters are\nvalid: %d, %e, %f, %g, %i, %u. You can also add\nprefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix. If\nthis is None (default), the numbers are not formatted.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", - "default": null + "description": "

A format string controlling how numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexidecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "default": "locale" }, { "name": "min_value", @@ -168040,12 +178883,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L327" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L350" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, pinned=None, format=None, min_value=None, max_value=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a progress column in st.dataframe or st.data_editor.

\n

Cells need to contain a number. Progress columns are not editable at the moment.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n", "args": [ { @@ -168074,11 +178917,11 @@ }, { "name": "format", - "type_name": "str or None", + "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A printf-style format string controlling how numbers are displayed.\nThis does not impact the return value. The following formatters are\nvalid: %d, %e, %f, %g, %i, %u. You can also add\nprefixes and suffixes, e.g. "$ %.2f" to show a dollar prefix. If\nthis is None (default), the numbers are not formatted.

\n", - "default": null + "description": "

A format string controlling how the numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexidecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler. The number formatting does\nnot impact the return value when used in st.data_editor.

\n", + "default": "locale" }, { "name": "pinned", @@ -168106,12 +178949,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1909" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1980" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, options=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a selectbox column in st.dataframe or st.data_editor.

\n

This is the default column type for Pandas categorical values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a selectbox widget.

\n", "args": [ { @@ -168180,12 +179023,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L864" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L902" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", "signature": "st.column_config.TextColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, max_chars=None, validate=None)", - "examples": "
\n
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate=r"^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "widgets": ["st.selectbox", "st.number_input", "st.text_area", "st.button"],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "widgets": st.column_config.TextColumn(\n            "Widgets",\n            help="Streamlit **widget** commands \ud83c\udf88",\n            default="st.",\n            max_chars=50,\n            validate=r"^st\\.[a-z_]+$",\n        )\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a text column in st.dataframe or st.data_editor.

\n

This is the default column type for string values. This command needs to be used in the\ncolumn_config parameter of st.dataframe or st.data_editor. When used with\nst.data_editor, editing will be enabled with a text input widget.

\n", "args": [ { @@ -168262,12 +179105,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L510" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", "signature": "st.column_config.TimeColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, format=None, min_value=None, max_value=None, step=None)", - "examples": "
\n
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n
\n", + "examples": "
\nfrom datetime import time\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "appointment": [\n            time(12, 30),\n            time(18, 0),\n            time(9, 10),\n            time(16, 25),\n        ]\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "appointment": st.column_config.TimeColumn(\n            "Appointment",\n            min_value=time(8, 0, 0),\n            max_value=time(19, 0, 0),\n            format="hh:mm a",\n            step=60,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a time column in st.dataframe or st.data_editor.

\n

This is the default column type for time values. This command needs to be used in\nthe column_config parameter of st.dataframe or st.data_editor. When\nused with st.data_editor, editing will be enabled with a time picker widget.

\n", "args": [ { @@ -168328,11 +179171,11 @@ }, { "name": "format", - "type_name": "str or None", + "type_name": "str, \"localized\", \"iso8601\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A momentJS format string controlling how times are displayed. See\nmomentJS docs for\navailable formats. If this is None (default), the format is\nHH:mm:ss.

\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler.

\n", - "default": null + "description": "

A format string controlling how times are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Show the time in "HH:mm:ss" format (e.g.\n"20:00:00").
  • \n
  • "localized": Show the time in the default locale format (e.g.\n"12:00:00 PM" in the America/Los_Angeles timezone).
  • \n
  • "iso8601": Show the time in ISO 8601 format (e.g.\n"20:00:00.000Z").
  • \n
  • A momentJS format string: Format the time with a string, like\n"ha" to show "8pm". For available formats, see\nmomentJS.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "default": "locale" }, { "name": "min_value", @@ -168360,7 +179203,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/column_types.py#L1618" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1669" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -168400,12 +179243,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/components/v1/component_registry.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/components/v1/component_registry.py#L51" }, "streamlit.components.v1.html": { "name": "html", "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False)", - "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n
\n", + "example": "
\nimport streamlit.components.v1 as components\n\ncomponents.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n", "description": "

Display an HTML string in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n

If you want to insert HTML text into your app without an iframe, try\nst.html instead.

\n
\n

Warning

\n

Using st.components.v1.html directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ { @@ -168442,12 +179285,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False)", - "example": "
\n
\nimport streamlit.components.v1 as components\n\ncomponents.iframe("https://example.com", height=500)\n
\n
\n", + "example": "
\nimport streamlit.components.v1 as components\n\ncomponents.iframe("https://example.com", height=500)\n
\n", "description": "

Load a remote URL in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.iframe directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ { @@ -168484,12 +179327,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", "signature": "element.add_rows(data=None, **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart(\n    {\n        "mark": "line",\n        "encoding": {"x": "a", "y": "b"},\n        "datasets": {\n            "some_fancy_name": df1,  # <-- named dataset\n        },\n        "data": {"name": "some_fancy_name"},\n    }\n)\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n
\n", + "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart(\n    {\n        "mark": "line",\n        "encoding": {"x": "a", "y": "b"},\n        "datasets": {\n            "some_fancy_name": df1,  # <-- named dataset\n        },\n        "data": {"name": "some_fancy_name"},\n    }\n)\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n", "description": "

Concatenate a dataframe to the bottom of the current one.

\n", "args": [ { @@ -168510,7 +179353,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L716" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L736" }, "StatusContainer.update": { "name": "update", @@ -168543,7 +179386,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -168572,7 +179415,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1026" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -168596,7 +179439,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L367" }, { "name": "switch_page", @@ -168620,7 +179463,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L390" } ], "properties": [ @@ -168637,7 +179480,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -168652,7 +179495,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L462" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -168667,7 +179510,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L476" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -168682,7 +179525,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -168697,7 +179540,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L504" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -168712,7 +179555,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L518" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -168727,7 +179570,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L532" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -168742,7 +179585,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -168757,7 +179600,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -168772,7 +179615,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -168787,7 +179630,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -168802,7 +179645,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L605" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -168817,7 +179660,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L619" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -168832,7 +179675,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L633" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -168847,7 +179690,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -168862,7 +179705,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L661" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -168877,7 +179720,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L675" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -168892,7 +179735,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L689" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -168907,7 +179750,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L703" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -168922,7 +179765,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -168937,7 +179780,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L717" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -168952,7 +179795,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L731" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -168967,7 +179810,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -168982,7 +179825,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L759" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -168997,7 +179840,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L773" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -169012,7 +179855,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -169027,7 +179870,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -169042,7 +179885,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L434" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -169057,7 +179900,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -169072,7 +179915,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -169087,7 +179930,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -169102,7 +179945,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -169117,7 +179960,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -169132,7 +179975,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -169147,7 +179990,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -169162,7 +180005,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -169177,7 +180020,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -169192,7 +180035,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L947" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -169207,7 +180050,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -169222,7 +180065,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L975" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -169237,7 +180080,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L989" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -169252,10 +180095,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1003" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L96", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -169295,7 +180138,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L447" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -169310,7 +180153,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L462" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -169325,7 +180168,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L476" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -169340,7 +180183,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -169355,7 +180198,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L504" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -169370,7 +180213,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L518" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -169385,7 +180228,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L532" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -169400,7 +180243,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -169415,7 +180258,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -169430,7 +180273,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L577" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -169445,7 +180288,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L591" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -169460,7 +180303,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L605" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -169475,7 +180318,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L619" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -169490,7 +180333,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L633" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -169505,7 +180348,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L647" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -169537,7 +180380,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L267" }, "AppTest.from_function": { "name": "from_function", @@ -169585,7 +180428,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L220" }, "AppTest.from_string": { "name": "from_string", @@ -169617,7 +180460,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -169641,7 +180484,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1026" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -169656,7 +180499,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L661" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -169671,7 +180514,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L675" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -169686,7 +180529,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L689" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -169701,7 +180544,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L703" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -169716,7 +180559,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -169731,7 +180574,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L717" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -169746,7 +180589,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L731" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -169761,7 +180604,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -169776,7 +180619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L759" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -169791,7 +180634,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L773" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -169815,7 +180658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L367" }, "AppTest.select_slider": { "name": "select_slider", @@ -169830,7 +180673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L787" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -169845,7 +180688,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L801" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -169860,7 +180703,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L434" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -169875,7 +180718,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L815" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -169890,7 +180733,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -169905,7 +180748,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -169920,7 +180763,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L843" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -169944,7 +180787,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L393" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L390" }, "AppTest.table": { "name": "table", @@ -169959,7 +180802,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L871" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -169974,7 +180817,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L885" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -169989,7 +180832,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -170004,7 +180847,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -170019,7 +180862,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L933" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -170034,7 +180877,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L947" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -170049,7 +180892,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -170064,7 +180907,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L975" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -170079,7 +180922,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L989" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -170094,7 +180937,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/app_test.py#L1003" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -170107,7 +180950,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L339" }, { "name": "run", @@ -170124,7 +180967,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170132,7 +180975,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L334" } ], "properties": [ @@ -170142,10 +180985,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L324" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L301", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -170170,7 +181013,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -170178,7 +181021,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L750" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L749" }, { "name": "set_value", @@ -170186,7 +181029,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L743" }, { "name": "unselect", @@ -170194,7 +181037,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L764" } ], "properties": [ @@ -170204,7 +181047,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L737" }, { "name": "indices", @@ -170212,7 +181055,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L732" }, { "name": "value", @@ -170220,10 +181063,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L722" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L697", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L696", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -170248,7 +181091,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170256,7 +181099,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L356" } ], "properties": [ @@ -170266,10 +181109,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L369" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L344", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -170285,7 +181128,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L418" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "run", @@ -170302,7 +181145,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170310,7 +181153,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L413" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L412" }, { "name": "uncheck", @@ -170318,7 +181161,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L422" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L421" } ], "properties": [ @@ -170328,10 +181171,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L402" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L381", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L380", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -170347,7 +181190,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L489" }, { "name": "run", @@ -170364,7 +181207,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170372,7 +181215,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L484" } ], "properties": [ @@ -170382,10 +181225,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L464" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L463" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L449", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L448", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -170410,7 +181253,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170418,7 +181261,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L535" } ], "properties": [ @@ -170428,10 +181271,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L549" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L515", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -170456,7 +181299,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -170466,10 +181309,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L104", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -170494,7 +181337,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -170502,7 +181345,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L837" }, { "name": "set_value", @@ -170510,7 +181353,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L831" }, { "name": "unselect", @@ -170518,7 +181361,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L853" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L852" } ], "properties": [ @@ -170528,7 +181371,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L825" }, { "name": "indices", @@ -170536,7 +181379,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L820" }, { "name": "value", @@ -170544,10 +181387,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L811" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L810" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L782", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L781", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -170563,7 +181406,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L926" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L925" }, { "name": "increment", @@ -170571,7 +181414,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L918" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L917" }, { "name": "run", @@ -170588,7 +181431,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170596,7 +181439,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L893" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L892" } ], "properties": [ @@ -170606,10 +181449,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L906" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L905" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L873", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L872", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -170634,7 +181477,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170642,7 +181485,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L977" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L976" } ], "properties": [ @@ -170652,7 +181495,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L971" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L970" }, { "name": "index", @@ -170660,7 +181503,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L953" }, { "name": "value", @@ -170668,10 +181511,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L961" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L960" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L935", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L934", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -170696,7 +181539,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -170704,7 +181547,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1123" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1122" }, { "name": "set_value", @@ -170712,7 +181555,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1085" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1084" } ], "properties": [ @@ -170722,7 +181565,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1116" }, { "name": "value", @@ -170730,10 +181573,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1106" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1105" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1067", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1066", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -170758,7 +181601,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -170766,7 +181609,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1044" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1043" }, { "name": "select_index", @@ -170774,7 +181617,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1047" }, { "name": "set_value", @@ -170782,7 +181625,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1038" } ], "properties": [ @@ -170792,7 +181635,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1033" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1032" }, { "name": "index", @@ -170800,7 +181643,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1013" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1012" }, { "name": "value", @@ -170808,10 +181651,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1023" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1022" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L995", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L994", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -170836,7 +181679,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -170844,7 +181687,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1176" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1175" }, { "name": "set_value", @@ -170852,7 +181695,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1147" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1146" } ], "properties": [ @@ -170862,10 +181705,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1165" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1164" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1128", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1127", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -170881,7 +181724,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1257" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1256" }, { "name": "run", @@ -170898,7 +181741,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170906,7 +181749,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1233" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1232" } ], "properties": [ @@ -170916,10 +181759,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1245" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1215", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1214", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -170935,7 +181778,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1310" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1309" }, { "name": "run", @@ -170952,7 +181795,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -170960,7 +181803,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1286" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1285" } ], "properties": [ @@ -170970,10 +181813,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1299" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1298" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1268", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1267", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -170989,7 +181832,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1374" }, { "name": "increment", @@ -170997,7 +181840,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1368" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1367" }, { "name": "run", @@ -171014,7 +181857,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -171022,7 +181865,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1340" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1339" } ], "properties": [ @@ -171032,10 +181875,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1355" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1324", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1323", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -171060,7 +181903,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -171068,7 +181911,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1432" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1431" } ], "properties": [ @@ -171078,10 +181921,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1422" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1421" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L1399", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1398", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -171106,7 +181949,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L143" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -171114,7 +181957,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L194" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -171124,10 +181967,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/testing/v1/element_tree.py#L179", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -171145,30 +181988,48 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L506" }, "context.cookies": { "name": "cookies", "signature": "context.cookies", - "examples": "
\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n
\n", + "examples": "

Example 1: Access all available cookies

\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Example 2: Access a specific cookie

\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n", "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L183" }, "context.headers": { "name": "headers", "signature": "context.headers", - "examples": "
\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n
\n", + "examples": "

Example 1: Access all available headers

\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Example 2: Access a specific header

\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n", "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L137" + }, + "context.timezone": { + "name": "timezone", + "signature": "context.timezone", + "example": "

Access the user's timezone, and format a datetime to display locally:

\n
\nimport streamlit as st\nfrom datetime import datetime, timezone\nimport pytz\n\ntz = st.context.timezone\ntz_obj = pytz.timezone(tz)\n\nnow = datetime.now(timezone.utc)\n\nf"The user's timezone is {tz}."\nf"The UTC time is {now}."\nf"The user's local time is {now.astimezone(tz_obj)}"\n
\n", + "description": "

The read-only timezone of the user's browser.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L217" + }, + "context.timezone_offset": { + "name": "timezone_offset", + "signature": "context.timezone_offset", + "example": "

Access the user's timezone offset, and format a datetime to display locally:

\n
\nimport streamlit as st\nfrom datetime import datetime, timezone, timedelta\n\ntzoff = st.context.timezone_offset\ntz_obj = timezone(-timedelta(minutes=tzoff))\n\nnow = datetime.now(timezone.utc)\n\nf"The user's timezone is {tz}."\nf"The UTC time is {now}."\nf"The user's local time is {now.astimezone(tz_obj)}"\n
\n", + "description": "

The read-only timezone offset of the user's browser.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L246" }, "CachedFunc.clear": { "name": "clear", "signature": "CachedFunc.clear(*args, **kwargs)", - "example": "
\n
\nimport streamlit as st\nimport time\n\n@st.cache_data\ndef foo(bar):\n    time.sleep(2)\n    st.write(f"Executed foo({bar}).")\n    return bar\n\nif st.button("Clear all cached values for `foo`", on_click=foo.clear):\n    foo.clear()\n\nif st.button("Clear the cached value of `foo(1)`"):\n    foo.clear(1)\n\nfoo(1)\nfoo(2)\n
\n
\n", + "example": "
\nimport streamlit as st\nimport time\n\n@st.cache_data\ndef foo(bar):\n    time.sleep(2)\n    st.write(f"Executed foo({bar}).")\n    return bar\n\nif st.button("Clear all cached values for `foo`", on_click=foo.clear):\n    foo.clear()\n\nif st.button("Clear the cached value of `foo(1)`"):\n    foo.clear(1)\n\nfoo(1)\nfoo(2)\n
\n", "description": "

Clear the cached function's associated cache.

\n

If no arguments are passed, Streamlit will clear all values cached for\nthe function. If arguments are passed, Streamlit will clear the cached\nvalue for these arguments only.

\n", "args": [ { @@ -171189,7 +182050,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/caching/cache_utils.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_utils.py#L346" }, "StreamlitPage": { "name": "StreamlitPage", @@ -171202,7 +182063,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L269" } ], "properties": [ @@ -171212,7 +182073,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L251" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L246" }, { "name": "title", @@ -171220,7 +182081,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L235" }, { "name": "url_path", @@ -171228,10 +182089,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L254" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L134", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L129", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -171264,7 +182125,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L251" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L246" }, "StreamlitPage.run": { "name": "run", @@ -171272,7 +182133,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L269" }, "StreamlitPage.title": { "name": "title", @@ -171280,7 +182141,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L235" }, "StreamlitPage.url_path": { "name": "url_path", @@ -171288,7 +182149,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/navigation/page.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L254" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -171308,11 +182169,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L506" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/user_info.py#L371", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L371", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.experimental_user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.experimental_user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.experimental_user is dependent on the host platform running your\nStreamlit app. If the host platform has not configured the function, it\nwill behave as in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.experimental_user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.experimental_user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.experimental_user["email"] or st.experimental_user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -171335,23 +182196,41 @@ { "name": "cookies", "signature": "st.cookies.cookies", - "examples": "
\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n
\n", + "examples": "

Example 1: Access all available cookies

\n

Show a dictionary of cookies:

\n
\nimport streamlit as st\n\nst.context.cookies\n
\n

Example 2: Access a specific cookie

\n

Show the value of a specific cookie:

\n
\nimport streamlit as st\n\nst.context.cookies["_ga"]\n
\n", "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L183" }, { "name": "headers", "signature": "st.headers.headers", - "examples": "
\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n
\n", + "examples": "

Example 1: Access all available headers

\n

Show a dictionary of headers (with only the last instance of any\nrepeated key):

\n
\nimport streamlit as st\n\nst.context.headers\n
\n

Example 2: Access a specific header

\n

Show the value of a specific header (or the last instance if it's\nrepeated):

\n
\nimport streamlit as st\n\nst.context.headers["host"]\n
\n

Show of list of all headers for a given key:

\n
\nimport streamlit as st\n\nst.context.headers.get_all("pragma")\n
\n", "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L137" + }, + { + "name": "timezone", + "signature": "st.timezone.timezone", + "example": "

Access the user's timezone, and format a datetime to display locally:

\n
\nimport streamlit as st\nfrom datetime import datetime, timezone\nimport pytz\n\ntz = st.context.timezone\ntz_obj = pytz.timezone(tz)\n\nnow = datetime.now(timezone.utc)\n\nf"The user's timezone is {tz}."\nf"The UTC time is {now}."\nf"The user's local time is {now.astimezone(tz_obj)}"\n
\n", + "description": "

The read-only timezone of the user's browser.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L217" + }, + { + "name": "timezone_offset", + "signature": "st.timezone_offset.timezone_offset", + "example": "

Access the user's timezone offset, and format a datetime to display locally:

\n
\nimport streamlit as st\nfrom datetime import datetime, timezone, timedelta\n\ntzoff = st.context.timezone_offset\ntz_obj = timezone(-timedelta(minutes=tzoff))\n\nnow = datetime.now(timezone.utc)\n\nf"The user's timezone is {tz}."\nf"The UTC time is {now}."\nf"The user's local time is {now.astimezone(tz_obj)}"\n
\n", + "description": "

The read-only timezone offset of the user's browser.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/runtime/context.py#L125", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L126", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -171361,7 +182240,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L169", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -171381,7 +182260,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/plotly_chart.py#L81", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -171422,7 +182301,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/vega_charts.py#L110", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L109", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -171442,7 +182321,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -171461,7 +182340,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -171488,7 +182367,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L210", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -171507,7 +182386,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.42.0/lib/streamlit/elements/deck_gl_json_chart.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -171530,7 +182409,7 @@ "is_attribute_dict": true } }, - "1.43.0": { + "1.44.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -171586,7 +182465,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -171651,7 +182530,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1498" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1499" }, "streamlit.area_chart": { "name": "area_chart", @@ -171741,7 +182620,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L755" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L756" }, "streamlit.audio": { "name": "audio", @@ -171807,7 +182686,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/media.py#L72" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", @@ -171888,7 +182767,41 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/audio_input.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/audio_input.py#L93" + }, + "streamlit.badge": { + "name": "badge", + "signature": "st.badge(label, *, icon=None, color=\"blue\")", + "examples": "

Create standalone badges with st.badge (with or without icons). If\nyou want to have multiple, side-by-side badges, you can use the\nMarkdown directive in st.markdown.

\n
\nimport streamlit as st\n\nst.badge("New")\nst.badge("Success", icon=":material/check:", color="green")\n\nst.markdown(\n    ":violet-badge[:material/star: Favorite] :orange-badge[\u26a0\ufe0f Needs review] :gray-badge[Deprecated]"\n)\n
\n", + "description": "

Display a colored badge with an icon and label.

\n

This is a thin wrapper around the color-badge Markdown directive.\nThe following are equivalent:

\n
    \n
  • st.markdown(":blue-badge[Home]")
  • \n
  • st.badge("Home", color="blue")
  • \n
\n
\n

Note

\n

You can insert badges everywhere Streamlit supports Markdown by\nusing the color-badge Markdown directive. See st.markdown for\nmore information.

\n
\n", + "args": [ + { + "name": "label", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The label to display in the badge. The label can optionally contain\nGitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code.

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives. Because this command escapes square\nbrackets ([ ]) in this parameter, any directive requiring\nsquare brackets is not supported.

\n", + "default": null + }, + { + "name": "icon", + "type_name": "str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display next to the badge label. If\nicon is None (default), no icon is displayed. If icon\nis a string, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", + "default": null + }, + { + "name": "color", + "type_name": "str", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The color to use for the badge. This defaults to "blue".

\n

This can be one of the following supported colors: blue, green,\norange, red, violet, gray/grey, or primary. If you use\n"primary", Streamlit will use the default primary accent color\nunless you set the theme.primaryColor configuration option.

\n", + "default": "s" + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L281" }, "streamlit.balloons": { "name": "balloons", @@ -171897,7 +182810,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -171995,7 +182908,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L996" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L997" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -172021,7 +182934,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", @@ -172118,7 +183031,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L88" }, "streamlit.cache": { "name": "cache", @@ -172192,7 +183105,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -172262,7 +183175,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -172332,7 +183245,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -172413,7 +183326,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/camera_input.py#L86" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/camera_input.py#L89" }, "streamlit.caption": { "name": "caption", @@ -172447,7 +183360,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L146" }, "streamlit.chat_input": { "name": "chat_input", @@ -172536,7 +183449,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/chat.py#L358" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/chat.py#L367" }, "streamlit.chat_message": { "name": "chat_message", @@ -172569,7 +183482,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/chat.py#L214" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/chat.py#L223" }, "streamlit.checkbox": { "name": "checkbox", @@ -172658,7 +183571,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", @@ -172708,7 +183621,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -172797,7 +183710,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -172846,7 +183759,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", @@ -172903,7 +183816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -172937,7 +183850,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L43" }, "streamlit.data_editor": { "name": "data_editor", @@ -173066,7 +183979,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/data_editor.py#L581" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/data_editor.py#L580" }, "streamlit.dataframe": { "name": "dataframe", @@ -173171,7 +184084,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L258" }, "streamlit.date_input": { "name": "date_input", @@ -173284,7 +184197,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/time_widgets.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/time_widgets.py#L632" }, "streamlit.dialog": { "name": "dialog", @@ -173310,7 +184223,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -173319,12 +184232,12 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L292" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L261" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=\"rerun\", args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\neffeciently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

You can pass a string to the data argument and Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", + "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\neffeciently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

If you pass a string to the data argument, Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ { @@ -173440,7 +184353,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L258" }, "streamlit.echo": { "name": "echo", @@ -173458,7 +184371,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -173467,7 +184380,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -173493,13 +184406,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L29" }, "streamlit.exception": { "name": "exception", "signature": "st.exception(exception)", - "example": "
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n", - "description": "

Display an exception.

\n", + "example": "
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n", + "description": "

Display an exception.

\n

In the lower-right corner of the exception, Streamlit displays links to\nGoogle and ChatGPT that are prefilled with the contents of the\nexception message.

\n", "args": [ { "name": "exception", @@ -173511,7 +184424,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/exception.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/exception.py#L42" }, "streamlit.expander": { "name": "expander", @@ -173545,7 +184458,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L488" }, "streamlit.experimental_audio_input": { "name": "experimental_audio_input", @@ -173553,7 +184466,7 @@ "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/audio_input.py#L204" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/audio_input.py#L207" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -173561,7 +184474,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -173569,7 +184482,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/fragment.py#L470" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/fragment.py#L471" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -173585,7 +184498,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -173603,7 +184516,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -173668,7 +184581,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L266" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -173765,7 +184678,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/file_uploader.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/file_uploader.py#L233" }, "streamlit.form": { "name": "form", @@ -173807,7 +184720,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -173895,7 +184808,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -173921,7 +184834,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/fragment.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/fragment.py#L306" }, "streamlit.get_option": { "name": "get_option", @@ -173939,7 +184852,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/config.py#L163" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/config.py#L169" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -173965,7 +184878,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", @@ -174007,11 +184920,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -174025,7 +184938,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -174043,7 +184956,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/html.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/html.py#L31" }, "streamlit.image": { "name": "image", @@ -174121,7 +185034,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -174147,7 +185060,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L130" }, "streamlit.json": { "name": "json", @@ -174173,7 +185086,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/json.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/json.py#L43" }, "streamlit.latex": { "name": "latex", @@ -174199,7 +185112,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L209" }, "streamlit.line_chart": { "name": "line_chart", @@ -174281,7 +185194,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L559" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L560" }, "streamlit.link_button": { "name": "link_button", @@ -174347,7 +185260,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L545" }, "streamlit.login": { "name": "login", @@ -174365,7 +185278,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L50" }, "streamlit.logo": { "name": "logo", @@ -174407,7 +185320,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.logout": { "name": "logout", @@ -174416,7 +185329,7 @@ "description": "

Logout the current user.

\n

This command removes the user's information from st.experimental_user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.experimental_user will not be cleared in any other session.\nst.experimental_user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.experimental_user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L289" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L288" }, "streamlit.map": { "name": "map", @@ -174498,7 +185411,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", @@ -174511,7 +185424,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
  • Small text, using the syntax :small[text to show small].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
  • Colored badges, using the syntax :color-badge[text in the badge].\ncolor must be replaced with any of the following supported\ncolors: blue, green, orange, red, violet, gray/grey, or primary.\nFor example, you can use :orange-badge[your text here] or\n:blue-badge[your text here].
  • \n
  • Small text, using the syntax :small[text to show small].
  • \n
\n", "default": "primary" }, { @@ -174532,7 +185445,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -174598,7 +185511,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", @@ -174719,7 +185632,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/multiselect.py#L106" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/multiselect.py#L107" }, "streamlit.navigation": { "name": "navigation", @@ -174729,7 +185642,7 @@ "args": [ { "name": "pages", - "type_name": "list[page-like], dict[str, list[page-like]]", + "type_name": "Sequence[page-like], Mapping[str, Sequence[page-like]]", "is_optional": false, "is_kwarg_only": false, "description": "

The available pages for the app.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of page-like objects. Page-like objects are\nanything that can be passed to st.Page or a StreamlitPage\nobject returned by st.Page.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of page-like objects for\nthat section.

\n

When you use a string or path as a page-like object, they are\ninternally passed to st.Page and converted to StreamlitPage\nobjects. In this case, the page will have the default title, icon, and\npath inferred from its path or filename. To customize these attributes\nfor your page, initialize your page with st.Page.

\n", @@ -174760,7 +185673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/navigation.py#L81" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/navigation.py#L82" }, "streamlit.number_input": { "name": "number_input", @@ -174781,7 +185694,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The minimum permitted value.\nIf None, there will be no minimum.

\n", + "description": "

The minimum permitted value.\nIf this is None (default), there will be no minimum for float\nvalues and a minimum of - (1<<53) + 1 for integer values.

\n", "default": null }, { @@ -174789,7 +185702,7 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum permitted value.\nIf None, there will be no maximum.

\n", + "description": "

The maximum permitted value.\nIf this is None (default), there will be no maximum for float\nvalues and a maximum of (1<<53) - 1 for integer values.

\n", "default": null }, { @@ -174797,7 +185710,7 @@ "type_name": "int, float, \"min\" or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The value of this widget when it first renders. If None, will initialize\nempty and return None until the user provides input.\nIf "min" (default), will initialize with min_value, or 0.0 if\nmin_value is None.

\n", + "description": "

The value of this widget when it first renders. If this is\n"min" (default), the initial value is min_value unless\nmin_value is None. If min_value is None, the widget\ninitializes with a value of 0.0 or 0.

\n

If value is None, the widget will initialize with no value\nand return None until the user provides input.

\n", "default": null }, { @@ -174889,7 +185802,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/number_input.py#L170" }, "streamlit.page_link": { "name": "page_link", @@ -174947,7 +185860,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button.py#L663" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L662" }, "streamlit.pills": { "name": "pills", @@ -175060,7 +185973,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L423" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -175133,7 +186046,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -175183,7 +186096,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L605" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L603" }, "streamlit.progress": { "name": "progress", @@ -175209,7 +186122,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -175282,7 +186195,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" }, "streamlit.pyplot": { "name": "pyplot", @@ -175324,7 +186237,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -175445,7 +186358,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/radio.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/radio.py#L124" }, "streamlit.rerun": { "name": "rerun", @@ -175462,7 +186375,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L104" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L104" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -175552,7 +186465,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1262" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1263" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -175665,7 +186578,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/button_group.py#L634" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L633" }, "streamlit.select_slider": { "name": "select_slider", @@ -175770,7 +186683,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/select_slider.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/select_slider.py#L157" }, "streamlit.selectbox": { "name": "selectbox", @@ -175883,7 +186796,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/selectbox.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/selectbox.py#L115" }, "streamlit.set_option": { "name": "set_option", @@ -175909,7 +186822,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/config.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/config.py#L121" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -175959,7 +186872,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/page_config.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/page_config.py#L133" }, "streamlit.slider": { "name": "slider", @@ -175980,24 +186893,24 @@ "type_name": "a supported type or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The minimum permitted value.\nDefaults to 0 if the value is an int, 0.0 if a float,\nvalue - timedelta(days=14) if a date/datetime, time.min if a time

\n", - "default": "0" + "description": "

The minimum permitted value.\nIf this is None (default), the minimum value depends on the\ntype as follows:

\n
    \n
  • integer: 0
  • \n
  • float: 0.0
  • \n
  • date or datetime: value - timedelta(days=14)
  • \n
  • time: time.min
  • \n
\n", + "default": null }, { "name": "max_value", "type_name": "a supported type or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The maximum permitted value.\nDefaults to 100 if the value is an int, 1.0 if a float,\nvalue + timedelta(days=14) if a date/datetime, time.max if a time

\n", - "default": "100" + "description": "

The maximum permitted value.\nIf this is None (default), the maximum value depends on the\ntype as follows:

\n
    \n
  • integer: 100
  • \n
  • float: 1.0
  • \n
  • date or datetime: value + timedelta(days=14)
  • \n
  • time: time.max
  • \n
\n", + "default": null }, { "name": "value", "type_name": "a supported type or a tuple/list of supported types or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The value of the slider when it first renders. If a tuple/list\nof two values is passed here, then a range slider with those lower\nand upper bounds is rendered. For example, if set to (1, 10) the\nslider will have a selectable range between 1 and 10.\nDefaults to min_value.

\n", - "default": "min_value" + "description": "

The value of the slider when it first renders. If a tuple/list\nof two values is passed here, then a range slider with those lower\nand upper bounds is rendered. For example, if set to (1, 10) the\nslider will have a selectable range between 1 and 10.\nThis defaults to min_value. If the type is not otherwise\nspecified in any of the numeric parameters, the widget will have an\ninteger value.

\n", + "default": "s" }, { "name": "step", @@ -176080,7 +186993,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/slider.py#L332" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/slider.py#L339" }, "streamlit.snow": { "name": "snow", @@ -176089,7 +187002,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -176115,7 +187028,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/spinner.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/spinner.py#L28" }, "streamlit.status": { "name": "status", @@ -176156,7 +187069,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L743" }, "streamlit.stop": { "name": "stop", @@ -176165,7 +187078,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -176207,7 +187120,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L115" }, "streamlit.success": { "name": "success", @@ -176233,7 +187146,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L181" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L181" }, "streamlit.switch_page": { "name": "switch_page", @@ -176251,7 +187164,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/commands/execution_control.py#L156" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L156" }, "streamlit.table": { "name": "table", @@ -176269,7 +187182,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L652" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L651" }, "streamlit.tabs": { "name": "tabs", @@ -176294,7 +187207,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/layouts.py#L385" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L383" }, "streamlit.text": { "name": "text", @@ -176320,7 +187233,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -176433,7 +187346,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/text_widgets.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/text_widgets.py#L396" }, "streamlit.text_input": { "name": "text_input", @@ -176554,7 +187467,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/text_widgets.py#L117" }, "streamlit.time_input": { "name": "time_input", @@ -176651,7 +187564,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/time_widgets.py#L348" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/time_widgets.py#L348" }, "streamlit.title": { "name": "title", @@ -176685,12 +187598,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/heading.py#L187" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L187" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -176711,7 +187624,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -176800,7 +187713,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/widgets/checkbox.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/checkbox.py#L170" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -176881,7 +187794,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L1660" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1661" }, "streamlit.video": { "name": "video", @@ -176955,7 +187868,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/media.py#L213" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/media.py#L213" }, "streamlit.warning": { "name": "warning", @@ -176981,7 +187894,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/alert.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L80" }, "streamlit.write": { "name": "write", @@ -177026,7 +187939,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/write.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/write.py#L255" }, "streamlit.write_stream": { "name": "write_stream", @@ -177051,7 +187964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -177059,7 +187972,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -177067,7 +187980,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -177082,7 +187995,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -177100,7 +188013,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -177124,7 +188037,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -177139,7 +188052,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -177164,7 +188077,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -177185,11 +188098,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -177213,11 +188126,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -177240,7 +188153,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L353" }, { "name": "query", @@ -177313,7 +188226,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L223" }, { "name": "reset", @@ -177329,7 +188242,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -177346,7 +188259,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L382" }, { "name": "engine", @@ -177361,7 +188274,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L369" }, { "name": "session", @@ -177377,10 +188290,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L395" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -177405,7 +188318,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L455" }, { "name": "query", @@ -177454,7 +188367,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L277" }, { "name": "reset", @@ -177470,7 +188383,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -177486,7 +188399,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L528" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L527" }, { "name": "write_pandas", @@ -177551,7 +188464,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L373" } ], "properties": [ @@ -177569,10 +188482,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L488" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L45", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L45", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -177614,7 +188527,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -177630,7 +188543,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -177639,7 +188552,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -177650,10 +188563,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -177671,7 +188584,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L354" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L353" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -177686,7 +188599,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L382" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -177701,7 +188614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L369" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -177774,7 +188687,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L224" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L223" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -177790,7 +188703,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -177806,7 +188719,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/sql_connection.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L395" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -177839,7 +188752,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -177855,7 +188768,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -177864,7 +188777,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -177873,7 +188786,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -177889,7 +188802,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L456" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L455" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -177938,7 +188851,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L278" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L277" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -177954,7 +188867,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L488" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -177970,7 +188883,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -177986,7 +188899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L528" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L527" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -178051,7 +188964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/snowflake_connection.py#L374" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L373" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -178067,7 +188980,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -178125,7 +189038,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1226" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1209" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -178183,7 +189096,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1016" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -178249,7 +189162,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L793" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L784" }, "streamlit.column_config.Column": { "name": "Column", @@ -178307,7 +189220,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L245" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L244" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -178405,7 +189318,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1824" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1797" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -178511,7 +189424,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1503" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1480" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -178553,7 +189466,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1325" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1306" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -178595,7 +189508,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L2105" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L2074" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -178653,7 +189566,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1127" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1112" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -178743,7 +189656,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L625" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -178785,7 +189698,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1417" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1396" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -178883,7 +189796,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L350" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L347" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -178949,7 +189862,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1980" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1951" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -179023,7 +189936,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L902" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L891" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -179105,7 +190018,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L505" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -179203,7 +190116,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/column_types.py#L1669" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1644" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -179243,7 +190156,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/components/v1/component_registry.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/components/v1/component_registry.py#L51" }, "streamlit.components.v1.html": { "name": "html", @@ -179285,7 +190198,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/iframe.py#L80" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -179327,7 +190240,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/iframe.py#L27" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -179353,7 +190266,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L736" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L735" }, "StatusContainer.update": { "name": "update", @@ -179386,7 +190299,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -179415,7 +190328,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -179439,7 +190352,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L367" }, { "name": "switch_page", @@ -179463,7 +190376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L390" } ], "properties": [ @@ -179480,7 +190393,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -179495,7 +190408,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -179510,7 +190423,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -179525,7 +190438,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -179540,7 +190453,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -179555,7 +190468,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -179570,7 +190483,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -179585,7 +190498,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -179600,7 +190513,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -179615,7 +190528,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -179630,7 +190543,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -179645,7 +190558,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -179660,7 +190573,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -179675,7 +190588,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -179690,7 +190603,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -179705,7 +190618,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -179720,7 +190633,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -179735,7 +190648,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -179750,7 +190663,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -179765,7 +190678,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -179780,7 +190693,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -179795,7 +190708,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -179810,7 +190723,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -179825,7 +190738,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -179840,7 +190753,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -179855,7 +190768,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -179870,7 +190783,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -179885,7 +190798,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -179900,7 +190813,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -179915,7 +190828,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -179930,7 +190843,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -179945,7 +190858,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -179960,7 +190873,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -179975,7 +190888,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -179990,7 +190903,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -180005,7 +190918,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -180020,7 +190933,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -180035,7 +190948,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -180050,7 +190963,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -180065,7 +190978,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -180080,7 +190993,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -180095,10 +191008,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -180138,7 +191051,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -180153,7 +191066,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -180168,7 +191081,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -180183,7 +191096,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -180198,7 +191111,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -180213,7 +191126,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -180228,7 +191141,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -180243,7 +191156,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -180258,7 +191171,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -180273,7 +191186,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -180288,7 +191201,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -180303,7 +191216,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -180318,7 +191231,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -180333,7 +191246,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -180348,7 +191261,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -180380,7 +191293,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L267" }, "AppTest.from_function": { "name": "from_function", @@ -180428,7 +191341,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L220" }, "AppTest.from_string": { "name": "from_string", @@ -180460,7 +191373,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -180484,7 +191397,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -180499,7 +191412,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -180514,7 +191427,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -180529,7 +191442,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -180544,7 +191457,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -180559,7 +191472,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -180574,7 +191487,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -180589,7 +191502,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -180604,7 +191517,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -180619,7 +191532,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -180634,7 +191547,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -180658,7 +191571,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L367" }, "AppTest.select_slider": { "name": "select_slider", @@ -180673,7 +191586,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -180688,7 +191601,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -180703,7 +191616,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -180718,7 +191631,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -180733,7 +191646,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -180748,7 +191661,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -180763,7 +191676,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -180787,7 +191700,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L390" }, "AppTest.table": { "name": "table", @@ -180802,7 +191715,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -180817,7 +191730,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -180832,7 +191745,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -180847,7 +191760,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -180862,7 +191775,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -180877,7 +191790,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -180892,7 +191805,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -180907,7 +191820,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -180922,7 +191835,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -180937,7 +191850,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -180950,7 +191863,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L339" }, { "name": "run", @@ -180967,7 +191880,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -180975,7 +191888,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L334" } ], "properties": [ @@ -180985,10 +191898,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L324" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L301", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L301", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -181013,7 +191926,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -181021,7 +191934,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L749" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L749" }, { "name": "set_value", @@ -181029,7 +191942,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L743" }, { "name": "unselect", @@ -181037,7 +191950,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L764" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L764" } ], "properties": [ @@ -181047,7 +191960,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L737" }, { "name": "indices", @@ -181055,7 +191968,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L732" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L732" }, { "name": "value", @@ -181063,10 +191976,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L722" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L722" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L696", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L696", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -181091,7 +192004,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181099,7 +192012,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L356" } ], "properties": [ @@ -181109,10 +192022,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L369" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L344", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L344", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -181128,7 +192041,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "run", @@ -181145,7 +192058,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181153,7 +192066,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L412" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L412" }, { "name": "uncheck", @@ -181161,7 +192074,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L421" } ], "properties": [ @@ -181171,10 +192084,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L402" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L402" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L380", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L380", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -181190,7 +192103,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L489" }, { "name": "run", @@ -181207,7 +192120,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181215,7 +192128,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L484" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L484" } ], "properties": [ @@ -181225,10 +192138,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L463" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L448", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L448", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -181253,7 +192166,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181261,7 +192174,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L535" } ], "properties": [ @@ -181271,10 +192184,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L549" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L515", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L515", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -181299,7 +192212,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -181309,10 +192222,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -181337,7 +192250,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -181345,7 +192258,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L837" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L837" }, { "name": "set_value", @@ -181353,7 +192266,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L831" }, { "name": "unselect", @@ -181361,7 +192274,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L852" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L852" } ], "properties": [ @@ -181371,7 +192284,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L825" }, { "name": "indices", @@ -181379,7 +192292,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L820" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L820" }, { "name": "value", @@ -181387,10 +192300,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L810" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L810" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L781", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L781", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -181406,7 +192319,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L925" }, { "name": "increment", @@ -181414,7 +192327,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L917" }, { "name": "run", @@ -181431,7 +192344,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181439,7 +192352,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L892" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L892" } ], "properties": [ @@ -181449,10 +192362,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L905" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L872", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L872", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -181477,7 +192390,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181485,7 +192398,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L976" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L976" } ], "properties": [ @@ -181495,7 +192408,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L970" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L970" }, { "name": "index", @@ -181503,7 +192416,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L953" }, { "name": "value", @@ -181511,10 +192424,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L960" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L960" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L934", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L934", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -181539,7 +192452,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -181547,7 +192460,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1122" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1122" }, { "name": "set_value", @@ -181555,7 +192468,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1084" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1084" } ], "properties": [ @@ -181565,7 +192478,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1116" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1116" }, { "name": "value", @@ -181573,10 +192486,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1105" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1105" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1066", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1066", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -181601,7 +192514,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -181609,7 +192522,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1043" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1043" }, { "name": "select_index", @@ -181617,7 +192530,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1047" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1047" }, { "name": "set_value", @@ -181625,7 +192538,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1038" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1038" } ], "properties": [ @@ -181635,7 +192548,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1032" }, { "name": "index", @@ -181643,7 +192556,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1012" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1012" }, { "name": "value", @@ -181651,10 +192564,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1022" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1022" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L994", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L994", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -181679,7 +192592,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -181687,7 +192600,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1175" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1175" }, { "name": "set_value", @@ -181695,7 +192608,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1146" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1146" } ], "properties": [ @@ -181705,10 +192618,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1164" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1164" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1127", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1127", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -181724,7 +192637,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1256" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1256" }, { "name": "run", @@ -181741,7 +192654,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181749,7 +192662,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1232" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1232" } ], "properties": [ @@ -181759,10 +192672,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1245" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1245" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1214", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1214", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -181778,7 +192691,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1309" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1309" }, { "name": "run", @@ -181795,7 +192708,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181803,7 +192716,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1285" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1285" } ], "properties": [ @@ -181813,10 +192726,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1298" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1298" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1267", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1267", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -181832,7 +192745,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1374" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1374" }, { "name": "increment", @@ -181840,7 +192753,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1367" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1367" }, { "name": "run", @@ -181857,7 +192770,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181865,7 +192778,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1339" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1339" } ], "properties": [ @@ -181875,10 +192788,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1355" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1355" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1323", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1323", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -181903,7 +192816,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181911,7 +192824,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1431" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1431" } ], "properties": [ @@ -181921,10 +192834,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1421" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1421" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L1398", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1398", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -181949,7 +192862,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -181957,7 +192870,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -181967,10 +192880,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -181988,7 +192901,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L505" }, "context.cookies": { "name": "cookies", @@ -181997,7 +192910,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L183" }, "context.headers": { "name": "headers", @@ -182006,7 +192919,16 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L137" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L137" + }, + "context.locale": { + "name": "locale", + "signature": "context.locale", + "example": "

Access the user's locale to display locally:

\n
\nimport streamlit as st\n\nif st.context.locale == "fr-FR":\n    st.write("Bonjour!")\nelse:\n    st.write("Hello!")\n
\n", + "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L273" }, "context.timezone": { "name": "timezone", @@ -182015,7 +192937,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L217" }, "context.timezone_offset": { "name": "timezone_offset", @@ -182024,7 +192946,7 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L246" }, "CachedFunc.clear": { "name": "clear", @@ -182050,7 +192972,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_utils.py#L346" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_utils.py#L349" }, "StreamlitPage": { "name": "StreamlitPage", @@ -182063,7 +192985,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L269" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L268" } ], "properties": [ @@ -182073,7 +192995,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L245" }, { "name": "title", @@ -182081,7 +193003,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L235" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L234" }, { "name": "url_path", @@ -182089,10 +193011,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L254" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L253" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L129", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -182125,7 +193047,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L245" }, "StreamlitPage.run": { "name": "run", @@ -182133,7 +193055,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L269" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L268" }, "StreamlitPage.title": { "name": "title", @@ -182141,7 +193063,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L235" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L234" }, "StreamlitPage.url_path": { "name": "url_path", @@ -182149,7 +193071,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/navigation/page.py#L254" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L253" }, "streamlit.experimental_user": { "name": "experimental_user", @@ -182169,11 +193091,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L506" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L505" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/user_info.py#L371", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L370", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.experimental_user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.experimental_user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.experimental_user is dependent on the host platform running your\nStreamlit app. If the host platform has not configured the function, it\nwill behave as in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.experimental_user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.experimental_user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.experimental_user["email"] or st.experimental_user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -182200,7 +193122,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L183" }, { "name": "headers", @@ -182209,7 +193131,16 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L137" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L137" + }, + { + "name": "locale", + "signature": "st.locale.locale", + "example": "

Access the user's locale to display locally:

\n
\nimport streamlit as st\n\nif st.context.locale == "fr-FR":\n    st.write("Bonjour!")\nelse:\n    st.write("Hello!")\n
\n", + "description": "

The read-only locale of the user's browser.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L273" }, { "name": "timezone", @@ -182218,7 +193149,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L217" }, { "name": "timezone_offset", @@ -182227,10 +193158,10 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L246" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/context.py#L126", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L126", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -182240,7 +193171,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L168", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -182260,7 +193191,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/plotly_chart.py#L80", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -182301,7 +193232,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/vega_charts.py#L109", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L109", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -182321,7 +193252,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -182340,7 +193271,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -182367,7 +193298,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -182386,7 +193317,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -182409,7 +193340,7 @@ "is_attribute_dict": true } }, - "1.44.0": { + "1.45.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -182465,7 +193396,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -182530,7 +193461,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1499" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1499" }, "streamlit.area_chart": { "name": "area_chart", @@ -182620,7 +193551,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L756" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L756" }, "streamlit.audio": { "name": "audio", @@ -182686,7 +193617,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/media.py#L72" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", @@ -182767,7 +193698,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/audio_input.py#L93" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/audio_input.py#L89" }, "streamlit.badge": { "name": "badge", @@ -182801,7 +193732,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L281" }, "streamlit.balloons": { "name": "balloons", @@ -182810,7 +193741,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -182908,7 +193839,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L997" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L997" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -182934,7 +193865,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", @@ -183031,7 +193962,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L88" }, "streamlit.cache": { "name": "cache", @@ -183105,7 +194036,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -183175,7 +194106,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -183245,7 +194176,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", @@ -183326,7 +194257,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/camera_input.py#L89" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/camera_input.py#L89" }, "streamlit.caption": { "name": "caption", @@ -183360,12 +194291,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L146" }, "streamlit.chat_input": { "name": "chat_input", "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, accept_file=False, file_type=None, disabled=False, on_submit=None, args=None, kwargs=None)", - "examples": "

Example 1: Pin the the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n", + "examples": "

Example 1: Pin the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n", "description": "

Display a chat input widget.

\n", "args": [ { @@ -183449,7 +194380,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/chat.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/chat.py#L367" }, "streamlit.chat_message": { "name": "chat_message", @@ -183482,7 +194413,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/chat.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/chat.py#L223" }, "streamlit.checkbox": { "name": "checkbox", @@ -183571,7 +194502,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/checkbox.py#L59" }, "streamlit.code": { "name": "code", @@ -183621,7 +194552,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/code.py#L29" }, "streamlit.color_picker": { "name": "color_picker", @@ -183710,7 +194641,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/color_picker.py#L61" }, "streamlit.columns": { "name": "columns", @@ -183759,7 +194690,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L176" }, "streamlit.connection": { "name": "connection", @@ -183816,7 +194747,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/connection_factory.py#L205" }, "streamlit.container": { "name": "container", @@ -183850,7 +194781,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L43" }, "streamlit.data_editor": { "name": "data_editor", @@ -183979,7 +194910,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/data_editor.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/data_editor.py#L580" }, "streamlit.dataframe": { "name": "dataframe", @@ -184084,13 +195015,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L258" }, "streamlit.date_input": { "name": "date_input", "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", "examples": "
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n", - "description": "

Display a date input widget.

\n

The first day of the week is determined from the user's locale in their\nbrowser.

\n", + "description": "

Display a date input widget.

\n

The date input widget can be configured to accept a single date or a\ndate range. The first day of the week is determined from the user's\nlocale in their browser.

\n", "args": [ { "name": "label", @@ -184197,7 +195128,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/time_widgets.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/time_widgets.py#L632" }, "streamlit.dialog": { "name": "dialog", @@ -184223,7 +195154,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/dialog_decorator.py#L134" }, "streamlit.divider": { "name": "divider", @@ -184232,7 +195163,7 @@ "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L261" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L261" }, "streamlit.download_button": { "name": "download_button", @@ -184353,7 +195284,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L258" }, "streamlit.echo": { "name": "echo", @@ -184371,7 +195302,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -184380,11 +195311,11 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", - "signature": "st.error(body, *, icon=None)", + "signature": "st.error(body, *, icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.error('This is an error', icon="\ud83d\udea8")\n
\n", "description": "

Display error message.

\n", "args": [ @@ -184403,16 +195334,24 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L32" }, "streamlit.exception": { "name": "exception", - "signature": "st.exception(exception)", + "signature": "st.exception(exception, width=\"stretch\")", "example": "
\nimport streamlit as st\n\ne = RuntimeError("This is an exception of type RuntimeError")\nst.exception(e)\n
\n", - "description": "

Display an exception.

\n

In the lower-right corner of the exception, Streamlit displays links to\nGoogle and ChatGPT that are prefilled with the contents of the\nexception message.

\n", + "description": "

Display an exception.

\n

When accessing the app through localhost, in the lower-right corner\nof the exception, Streamlit displays links to Google and ChatGPT that\nare prefilled with the contents of the exception message.

\n", "args": [ { "name": "exception", @@ -184421,10 +195360,18 @@ "is_kwarg_only": false, "description": "

The exception to display.

\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The desired width of the exception expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the exception\nto match the width of the parent container. Otherwise, this must be\nan integer. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the exception to\nmatch the width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/exception.py#L42" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/exception.py#L45" }, "streamlit.expander": { "name": "expander", @@ -184458,15 +195405,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L488" - }, - "streamlit.experimental_audio_input": { - "name": "experimental_audio_input", - "signature": "st.experimental_audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", - "description": "

Deprecated alias for st.audio_input.

\n

See the docstring for the widget's new name.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/audio_input.py#L207" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L488" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -184474,7 +195413,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/dialog_decorator.py#L243" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -184482,7 +195421,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/fragment.py#L471" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/fragment.py#L471" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -184498,7 +195437,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -184516,7 +195455,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -184581,7 +195520,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L266" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L297" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -184678,7 +195617,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/file_uploader.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/file_uploader.py#L233" }, "streamlit.form": { "name": "form", @@ -184720,7 +195659,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/form.py#L62" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -184808,7 +195747,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/form.py#L191" }, "streamlit.fragment": { "name": "fragment", @@ -184834,7 +195773,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/fragment.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/fragment.py#L306" }, "streamlit.get_option": { "name": "get_option", @@ -184852,7 +195791,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/config.py#L169" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/config.py#L174" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -184878,7 +195817,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", @@ -184920,11 +195859,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L43" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=)", "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -184938,7 +195877,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/doc_string.py#L44" }, "streamlit.html": { "name": "html", @@ -184951,12 +195890,12 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The HTML code to insert. This can be one of the following:

\n
    \n
  • A string of HTML code.
  • \n
  • A path to a local file with HTML code. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Any object. If body is not a string or path, Streamlit will\nconvert the object to a string. body._repr_html_() takes\nprecedence over str(body) when available.
  • \n
\n", + "description": "

The HTML code to insert. This can be one of the following:

\n
    \n
  • A string of HTML code.
  • \n
  • A path to a local file with HTML code. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Any object. If body is not a string or path, Streamlit will\nconvert the object to a string. body._repr_html_() takes\nprecedence over str(body) when available.
  • \n
\n

If the resulting HTML content is empty, Streamlit will raise an\nerror.

\n

If body is a path to a CSS file, Streamlit will wrap the CSS\ncontent in <style> tags automatically. When the resulting HTML\ncontent only contains style tags, Streamlit will send the content\nto the event container instead of the main container to avoid\ntaking up space in the app.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/html.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/html.py#L34" }, "streamlit.image": { "name": "image", @@ -185034,11 +195973,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", - "signature": "st.info(body, *, icon=None)", + "signature": "st.info(body, *, icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.info('This is a purely informational message', icon="\u2139\ufe0f")\n
\n", "description": "

Display an informational message.

\n", "args": [ @@ -185057,10 +195996,18 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L130" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L173" }, "streamlit.json": { "name": "json", @@ -185086,7 +196033,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/json.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/json.py#L43" }, "streamlit.latex": { "name": "latex", @@ -185112,7 +196059,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L209" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L209" }, "streamlit.line_chart": { "name": "line_chart", @@ -185194,7 +196141,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L560" }, "streamlit.link_button": { "name": "link_button", @@ -185260,13 +196207,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L545" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L545" }, "streamlit.login": { "name": "login", "signature": "st.login(provider=None)", - "examples": "

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"  # fmt: skip\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.experimental_user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!)\n
\n", - "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.experimental_user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.experimental_user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command.
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.
  • \n
  • For security reasons, authentication is not supported for embedded\napps.
  • \n
\n
\n", + "examples": "

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"  # fmt: skip\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!)\n
\n", + "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command.
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.
  • \n
  • For security reasons, authentication is not supported for embedded\napps.
  • \n
\n
\n", "args": [ { "name": "provider", @@ -185278,7 +196225,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L54" }, "streamlit.logo": { "name": "logo", @@ -185320,16 +196267,16 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/logo.py#L33" }, "streamlit.logout": { "name": "logout", "signature": "st.logout()", - "example": "

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.experimental_user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.experimental_user.name}!")\n
\n", - "description": "

Logout the current user.

\n

This command removes the user's information from st.experimental_user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.experimental_user will not be cleared in any other session.\nst.experimental_user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.experimental_user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", + "example": "

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n", + "description": "

Logout the current user.

\n

This command removes the user's information from st.user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.user will not be cleared in any other session.\nst.user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L288" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L292" }, "streamlit.map": { "name": "map", @@ -185411,7 +196358,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", @@ -185445,7 +196392,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L33" }, "streamlit.metric": { "name": "metric", @@ -185511,12 +196458,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/metric.py#L51" }, "streamlit.multiselect": { "name": "multiselect", - "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors",\n    ["Green", "Yellow", "Red", "Blue"],\n    ["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n", + "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False)", + "examples": "

Example 1: Use a basic multiselect widget

\n

You can declare one or more initial selections with the default\nparameter.

\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors?",\n    ["Green", "Yellow", "Red", "Blue"],\n    default=["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n

Example 2: Let users to add new options

\n

To allow users to enter and select new options that aren't included in\nthe options list, use the accept_new_options parameter. To\nprevent users from adding an unbounded number of new options, use the\nmax_selections parameter.

\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite cat names?",\n    ["Jellybeans", "Fish Biscuit", "Madam President"],\n    max_selections=5,\n    accept_new_options=True,\n)\n\nst.write("You selected:", options)\n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ { @@ -185601,11 +196548,11 @@ }, { "name": "placeholder", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nDefaults to "Choose an option."

\n", - "default": "s" + "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays one of the two\nfollowing placeholder strings:

\n
    \n
  • "Choose an option" is displayed if you set\naccept_new_options=False.
  • \n
  • "Choose or add an option" is displayed if you set\naccept_new_options=True.
  • \n
\n", + "default": null }, { "name": "disabled", @@ -185622,6 +196569,14 @@ "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "accept_new_options", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the user can add selections that aren't included in options.\nIf this is False (default), the user can only select from the\nitems in options. If this is True, the user can enter new\nitems that don't exist in options.

\n

When a user enters and selects a new item, it is included in the\nwidget's returned list as a string. The new item is not added to\nthe widget's drop-down menu. Streamlit will use a case-insensitive\nmatch from options before adding a new item, and a new item\ncan't be added if a case-insensitive match is already selected. The\nmax_selections argument is still enforced.

\n", + "default": null } ], "returns": [ @@ -185632,7 +196587,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/multiselect.py#L107" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/multiselect.py#L219" }, "streamlit.navigation": { "name": "navigation", @@ -185673,11 +196628,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/navigation.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/navigation.py#L83" }, "streamlit.number_input": { "name": "number_input", - "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None)", "example": "
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input(\n    "Insert a number", value=None, placeholder="Type a number..."\n)\nst.write("The current number is ", number)\n
\n", "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ @@ -185792,6 +196747,14 @@ "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "icon", + "type_name": "str, None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display within the input field to the\nleft of the value. If icon is None (default), no icon is\ndisplayed. If icon is a string, the following options are\nvalid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [ @@ -185802,7 +196765,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/number_input.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/number_input.py#L171" }, "streamlit.page_link": { "name": "page_link", @@ -185860,7 +196823,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button.py#L662" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L662" }, "streamlit.pills": { "name": "pills", @@ -185973,7 +196936,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L454" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -186046,7 +197009,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -186096,7 +197059,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L603" }, "streamlit.progress": { "name": "progress", @@ -186122,7 +197085,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/progress.py#L95" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -186195,7 +197158,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" }, "streamlit.pyplot": { "name": "pyplot", @@ -186237,7 +197200,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -186358,7 +197321,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/radio.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/radio.py#L124" }, "streamlit.rerun": { "name": "rerun", @@ -186375,7 +197338,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L104" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L104" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -186465,7 +197428,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1263" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1263" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -186578,7 +197541,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/button_group.py#L633" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L664" }, "streamlit.select_slider": { "name": "select_slider", @@ -186683,12 +197646,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/select_slider.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/select_slider.py#L157" }, "streamlit.selectbox": { "name": "selectbox", - "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=\"Choose an option\", disabled=False, label_visibility=\"visible\")", - "example": "
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

To initialize an empty selectbox, use None as the index value:

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n", + "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False)", + "examples": "

Example 1: Use a basic selectbox widget

\n

If no index is provided, the first option is selected by default.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

Example 2: Use a selectbox widget with no initial selection

\n

To initialize an empty selectbox, use None as the index value.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n

Example 3: Let users add a new option

\n

To allow users to add a new option that isn't included in the\noptions list, use the accept_new_options=True parameter. You\ncan also customize the placeholder text.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "Default email",\n    ["foo@example.com", "bar@example.com", "baz@example.com"],\n    index=None,\n    placeholder="Select a saved email or enter a new one",\n    accept_new_options=True,\n)\n\nst.write("You selected:", option)\n
\n", "description": "

Display a select widget.

\n", "args": [ { @@ -186765,11 +197728,11 @@ }, { "name": "placeholder", - "type_name": "str", + "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nDefaults to "Choose an option".

\n", - "default": "s" + "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays one of the two\nfollowing placeholder strings:

\n
    \n
  • "Choose an option" is displayed if you set\naccept_new_options=False.
  • \n
  • "Choose or add an option" is displayed if you set\naccept_new_options=True.
  • \n
\n", + "default": null }, { "name": "disabled", @@ -186786,6 +197749,14 @@ "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "accept_new_options", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the user can add a selection that isn't included in options.\nIf this is False (default), the user can only select from the\nitems in options. If this is True, the user can enter a new\nitem that doesn't exist in options.

\n

When a user enters a new item, it is returned by the widget as a\nstring. The new item is not added to the widget's drop-down menu.\nStreamlit will use a case-insensitive match from options before\nadding a new item.

\n", + "default": null } ], "returns": [ @@ -186796,7 +197767,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/selectbox.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/selectbox.py#L232" }, "streamlit.set_option": { "name": "set_option", @@ -186822,7 +197793,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/config.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/config.py#L125" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -186872,7 +197843,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/page_config.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/page_config.py#L133" }, "streamlit.slider": { "name": "slider", @@ -186993,7 +197964,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/slider.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/slider.py#L339" }, "streamlit.snow": { "name": "snow", @@ -187002,7 +197973,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -187028,7 +197999,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/spinner.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/spinner.py#L28" }, "streamlit.status": { "name": "status", @@ -187069,7 +198040,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L743" }, "streamlit.stop": { "name": "stop", @@ -187078,7 +198049,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -187120,11 +198091,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L115" }, "streamlit.success": { "name": "success", - "signature": "st.success(body, *, icon=None)", + "signature": "st.success(body, *, icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.success('This is a success message!', icon="\u2705")\n
\n", "description": "

Display a success message.

\n", "args": [ @@ -187143,10 +198114,18 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L181" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L244" }, "streamlit.switch_page": { "name": "switch_page", @@ -187164,7 +198143,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/commands/execution_control.py#L156" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L159" }, "streamlit.table": { "name": "table", @@ -187182,7 +198161,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L651" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L651" }, "streamlit.tabs": { "name": "tabs", @@ -187207,7 +198186,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/layouts.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L383" }, "streamlit.text": { "name": "text", @@ -187233,7 +198212,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/text.py#L29" }, "streamlit.text_area": { "name": "text_area", @@ -187346,11 +198325,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/text_widgets.py#L396" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/text_widgets.py#L421" }, "streamlit.text_input": { "name": "text_input", - "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None)", "example": "
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n", "description": "

Display a single-line text input widget.

\n", "args": [ @@ -187455,8 +198434,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.

\n", "default": "is" + }, + { + "name": "icon", + "type_name": "str, None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional emoji or icon to display within the input field to the\nleft of the value. If icon is None (default), no icon is\ndisplayed. If icon is a string, the following options are\nvalid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "default": null } ], "returns": [ @@ -187467,7 +198454,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/text_widgets.py#L117" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/text_widgets.py#L118" }, "streamlit.time_input": { "name": "time_input", @@ -187564,7 +198551,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/time_widgets.py#L348" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/time_widgets.py#L348" }, "streamlit.title": { "name": "title", @@ -187598,13 +198585,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/heading.py#L187" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L187" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", - "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's bottom-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", + "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's top-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { "name": "body", @@ -187624,7 +198611,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/toast.py#L39" }, "streamlit.toggle": { "name": "toggle", @@ -187713,7 +198700,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/widgets/checkbox.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/checkbox.py#L170" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -187766,7 +198753,7 @@ "type_name": "\"ignore\", \"rerun\", or callable", "is_optional": false, "is_kwarg_only": true, - "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.vega_lite_chart will\nreturn the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.vega_lite_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the Vega-Lite spec defined in data or\nspec must include selection parameters from the the charting\nlibrary. To learn about defining interactions in Vega-Lite, see\nDynamic Behaviors with Parameters\nin Vega-Lite's documentation.

\n", + "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.vega_lite_chart will\nreturn the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.vega_lite_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the Vega-Lite spec defined in data or\nspec must include selection parameters from the charting\nlibrary. To learn about defining interactions in Vega-Lite, see\nDynamic Behaviors with Parameters\nin Vega-Lite's documentation.

\n", "default": null }, { @@ -187794,7 +198781,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L1661" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1661" }, "streamlit.video": { "name": "video", @@ -187868,11 +198855,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/media.py#L213" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/media.py#L213" }, "streamlit.warning": { "name": "warning", - "signature": "st.warning(body, *, icon=None)", + "signature": "st.warning(body, *, icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.warning('This is a warning', icon="\u26a0\ufe0f")\n
\n", "description": "

Display warning message.

\n", "args": [ @@ -187891,10 +198878,18 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/alert.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L103" }, "streamlit.write": { "name": "write", @@ -187939,7 +198934,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/write.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/write.py#L255" }, "streamlit.write_stream": { "name": "write_stream", @@ -187964,7 +198959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -187972,7 +198967,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -187980,7 +198975,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -187995,7 +198990,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -188013,7 +199008,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -188037,7 +199032,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -188052,7 +199047,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -188077,7 +199072,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -188098,11 +199093,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -188126,11 +199121,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -188153,7 +199148,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L353" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L353" }, { "name": "query", @@ -188226,7 +199221,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L223" }, { "name": "reset", @@ -188242,7 +199237,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -188259,7 +199254,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L382" }, { "name": "engine", @@ -188274,7 +199269,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L369" }, { "name": "session", @@ -188290,10 +199285,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L395" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -188318,7 +199313,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L455" }, { "name": "query", @@ -188367,7 +199362,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L277" }, { "name": "reset", @@ -188383,7 +199378,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -188399,7 +199394,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L527" }, { "name": "write_pandas", @@ -188464,7 +199459,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L373" } ], "properties": [ @@ -188482,10 +199477,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L488" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L45", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L45", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -188527,7 +199522,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -188543,7 +199538,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -188552,7 +199547,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -188563,10 +199558,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -188584,7 +199579,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L353" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L353" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -188599,7 +199594,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L382" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -188614,7 +199609,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L369" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -188687,7 +199682,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L223" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -188703,7 +199698,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -188719,7 +199714,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/sql_connection.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L395" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -188752,7 +199747,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -188768,7 +199763,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -188777,7 +199772,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -188786,7 +199781,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -188802,7 +199797,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L455" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -188851,7 +199846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L277" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -188867,7 +199862,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L488" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -188883,7 +199878,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -188899,7 +199894,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L527" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -188964,7 +199959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/snowflake_connection.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L373" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -188980,7 +199975,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -189038,7 +200033,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1209" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1209" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -189096,7 +200091,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1016" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1016" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -189162,7 +200157,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L784" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L784" }, "streamlit.column_config.Column": { "name": "Column", @@ -189220,7 +200215,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L244" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -189318,7 +200313,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1797" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1797" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -189424,7 +200419,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1480" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1480" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -189466,7 +200461,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1306" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1306" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -189508,7 +200503,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L2074" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L2074" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -189566,7 +200561,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1112" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1112" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -189656,7 +200651,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L625" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -189698,7 +200693,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1396" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1396" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -189796,7 +200791,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L347" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -189862,7 +200857,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1951" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1951" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -189936,7 +200931,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L891" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L891" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -190018,7 +201013,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L505" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L505" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -190116,7 +201111,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/column_types.py#L1644" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1644" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -190156,11 +201151,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/components/v1/component_registry.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/components/v1/component_registry.py#L51" }, "streamlit.components.v1.html": { "name": "html", - "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False)", + "signature": "st.components.v1.html(html, width=None, height=None, scrolling=False, *, tab_index=None)", "example": "
\nimport streamlit.components.v1 as components\n\ncomponents.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n", "description": "

Display an HTML string in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n

If you want to insert HTML text into your app without an iframe, try\nst.html instead.

\n
\n

Warning

\n

Using st.components.v1.html directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ @@ -190195,14 +201190,22 @@ "is_kwarg_only": false, "description": "

Whether to allow scrolling in the iframe. If this False\n(default), Streamlit crops any content larger than the iframe and\ndoes not show a scrollbar. If this is True, Streamlit shows a\nscrollbar when the content is larger than the iframe.

\n", "default": null + }, + { + "name": "tab_index", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies how and if the iframe is sequentially focusable.\nUsers typically use the Tab key for sequential focus\nnavigation.

\n

This can be one of the following values:

\n
    \n
  • None (default): Uses the browser's default behavior.
  • \n
  • -1: Removes the iframe from sequential navigation, but still\nallows it to be focused programmatically.
  • \n
  • 0: Includes the iframe in sequential navigation in the order\nit appears in the document but after all elements with a positive\ntab_index.
  • \n
  • Positive integer: Includes the iframe in sequential navigation.\nElements are navigated in ascending order of their positive\ntab_index.
  • \n
\n

For more information, see the tabindex\ndocumentation on MDN.

\n", + "default": "behavior" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/iframe.py#L80" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/iframe.py#L105" }, "streamlit.components.v1.iframe": { "name": "iframe", - "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False)", + "signature": "st.components.v1.iframe(src, width=None, height=None, scrolling=False, *, tab_index=None)", "example": "
\nimport streamlit.components.v1 as components\n\ncomponents.iframe("https://example.com", height=500)\n
\n", "description": "

Load a remote URL in an iframe.

\n

To use this function, import it from the streamlit.components.v1\nmodule.

\n
\n

Warning

\n

Using st.components.v1.iframe directly (instead of importing\nits module) is deprecated and will be disallowed in a later version.

\n
\n", "args": [ @@ -190237,10 +201240,18 @@ "is_kwarg_only": false, "description": "

Whether to allow scrolling in the iframe. If this False\n(default), Streamlit crops any content larger than the iframe and\ndoes not show a scrollbar. If this is True, Streamlit shows a\nscrollbar when the content is larger than the iframe.

\n", "default": null + }, + { + "name": "tab_index", + "type_name": "int or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies how and if the iframe is sequentially focusable.\nUsers typically use the Tab key for sequential focus\nnavigation.

\n

This can be one of the following values:

\n
    \n
  • None (default): Uses the browser's default behavior.
  • \n
  • -1: Removes the iframe from sequential navigation, but still\nallows it to be focused programmatically.
  • \n
  • 0: Includes the iframe in sequential navigation in the order\nit appears in the document but after all elements with a positive\ntab_index.
  • \n
  • Positive integer: Includes the iframe in sequential navigation.\nElements are navigated in ascending order of their positive\ntab_index.
  • \n
\n

For more information, see the tabindex\ndocumentation on MDN.

\n", + "default": "behavior" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/iframe.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/iframe.py#L28" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -190266,7 +201277,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L735" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L735" }, "StatusContainer.update": { "name": "update", @@ -190299,7 +201310,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -190328,7 +201339,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1024" }, { "name": "run", @@ -190352,7 +201363,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L367" }, { "name": "switch_page", @@ -190376,7 +201387,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L390" } ], "properties": [ @@ -190393,7 +201404,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L445" }, { "name": "button_group", @@ -190408,7 +201419,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L460" }, { "name": "caption", @@ -190423,7 +201434,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L474" }, { "name": "chat_input", @@ -190438,7 +201449,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L488" }, { "name": "chat_message", @@ -190453,7 +201464,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L502" }, { "name": "checkbox", @@ -190468,7 +201479,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L516" }, { "name": "code", @@ -190483,7 +201494,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L530" }, { "name": "color_picker", @@ -190498,7 +201509,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L544" }, { "name": "columns", @@ -190513,7 +201524,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L558" }, { "name": "dataframe", @@ -190528,7 +201539,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L575" }, { "name": "date_input", @@ -190543,7 +201554,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L589" }, { "name": "divider", @@ -190558,7 +201569,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L603" }, { "name": "error", @@ -190573,7 +201584,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L617" }, { "name": "exception", @@ -190588,7 +201599,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L631" }, { "name": "expander", @@ -190603,7 +201614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L645" }, { "name": "header", @@ -190618,7 +201629,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L659" }, { "name": "info", @@ -190633,7 +201644,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L673" }, { "name": "json", @@ -190648,7 +201659,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L687" }, { "name": "latex", @@ -190663,7 +201674,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L701" }, { "name": "main", @@ -190678,7 +201689,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L419" }, { "name": "markdown", @@ -190693,7 +201704,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L715" }, { "name": "metric", @@ -190708,7 +201719,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L729" }, { "name": "multiselect", @@ -190723,7 +201734,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L743" }, { "name": "number_input", @@ -190738,7 +201749,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L757" }, { "name": "radio", @@ -190753,7 +201764,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L771" }, { "name": "select_slider", @@ -190768,7 +201779,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L785" }, { "name": "selectbox", @@ -190783,7 +201794,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L799" }, { "name": "sidebar", @@ -190798,7 +201809,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L432" }, { "name": "slider", @@ -190813,7 +201824,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L813" }, { "name": "status", @@ -190828,7 +201839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L855" }, { "name": "subheader", @@ -190843,7 +201854,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L827" }, { "name": "success", @@ -190858,7 +201869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L841" }, { "name": "table", @@ -190873,7 +201884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L869" }, { "name": "tabs", @@ -190888,7 +201899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L883" }, { "name": "text", @@ -190903,7 +201914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L903" }, { "name": "text_area", @@ -190918,7 +201929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L917" }, { "name": "text_input", @@ -190933,7 +201944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L931" }, { "name": "time_input", @@ -190948,7 +201959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L945" }, { "name": "title", @@ -190963,7 +201974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L959" }, { "name": "toast", @@ -190978,7 +201989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L973" }, { "name": "toggle", @@ -190993,7 +202004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L987" }, { "name": "warning", @@ -191008,10 +202019,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1001" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -191051,7 +202062,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L445" }, "AppTest.button_group": { "name": "button_group", @@ -191066,7 +202077,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L460" }, "AppTest.caption": { "name": "caption", @@ -191081,7 +202092,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L474" }, "AppTest.chat_input": { "name": "chat_input", @@ -191096,7 +202107,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L488" }, "AppTest.chat_message": { "name": "chat_message", @@ -191111,7 +202122,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L502" }, "AppTest.checkbox": { "name": "checkbox", @@ -191126,7 +202137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L516" }, "AppTest.code": { "name": "code", @@ -191141,7 +202152,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L530" }, "AppTest.color_picker": { "name": "color_picker", @@ -191156,7 +202167,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L544" }, "AppTest.columns": { "name": "columns", @@ -191171,7 +202182,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L558" }, "AppTest.dataframe": { "name": "dataframe", @@ -191186,7 +202197,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L575" }, "AppTest.date_input": { "name": "date_input", @@ -191201,7 +202212,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L589" }, "AppTest.divider": { "name": "divider", @@ -191216,7 +202227,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L603" }, "AppTest.error": { "name": "error", @@ -191231,7 +202242,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L617" }, "AppTest.exception": { "name": "exception", @@ -191246,7 +202257,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L631" }, "AppTest.expander": { "name": "expander", @@ -191261,7 +202272,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L645" }, "AppTest.from_file": { "name": "from_file", @@ -191293,7 +202304,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L267" }, "AppTest.from_function": { "name": "from_function", @@ -191341,7 +202352,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L220" }, "AppTest.from_string": { "name": "from_string", @@ -191373,7 +202384,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -191397,7 +202408,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1024" }, "AppTest.header": { "name": "header", @@ -191412,7 +202423,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L659" }, "AppTest.info": { "name": "info", @@ -191427,7 +202438,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L673" }, "AppTest.json": { "name": "json", @@ -191442,7 +202453,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L687" }, "AppTest.latex": { "name": "latex", @@ -191457,7 +202468,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L701" }, "AppTest.main": { "name": "main", @@ -191472,7 +202483,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L419" }, "AppTest.markdown": { "name": "markdown", @@ -191487,7 +202498,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L715" }, "AppTest.metric": { "name": "metric", @@ -191502,7 +202513,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L729" }, "AppTest.multiselect": { "name": "multiselect", @@ -191517,7 +202528,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L743" }, "AppTest.number_input": { "name": "number_input", @@ -191532,7 +202543,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L757" }, "AppTest.radio": { "name": "radio", @@ -191547,7 +202558,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L771" }, "AppTest.run": { "name": "run", @@ -191571,7 +202582,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L367" }, "AppTest.select_slider": { "name": "select_slider", @@ -191586,7 +202597,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L785" }, "AppTest.selectbox": { "name": "selectbox", @@ -191601,7 +202612,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L799" }, "AppTest.sidebar": { "name": "sidebar", @@ -191616,7 +202627,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L432" }, "AppTest.slider": { "name": "slider", @@ -191631,7 +202642,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L813" }, "AppTest.status": { "name": "status", @@ -191646,7 +202657,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L855" }, "AppTest.subheader": { "name": "subheader", @@ -191661,7 +202672,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L827" }, "AppTest.success": { "name": "success", @@ -191676,7 +202687,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L841" }, "AppTest.switch_page": { "name": "switch_page", @@ -191700,7 +202711,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L390" }, "AppTest.table": { "name": "table", @@ -191715,7 +202726,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L869" }, "AppTest.tabs": { "name": "tabs", @@ -191730,7 +202741,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L883" }, "AppTest.text": { "name": "text", @@ -191745,7 +202756,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L903" }, "AppTest.text_area": { "name": "text_area", @@ -191760,7 +202771,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L917" }, "AppTest.text_input": { "name": "text_input", @@ -191775,7 +202786,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L931" }, "AppTest.time_input": { "name": "time_input", @@ -191790,7 +202801,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L945" }, "AppTest.title": { "name": "title", @@ -191805,7 +202816,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L959" }, "AppTest.toast": { "name": "toast", @@ -191820,7 +202831,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L973" }, "AppTest.toggle": { "name": "toggle", @@ -191835,7 +202846,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L987" }, "AppTest.warning": { "name": "warning", @@ -191850,7 +202861,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1001" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -191863,7 +202874,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L339" }, { "name": "run", @@ -191880,7 +202891,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -191888,7 +202899,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L334" } ], "properties": [ @@ -191898,10 +202909,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L324" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L301", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L301", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -191926,7 +202937,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -191934,7 +202945,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L749" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L749" }, { "name": "set_value", @@ -191942,7 +202953,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L743" }, { "name": "unselect", @@ -191950,7 +202961,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L764" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L764" } ], "properties": [ @@ -191960,7 +202971,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L737" }, { "name": "indices", @@ -191968,7 +202979,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L732" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L732" }, { "name": "value", @@ -191976,10 +202987,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L722" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L722" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L696", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L696", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -192004,7 +203015,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192012,7 +203023,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L356" } ], "properties": [ @@ -192022,10 +203033,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L369" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L344", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L344", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -192041,7 +203052,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L417" }, { "name": "run", @@ -192058,7 +203069,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192066,7 +203077,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L412" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L412" }, { "name": "uncheck", @@ -192074,7 +203085,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L421" } ], "properties": [ @@ -192084,10 +203095,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L402" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L402" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L380", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L380", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -192103,7 +203114,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L489" }, { "name": "run", @@ -192120,7 +203131,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192128,7 +203139,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L484" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L484" } ], "properties": [ @@ -192138,10 +203149,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L463" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L448", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L448", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -192166,7 +203177,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192174,7 +203185,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L535" } ], "properties": [ @@ -192184,10 +203195,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L549" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L515", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L515", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -192212,7 +203223,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -192222,10 +203233,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -192250,7 +203261,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -192258,7 +203269,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L837" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L842" }, { "name": "set_value", @@ -192266,7 +203277,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L831" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L836" }, { "name": "unselect", @@ -192274,7 +203285,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L852" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L857" } ], "properties": [ @@ -192284,7 +203295,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L830" }, { "name": "indices", @@ -192292,7 +203303,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L820" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L820" }, { "name": "value", @@ -192300,10 +203311,18 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L810" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L810" + }, + { + "name": "values", + "signature": "st.testing.v1.element_tree.values.values", + "description": "

The currently selected values from the options. (list)

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L825" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L781", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L781", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -192319,7 +203338,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L930" }, { "name": "increment", @@ -192327,7 +203346,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L922" }, { "name": "run", @@ -192344,7 +203363,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192352,7 +203371,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L892" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L897" } ], "properties": [ @@ -192362,10 +203381,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L905" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L910" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L872", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L877", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -192390,7 +203409,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192398,7 +203417,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L976" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L981" } ], "properties": [ @@ -192408,7 +203427,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L970" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L975" }, { "name": "index", @@ -192416,7 +203435,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L958" }, { "name": "value", @@ -192424,10 +203443,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L960" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L965" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L934", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L939", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -192452,7 +203471,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -192460,7 +203479,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1122" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1127" }, { "name": "set_value", @@ -192468,7 +203487,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1084" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1089" } ], "properties": [ @@ -192478,7 +203497,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1116" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1121" }, { "name": "value", @@ -192486,10 +203505,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1105" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1110" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1066", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1071", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -192514,7 +203533,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -192522,7 +203541,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1043" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1048" }, { "name": "select_index", @@ -192530,7 +203549,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1047" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1052" }, { "name": "set_value", @@ -192538,7 +203557,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1038" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1043" } ], "properties": [ @@ -192548,7 +203567,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1037" }, { "name": "index", @@ -192556,7 +203575,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1012" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1017" }, { "name": "value", @@ -192564,10 +203583,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1022" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1027" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L994", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L999", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -192592,7 +203611,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -192600,7 +203619,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1175" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1180" }, { "name": "set_value", @@ -192608,7 +203627,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1146" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1151" } ], "properties": [ @@ -192618,10 +203637,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1164" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1169" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1127", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1132", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -192637,7 +203656,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1256" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1261" }, { "name": "run", @@ -192654,7 +203673,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192662,7 +203681,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1232" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1237" } ], "properties": [ @@ -192672,10 +203691,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1245" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1250" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1214", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1219", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -192691,7 +203710,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1309" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1314" }, { "name": "run", @@ -192708,7 +203727,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192716,7 +203735,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1285" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1290" } ], "properties": [ @@ -192726,10 +203745,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1298" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1303" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1267", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1272", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -192745,7 +203764,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1374" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1379" }, { "name": "increment", @@ -192753,7 +203772,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1367" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1372" }, { "name": "run", @@ -192770,7 +203789,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192778,7 +203797,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1339" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1344" } ], "properties": [ @@ -192788,10 +203807,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1355" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1360" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1323", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1328", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -192816,7 +203835,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192824,7 +203843,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1431" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1436" } ], "properties": [ @@ -192834,10 +203853,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1421" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1426" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L1398", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1403", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -192862,7 +203881,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -192870,7 +203889,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -192880,18 +203899,18 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] }, - "streamlit.experimental_user.to_dict": { - "name": "experimental_user.to_dict", - "signature": "st.experimental_user.to_dict()", - "description": "

Get user info as a dictionary.

\n

This method primarily exists for internal use and is not needed for\nmost cases. st.experimental_user returns an object that inherits from\ndict by default.

\n", + "streamlit.user.to_dict": { + "name": "to_dict", + "signature": "st.user.to_dict()", + "description": "

Get user info as a dictionary.

\n

This method primarily exists for internal use and is not needed for\nmost cases. st.user returns an object that inherits from\ndict by default.

\n", "args": [], "returns": [ { @@ -192901,7 +203920,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L505" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L509" }, "context.cookies": { "name": "cookies", @@ -192910,7 +203929,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L184" }, "context.headers": { "name": "headers", @@ -192919,7 +203938,25 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L137" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L138" + }, + "context.ip_address": { + "name": "ip_address", + "signature": "context.ip_address", + "example": "

Check if the user has an IPv4 or IPv6 address:

\n
\nimport streamlit as st\n\nip = st.context.ip_address\nif ip is None:\n    st.write("No IP address. This is expected in local development.")\nelif ip.contains(":"):\n    st.write("You have an IPv6 address.")\nelif ip.contains("."):\n    st.write("You have an IPv4 address.")\nelse:\n    st.error("This should not happen.")\n
\n", + "description": "

The read-only IP address of the user's connection.

\n

This should not be used for security measures because it can easily be\nspoofed. When a user accesses the app through localhost, the IP\naddress is None. Otherwise, the IP address is determined from the\nremote_ip attribute of the Tornado request object and may be an\nIPv4 or IPv6 address.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L337" + }, + "context.is_embedded": { + "name": "is_embedded", + "signature": "context.is_embedded", + "example": "

Conditionally show content when the app is running in an embedded\ncontext:

\n
\nimport streamlit as st\n\nif st.context.is_embedded:\n    st.write("You are running the app in an embedded context.")\n
\n", + "description": "

Whether the app is embedded.

\n

This property returns a boolean value indicating whether the app is\nrunning in an embedded context. This is determined by the presence of\nembed=true as a query parameter in the URL. This is the only way to\ndetermine if the app is currently configured for embedding because\nembedding settings are not accessible through st.query_params or\nst.context.url.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L375" }, "context.locale": { "name": "locale", @@ -192928,7 +203965,7 @@ "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L273" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L274" }, "context.timezone": { "name": "timezone", @@ -192937,7 +203974,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L218" }, "context.timezone_offset": { "name": "timezone_offset", @@ -192946,7 +203983,16 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L247" + }, + "context.url": { + "name": "url", + "signature": "context.url", + "example": "

Conditionally show content when you access your app through\nlocalhost:

\n
\nimport streamlit as st\n\nif st.context.url.startswith("http://localhost"):\n    st.write("You are running the app locally.")\n
\n", + "description": "

The read-only URL of the app in the user's browser.

\n

st.context.url returns the URL through which the user is accessing\nthe app. This includes the scheme, domain name, port, and path. If\nquery parameters or anchors are present in the URL, they are removed\nand not included in this value.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L303" }, "CachedFunc.clear": { "name": "clear", @@ -192972,7 +204018,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/caching/cache_utils.py#L349" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_utils.py#L349" }, "StreamlitPage": { "name": "StreamlitPage", @@ -192985,7 +204031,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L268" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L268" } ], "properties": [ @@ -192995,7 +204041,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L245" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L245" }, { "name": "title", @@ -193003,7 +204049,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L234" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L234" }, { "name": "url_path", @@ -193011,10 +204057,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L253" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L253" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L128", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -193047,7 +204093,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L245" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L245" }, "StreamlitPage.run": { "name": "run", @@ -193055,7 +204101,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L268" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L268" }, "StreamlitPage.title": { "name": "title", @@ -193063,7 +204109,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L234" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L234" }, "StreamlitPage.url_path": { "name": "url_path", @@ -193071,11 +204117,11 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/navigation/page.py#L253" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L253" }, - "streamlit.experimental_user": { - "name": "experimental_user", - "signature": "st.experimental_user()", + "streamlit.user": { + "name": "user", + "signature": "st.user()", "is_class": true, "methods": [ { @@ -193091,13 +204137,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L505" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L509" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/user_info.py#L370", - "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.experimental_user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.experimental_user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.experimental_user.is_logged_in:\n    st.write(st.experimental_user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", - "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.experimental_user is dependent on the host platform running your\nStreamlit app. If the host platform has not configured the function, it\nwill behave as in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.experimental_user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.experimental_user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.experimental_user["email"] or st.experimental_user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L374", + "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", + "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.user is dependent on the host platform running your\nStreamlit app. If your host platform has not configured the object,\nst.user will behave as it does in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.user["email"] or st.user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ { "name": "is_logged_in", @@ -193122,7 +204168,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L183" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L184" }, { "name": "headers", @@ -193131,7 +204177,25 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L137" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L138" + }, + { + "name": "ip_address", + "signature": "st.ip_address.ip_address", + "example": "

Check if the user has an IPv4 or IPv6 address:

\n
\nimport streamlit as st\n\nip = st.context.ip_address\nif ip is None:\n    st.write("No IP address. This is expected in local development.")\nelif ip.contains(":"):\n    st.write("You have an IPv6 address.")\nelif ip.contains("."):\n    st.write("You have an IPv4 address.")\nelse:\n    st.error("This should not happen.")\n
\n", + "description": "

The read-only IP address of the user's connection.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L337" + }, + { + "name": "is_embedded", + "signature": "st.is_embedded.is_embedded", + "example": "

Conditionally show content when the app is running in an embedded\ncontext:

\n
\nimport streamlit as st\n\nif st.context.is_embedded:\n    st.write("You are running the app in an embedded context.")\n
\n", + "description": "

Whether the app is embedded.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L375" }, { "name": "locale", @@ -193140,7 +204204,7 @@ "description": "

The read-only locale of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L273" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L274" }, { "name": "timezone", @@ -193149,7 +204213,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L217" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L218" }, { "name": "timezone_offset", @@ -193158,10 +204222,19 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L246" + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L247" + }, + { + "name": "url", + "signature": "st.url.url", + "example": "

Conditionally show content when you access your app through\nlocalhost:

\n
\nimport streamlit as st\n\nif st.context.url.startswith("http://localhost"):\n    st.write("You are running the app locally.")\n
\n", + "description": "

The read-only URL of the app in the user's browser.

", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L303" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/runtime/context.py#L126", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L127", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -193171,7 +204244,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L168", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -193191,7 +204264,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/plotly_chart.py#L80", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -193232,7 +204305,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/vega_charts.py#L109", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L109", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -193252,7 +204325,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -193271,7 +204344,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -193298,7 +204371,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -193317,7 +204390,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.44.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -193340,7 +204413,7 @@ "is_attribute_dict": true } }, - "1.45.0": { + "1.46.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -193396,7 +204469,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -193441,7 +204514,7 @@ "type_name": "\"ignore\", \"rerun\", or callable", "is_optional": false, "is_kwarg_only": true, - "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.altair_chart will return\nthe selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.altair_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the object passed to altair_chart must\ninclude selection paramters. To learn about defining interactions\nin Altair and how to declare selection-type parameters, see\nInteractive Charts\nin Altair's documentation.

\n", + "description": "

How the figure should respond to user selection events. This\ncontrols whether or not the figure behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the chart. The figure will not behave like an input\nwidget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\ndata in the chart. In this case, st.altair_chart will return\nthe selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.altair_chart will return the selection data\nas a dictionary.
  • \n
\n

To use selection events, the object passed to altair_chart must\ninclude selection parameters. To learn about defining interactions\nin Altair and how to declare selection-type parameters, see\nInteractive Charts\nin Altair's documentation.

\n", "default": null }, { @@ -193461,7 +204534,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1499" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1529" }, "streamlit.area_chart": { "name": "area_chart", @@ -193551,11 +204624,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L756" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L782" }, "streamlit.audio": { "name": "audio", - "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False, autoplay=False)", + "signature": "st.audio(data, format=\"audio/wav\", start_time=0, *, sample_rate=None, end_time=None, loop=False, autoplay=False, width=\"stretch\")", "examples": "

To display an audio player for a local file, specify the file's string\npath and format.

\n
\nimport streamlit as st\n\nst.audio("cat-purr.mp3", format="audio/mpeg", loop=True)\n
\n

You can also pass bytes or numpy.ndarray objects to st.audio.

\n
\nimport streamlit as st\nimport numpy as np\n\naudio_file = open("myaudio.ogg", "rb")\naudio_bytes = audio_file.read()\n\nst.audio(audio_bytes, format="audio/ogg")\n\nsample_rate = 44100  # 44100 samples per second\nseconds = 2  # Note duration of 2 seconds\nfrequency_la = 440  # Our played note will be 440 Hz\n# Generate array with seconds*sample_rate steps, ranging between 0 and seconds\nt = np.linspace(0, seconds, seconds * sample_rate, False)\n# Generate a 440 Hz sine wave\nnote_la = np.sin(frequency_la * t * 2 * np.pi)\n\nst.audio(note_la, sample_rate=sample_rate)\n
\n", "description": "

Display an audio player.

\n", "args": [ @@ -193614,14 +204687,22 @@ "is_kwarg_only": true, "description": "

Whether the audio file should start playing automatically. This is\nFalse by default. Browsers will not autoplay audio files if the\nuser has not interacted with the page by clicking somewhere.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the audio player element. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/media.py#L72" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/media.py#L74" }, "streamlit.audio_input": { "name": "audio_input", - "signature": "st.audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.audio_input(label, *, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "
\nimport streamlit as st\n\naudio_value = st.audio_input("Record a voice message")\n\nif audio_value:\n    st.audio(audio_value)\n
\n", "description": "

Display a widget that returns an audio recording from the user's microphone.

\n", "args": [ @@ -193686,8 +204767,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the audio input widget. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -193698,11 +204787,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/audio_input.py#L89" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/audio_input.py#L88" }, "streamlit.badge": { "name": "badge", - "signature": "st.badge(label, *, icon=None, color=\"blue\")", + "signature": "st.badge(label, *, icon=None, color=\"blue\", width=\"content\")", "examples": "

Create standalone badges with st.badge (with or without icons). If\nyou want to have multiple, side-by-side badges, you can use the\nMarkdown directive in st.markdown.

\n
\nimport streamlit as st\n\nst.badge("New")\nst.badge("Success", icon=":material/check:", color="green")\n\nst.markdown(\n    ":violet-badge[:material/star: Favorite] :orange-badge[\u26a0\ufe0f Needs review] :gray-badge[Deprecated]"\n)\n
\n", "description": "

Display a colored badge with an icon and label.

\n

This is a thin wrapper around the color-badge Markdown directive.\nThe following are equivalent:

\n
    \n
  • st.markdown(":blue-badge[Home]")
  • \n
  • st.badge("Home", color="blue")
  • \n
\n
\n

Note

\n

You can insert badges everywhere Streamlit supports Markdown by\nusing the color-badge Markdown directive. See st.markdown for\nmore information.

\n
\n", "args": [ @@ -193729,10 +204818,18 @@ "is_kwarg_only": true, "description": "

The color to use for the badge. This defaults to "blue".

\n

This can be one of the following supported colors: blue, green,\norange, red, violet, gray/grey, or primary. If you use\n"primary", Streamlit will use the default primary accent color\nunless you set the theme.primaryColor configuration option.

\n", "default": "s" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the badge element. This can be one of the following:

\n
    \n
  • "content" (default): The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the element matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L281" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L355" }, "streamlit.balloons": { "name": "balloons", @@ -193741,7 +204838,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -193839,7 +204936,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L997" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1024" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -193865,7 +204962,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", @@ -193962,7 +205059,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L88" }, "streamlit.cache": { "name": "cache", @@ -194036,7 +205133,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", @@ -194106,7 +205203,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_data_api.py#L379" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_data_api.py#L382" }, "streamlit.cache_resource": { "name": "cache_resource", @@ -194176,11 +205273,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" }, "streamlit.camera_input": { "name": "camera_input", - "signature": "st.camera_input(label, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.camera_input(label, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nenable = st.checkbox("Enable camera")\npicture = st.camera_input("Take a picture", disabled=not enable)\n\nif picture:\n    st.image(picture)\n
\n", "description": "

Display a widget that returns pictures from the user's webcam.

\n", "args": [ @@ -194245,8 +205342,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the camera input widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -194257,11 +205362,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/camera_input.py#L89" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/camera_input.py#L88" }, "streamlit.caption": { "name": "caption", - "signature": "st.caption(body, unsafe_allow_html=False, *, help=None)", + "signature": "st.caption(body, unsafe_allow_html=False, *, help=None, width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nst.caption("This is a string that explains something above.")\nst.caption("A caption with _italics_ :blue[colors] and emojis :sunglasses:")\n
\n", "description": "

Display text in small font.

\n

This should be used for captions, asides, footnotes, sidenotes, and\nother explanatory text.

\n", "args": [ @@ -194288,14 +205393,22 @@ "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the caption. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the caption element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L168" }, "streamlit.chat_input": { "name": "chat_input", - "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, accept_file=False, file_type=None, disabled=False, on_submit=None, args=None, kwargs=None)", + "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, accept_file=False, file_type=None, disabled=False, on_submit=None, args=None, kwargs=None, width=\"stretch\")", "examples": "

Example 1: Pin the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n", "description": "

Display a chat input widget.

\n", "args": [ @@ -194370,6 +205483,14 @@ "is_kwarg_only": true, "description": "

An optional dict of kwargs to pass to the callback.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the chat input widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -194380,13 +205501,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/chat.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/chat.py#L402" }, "streamlit.chat_message": { "name": "chat_message", - "signature": "st.chat_message(name, *, avatar=None)", + "signature": "st.chat_message(name, *, avatar=None, width=\"stretch\")", "examples": "

You can use with notation to insert any element into an expander

\n
\nimport streamlit as st\nimport numpy as np\n\nwith st.chat_message("user"):\n    st.write("Hello \ud83d\udc4b")\n    st.line_chart(np.random.randn(30, 3))\n
\n

Or you can just call methods directly in the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\nmessage = st.chat_message("assistant")\nmessage.write("Hello human")\nmessage.bar_chart(np.random.randn(30, 3))\n
\n", - "description": "

Insert a chat message container.

\n

To add elements to the returned container, you can use with notation\n(preferred) or just call methods directly on the returned object. See the\nexamples below.

\n", + "description": "

Insert a chat message container.

\n

To add elements to the returned container, you can use with notation\n(preferred) or just call methods directly on the returned object. See the\nexamples below.

\n
\n

Note

\n

To follow best design practices and maintain a good appearance on\nall screen sizes, don't nest chat message containers.

\n
\n", "args": [ { "name": "name", @@ -194403,6 +205524,14 @@ "is_kwarg_only": true, "description": "

The avatar shown next to the message.

\n

If avatar is None (default), the icon will be determined\nfrom name as follows:

\n
    \n
  • If name is "user" or "human", the message will have a\ndefault user icon.
  • \n
  • If name is "ai" or "assistant", the message will have\na default bot icon.
  • \n
  • For all other values of name, the message will show the first\nletter of the name.
  • \n
\n

In addition to the types supported by st.image (except list),\nthe following strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set avatar="\ud83e\uddd1\u200d\ud83d\udcbb"\nor avatar="\ud83e\udd96". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": "user" + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the chat message container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • "content": The width of the container matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -194413,11 +205542,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/chat.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/chat.py#L226" }, "streamlit.checkbox": { "name": "checkbox", - "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"content\")", "example": "
\nimport streamlit as st\n\nagree = st.checkbox("I agree")\n\nif agree:\n    st.write("Great!")\n
\n", "description": "

Display a checkbox widget.

\n", "args": [ @@ -194490,8 +205619,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the checkbox widget. This can be one of the following:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -194502,11 +205639,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/checkbox.py#L59" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/checkbox.py#L64" }, "streamlit.code": { "name": "code", - "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False, height=None)", + "signature": "st.code(body, language=\"python\", *, line_numbers=False, wrap_lines=False, height=\"content\", width=\"stretch\")", "examples": "
\nimport streamlit as st\n\ncode = '''def hello():\n    print("Hello, Streamlit!")'''\nst.code(code, language="python")\n
\n
\nimport streamlit as st\ncode = '''Is it a crown or boat?\n                        ii\n                      iiiiii\nWWw                 .iiiiiiii.                ...:\n WWWWWWw          .iiiiiiiiiiii.         ........\n  WWWWWWWWWWw    iiiiiiiiiiiiiiii    ...........\n   WWWWWWWWWWWWWWwiiiiiiiiiiiiiiiii............\n    WWWWWWWWWWWWWWWWWWwiiiiiiiiiiiiii.........\n     WWWWWWWWWWWWWWWWWWWWWWwiiiiiiiiii.......\n      WWWWWWWWWWWWWWWWWWWWWWWWWWwiiiiiii....\n       WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWwiiii.\n          -MMMWWWWWWWWWWWWWWWWWWWWWWMMM-\n'''\nst.code(code, language=None)\n
\n", "description": "

Display a code block with optional syntax highlighting.

\n", "args": [ @@ -194544,19 +205681,27 @@ }, { "name": "height", - "type_name": "int or None", + "type_name": "\"content\" or int", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the code block expressed in pixels. If height\nis None (default), Streamlit sets the element's height to fit\nits content. Vertical scrolling within the element is enabled when\nthe height does not accomodate all lines.

\n", + "description": "

The height of the code block element. This can be one of the following:

\n
    \n
  • "content" (default): The height of the element matches the\nheight of its content.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", + "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the code block element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/code.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/code.py#L35" }, "streamlit.color_picker": { "name": "color_picker", - "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.color_picker(label, value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"content\")", "example": "
\nimport streamlit as st\n\ncolor = st.color_picker("Pick A Color", "#00f900")\nst.write("The current color is", color)\n
\n", "description": "

Display a color picker widget.

\n", "args": [ @@ -194629,8 +205774,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the color picker widget. This can be one of the\nfollowing:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -194641,13 +205794,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/color_picker.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/color_picker.py#L66" }, "streamlit.columns": { "name": "columns", "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\", border=False)", "examples": "

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n", - "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n

Columns can only be placed inside other columns up to one level of nesting.

\n
\n

Warning

\n

Columns cannot be placed inside other columns in the sidebar. This\nis only possible in the main area of the app.

\n
\n", + "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Note

\n

To follow best design practices and maintain a good appearance on\nall screen sizes, don't nest columns more than once.

\n
\n", "args": [ { "name": "spec", @@ -194659,11 +205812,11 @@ }, { "name": "gap", - "type_name": "\"small\", \"medium\", or \"large\"", + "type_name": "\"small\", \"medium\", \"large\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The size of the gap between the columns. The default is "small".

\n", - "default": "is" + "description": "

The size of the gap between the columns. This can be one of the\nfollowing:

\n
    \n
  • "small" (default): 1rem gap between the columns.
  • \n
  • "medium": 2rem gap between the columns.
  • \n
  • "large": 4rem gap between the columns.
  • \n
  • None: No gap between the columns.
  • \n
\n

The rem unit is relative to the theme.baseFontSize\nconfiguration option.

\n", + "default": null }, { "name": "vertical_alignment", @@ -194690,7 +205843,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L176" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L190" }, "streamlit.connection": { "name": "connection", @@ -194711,7 +205864,7 @@ "type_name": "str, connection class, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The type of connection to create. This can be one of the following:

\n
    \n
  • None (default): Streamlit will infer the connection type from\nname. If the type is not inferrable from name, the type must\nbe specified in secrets.toml instead.
  • \n
  • "snowflake": Streamlit will initialize a connection with\nSnowflakeConnection.
  • \n
  • "snowpark": Streamlit will initialize a connection with\nSnowparkConnection. This is deprecated.
  • \n
  • "sql": Streamlit will initialize a connection with\nSQLConnection.
  • \n
  • A string path to an importable class: This must be a dot-separated\nmodule path ending in the importable class. Streamlit will import the\nclass and initialize a connection with it. The class must extend\nst.connections.BaseConnection.
  • \n
  • An imported class reference: Streamlit will initialize a connection\nwith the referenced class, which must extend\nst.connections.BaseConnection.
  • \n
\n", + "description": "

The type of connection to create. This can be one of the following:

\n
    \n
  • None (default): Streamlit will infer the connection type from\nname. If the type is not inferable from name, the type must\nbe specified in secrets.toml instead.
  • \n
  • "snowflake": Streamlit will initialize a connection with\nSnowflakeConnection.
  • \n
  • "snowpark": Streamlit will initialize a connection with\nSnowparkConnection. This is deprecated.
  • \n
  • "sql": Streamlit will initialize a connection with\nSQLConnection.
  • \n
  • A string path to an importable class: This must be a dot-separated\nmodule path ending in the importable class. Streamlit will import the\nclass and initialize a connection with it. The class must extend\nst.connections.BaseConnection.
  • \n
  • An imported class reference: Streamlit will initialize a connection\nwith the referenced class, which must extend\nst.connections.BaseConnection.
  • \n
\n", "default": null }, { @@ -194735,7 +205888,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": true, - "description": "

Connection-specific keyword arguments that are passed to the\nconnection's ._connect() method. **kwargs are typically\ncombined with (and take precendence over) key-value pairs in\nsecrets.toml. To learn more, see the specific connection's\ndocumentation.

\n", + "description": "

Connection-specific keyword arguments that are passed to the\nconnection's ._connect() method. **kwargs are typically\ncombined with (and take precedence over) key-value pairs in\nsecrets.toml. To learn more, see the specific connection's\ndocumentation.

\n", "default": null } ], @@ -194747,7 +205900,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/connection_factory.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/connection_factory.py#L206" }, "streamlit.container": { "name": "container", @@ -194760,7 +205913,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the container expressed in pixels. If None (default)\nthe container grows to fit its content. If a fixed height, scrolling is\nenabled for large content and a grey border is shown around the container\nto visually separate its scroll surface from the rest of the app.

\n
\n

Note

\n

Use containers with scroll sparingly. If you do, try to keep\nthe height small (below 500 pixels). Otherwise, the scroll\nsurface of the container might cover the majority of the screen\non mobile devices, which makes it hard to scroll the rest of the app.

\n
\n", + "description": "

Desired height of the container expressed in pixels. If None (default)\nthe container grows to fit its content. If a fixed height, scrolling is\nenabled for large content and a grey border is shown around the container\nto visually separate its scroll surface from the rest of the app.

\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", "default": null }, { @@ -194781,7 +205934,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L50" }, "streamlit.data_editor": { "name": "data_editor", @@ -194810,7 +205963,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accomodate all rows.

\n", + "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accommodate all rows.

\n", "default": null }, { @@ -194842,7 +205995,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values", format="$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", "default": null }, { @@ -194910,7 +206063,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/data_editor.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/data_editor.py#L618" }, "streamlit.dataframe": { "name": "dataframe", @@ -194939,7 +206092,7 @@ "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired height of the dataframe expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the dataframe element is\nenabled when the height does not accomodate all rows.

\n", + "description": "

Desired height of the dataframe expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the dataframe element is\nenabled when the height does not accommodate all rows.

\n", "default": null }, { @@ -194971,7 +206124,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values\u201d, format=\u201d$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values", format="$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", "default": null }, { @@ -195015,11 +206168,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L258" }, "streamlit.date_input": { "name": "date_input", - "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\")", + "signature": "st.date_input(label, value=\"today\", min_value=None, max_value=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, format=\"YYYY/MM/DD\", disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", datetime.date(2019, 7, 6))\nst.write("Your birthday is:", d)\n
\n
\nimport datetime\nimport streamlit as st\n\ntoday = datetime.datetime.now()\nnext_year = today.year + 1\njan_1 = datetime.date(next_year, 1, 1)\ndec_31 = datetime.date(next_year, 12, 31)\n\nd = st.date_input(\n    "Select your vacation for next year",\n    (jan_1, datetime.date(next_year, 1, 7)),\n    jan_1,\n    dec_31,\n    format="MM.DD.YYYY",\n)\nd\n
\n

To initialize an empty date input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nd = st.date_input("When's your birthday", value=None)\nst.write("Your birthday is:", d)\n
\n", "description": "

Display a date input widget.

\n

The date input widget can be configured to accept a single date or a\ndate range. The first day of the week is determined from the user's\nlocale in their browser.

\n", "args": [ @@ -195116,8 +206269,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the date input widget. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -195128,7 +206289,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/time_widgets.py#L632" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/time_widgets.py#L653" }, "streamlit.dialog": { "name": "dialog", @@ -195154,21 +206315,30 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/dialog_decorator.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/dialog_decorator.py#L133" }, "streamlit.divider": { "name": "divider", - "signature": "st.divider()", + "signature": "st.divider(*, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.divider()\n
\n", "description": "

Display a horizontal rule.

\n
\n

Note

\n

You can achieve the same effect with st.write("---") or\neven just "---" in your script (via magic).

\n
\n", - "args": [], + "args": [ + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the divider element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null + } + ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L261" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L318" }, "streamlit.download_button": { "name": "download_button", "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=\"rerun\", args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\neffeciently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

If you pass a string to the data argument, Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", + "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\nefficiently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

If you pass a string to the data argument, Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ { @@ -195284,7 +206454,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L258" }, "streamlit.echo": { "name": "echo", @@ -195302,7 +206472,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -195311,7 +206481,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -195337,15 +206507,15 @@ }, { "name": "width", - "type_name": "int or \"stretch\"", + "type_name": "\"stretch\" or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "description": "

The width of the alert element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L32" }, "streamlit.exception": { "name": "exception", @@ -195363,21 +206533,21 @@ }, { "name": "width", - "type_name": "int or \"stretch\"", + "type_name": "\"stretch\" or int", "is_optional": false, "is_kwarg_only": false, - "description": "

The desired width of the exception expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the exception\nto match the width of the parent container. Otherwise, this must be\nan integer. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the exception to\nmatch the width of the parent container.

\n", + "description": "

The width of the exception element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/exception.py#L45" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", - "signature": "st.expander(label, expanded=False, *, icon=None)", + "signature": "st.expander(label, expanded=False, *, icon=None, width=\"stretch\")", "examples": "

You can use the with notation to insert any element into an expander

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nwith st.expander("See explanation"):\n    st.write('''\n        The chart above shows some numbers I picked for you.\n        I rolled actual dice for these, so they're *guaranteed* to\n        be random.\n    ''')\n    st.image("https://static.streamlit.io/examples/dice.jpg")\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\nst.bar_chart({"data": [1, 5, 2, 6, 2, 1]})\n\nexpander = st.expander("See explanation")\nexpander.write('''\n    The chart above shows some numbers I picked for you.\n    I rolled actual dice for these, so they're *guaranteed* to\n    be random.\n''')\nexpander.image("https://static.streamlit.io/examples/dice.jpg")\n
\n", - "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

Currently, you may not put expanders inside another expander.

\n
\n", + "description": "

Insert a multi-element container that can be expanded/collapsed.

\n

Inserts a container into your app that can be used to hold multiple elements\nand can be expanded or collapsed by the user. When collapsed, all that is\nvisible is the provided label.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Note

\n

All content within the expander is computed and sent to the\nfrontend, even if the expander is closed.

\n

To follow best design practices and maintain a good appearance on\nall screen sizes, don't nest expanders.

\n
\n", "args": [ { "name": "label", @@ -195402,10 +206572,18 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the expander label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the expander container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L544" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -195413,7 +206591,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/dialog_decorator.py#L243" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/dialog_decorator.py#L242" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -195421,7 +206599,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/fragment.py#L471" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/fragment.py#L471" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -195437,7 +206615,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -195455,7 +206633,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -195520,11 +206698,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L297" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L291" }, "streamlit.file_uploader": { "name": "file_uploader", - "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Choose a CSV file", accept_multiple_files=True\n)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n", "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option. For\nmore information on how to set config options, see config.toml.

\n", "args": [ @@ -195605,8 +206783,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the file uploader widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -195617,11 +206803,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/file_uploader.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/file_uploader.py#L240" }, "streamlit.form": { "name": "form", - "signature": "st.form(key, clear_on_submit=False, *, enter_to_submit=True, border=True)", + "signature": "st.form(key, clear_on_submit=False, *, enter_to_submit=True, border=True, width=\"stretch\", height=\"content\")", "examples": "

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.form("my_form"):\n    st.write("Inside the form")\n    slider_val = st.slider("Form slider")\n    checkbox_val = st.checkbox("Form checkbox")\n\n    # Every form must have a submit button.\n    submitted = st.form_submit_button("Submit")\n    if submitted:\n        st.write("slider", slider_val, "checkbox", checkbox_val)\nst.write("Outside the form")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\nform = st.form("my_form")\nform.slider("Inside the form")\nst.slider("Outside the form")\n\n# Now add a submit button to the form:\nform.form_submit_button("Submit")\n
\n", "description": "

Create a form that batches elements together with a "Submit" button.

\n

A form is a container that visually groups other elements and\nwidgets together, and contains a Submit button. When the form's\nSubmit button is pressed, all widget values inside the form will be\nsent to Streamlit in a batch.

\n

To add elements to a form object, you can use with notation\n(preferred) or just call methods directly on the form. See\nexamples below.

\n

Forms have a few constraints:

\n
    \n
  • Every form must contain a st.form_submit_button.
  • \n
  • st.button and st.download_button cannot be added to a form.
  • \n
  • Forms can appear anywhere in your app (sidebar, columns, etc),\nbut they cannot be embedded inside other forms.
  • \n
  • Within a form, the only widget that can have a callback function is\nst.form_submit_button.
  • \n
\n", "args": [ @@ -195656,10 +206842,26 @@ "is_kwarg_only": true, "description": "

Whether to show a border around the form. Defaults to True.

\n
\n

Note

\n

Not showing a border can be confusing to viewers since interacting with a\nwidget in the form will do nothing. You should only remove the border if\nthere's another border (e.g. because of an expander) or the form is small\n(e.g. just a text input and a submit button).

\n
\n", "default": "True" + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the form container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • "content": The width of the container matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null + }, + { + "name": "height", + "type_name": "\"content\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The height of the form container. This can be one of the following:

\n
    \n
  • "content" (default): The height of the container matches the\nheight of its content.
  • \n
  • An integer specifying the height in pixels: The container has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/form.py#L62" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/form.py#L69" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -195747,7 +206949,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/form.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/form.py#L232" }, "streamlit.fragment": { "name": "fragment", @@ -195773,7 +206975,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/fragment.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/fragment.py#L306" }, "streamlit.get_option": { "name": "get_option", @@ -195791,7 +206993,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/config.py#L174" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/config.py#L177" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -195817,11 +207019,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", - "signature": "st.header(body, anchor=None, *, help=None, divider=False)", + "signature": "st.header(body, anchor=None, *, help=None, divider=False, width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nst.header("_Streamlit_ is :blue[cool] :sunglasses:")\nst.header("This is a header with a divider", divider="gray")\nst.header("These headers have rotating dividers", divider=True)\nst.header("One", divider=True)\nst.header("Two", divider=True)\nst.header("Three", divider=True)\nst.header("Four", divider=True)\n
\n", "description": "

Display text in header formatting.

\n", "args": [ @@ -195851,19 +207053,27 @@ }, { "name": "divider", - "type_name": "bool or \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", + "type_name": "bool, \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", "is_optional": false, "is_kwarg_only": true, "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the header element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L45" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=)", + "signature": "st.help(obj=, *, width=\"stretch\")", "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -195874,10 +207084,18 @@ "is_kwarg_only": false, "description": "

The object whose information should be displayed. If left\nunspecified, this call will display help for Streamlit itself.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the help element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/doc_string.py#L44" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/doc_string.py#L46" }, "streamlit.html": { "name": "html", @@ -195895,7 +207113,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/html.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/html.py#L34" }, "streamlit.image": { "name": "image", @@ -195973,7 +207191,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -195999,19 +207217,19 @@ }, { "name": "width", - "type_name": "int or \"stretch\"", + "type_name": "\"stretch\" or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "description": "

The width of the info element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L173" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L177" }, "streamlit.json": { "name": "json", - "signature": "st.json(body, *, expanded=True)", + "signature": "st.json(body, *, expanded=True, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.json(\n    {\n        "foo": "bar",\n        "stuff": [\n            "stuff 1",\n            "stuff 2",\n            "stuff 3",\n        ],\n        "level1": {"level2": {"level3": {"a": "b"}}},\n    },\n    expanded=2,\n)\n
\n", "description": "

Display an object or string as a pretty-printed, interactive JSON string.

\n", "args": [ @@ -196030,14 +207248,22 @@ "is_kwarg_only": true, "description": "

The initial expansion state of the JSON element. This can be one\nof the following:

\n
    \n
  • True (default): The element is fully expanded.
  • \n
  • False: The element is fully collapsed.
  • \n
  • An integer: The element is expanded to the depth specified. The\ninteger must be non-negative. expanded=0 is equivalent to\nexpanded=False.
  • \n
\n

Regardless of the initial expansion state, users can collapse or\nexpand any key-value pair to show or hide any part of the object.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the JSON element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/json.py#L43" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/json.py#L48" }, "streamlit.latex": { "name": "latex", - "signature": "st.latex(body, *, help=None)", + "signature": "st.latex(body, *, help=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.latex(r'''\n    a + ar + a r^2 + a r^3 + \\cdots + a r^{n-1} =\n    \\sum_{k=0}^{n-1} ar^k =\n    a \\left(\\frac{1-r^{n}}{1-r}\\right)\n    ''')\n
\n", "description": "

Display mathematical expressions formatted as LaTeX.

\n

Supported LaTeX functions are listed at\nhttps://katex.org/docs/supported.html.

\n", "args": [ @@ -196056,10 +207282,18 @@ "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the LaTeX expression. If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the LaTeX element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L209" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L248" }, "streamlit.line_chart": { "name": "line_chart", @@ -196141,7 +207375,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L560" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L585" }, "streamlit.link_button": { "name": "link_button", @@ -196207,7 +207441,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L545" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L545" }, "streamlit.login": { "name": "login", @@ -196225,7 +207459,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L54" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L55" }, "streamlit.logo": { "name": "logo", @@ -196267,7 +207501,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/logo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/logo.py#L37" }, "streamlit.logout": { "name": "logout", @@ -196276,13 +207510,13 @@ "description": "

Logout the current user.

\n

This command removes the user's information from st.user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.user will not be cleared in any other session.\nst.user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L292" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L293" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True, width=None, height=None)", "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n", - "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", + "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n", "args": [ { "name": "data", @@ -196358,11 +207592,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", - "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None)", + "signature": "st.markdown(body, unsafe_allow_html=False, *, help=None, width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nst.markdown("*Streamlit* is **really** ***cool***.")\nst.markdown('''\n    :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]\n    :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')\nst.markdown("Here's a bouquet &mdash;\\\n            :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")\n\nmulti = '''If you end a line with two spaces,\na soft return is used for the next line.\n\nTwo (or more) newline characters in a row will result in a hard return.\n'''\nst.markdown(multi)\n
\n", "description": "

Display string formatted as Markdown.

\n", "args": [ @@ -196389,14 +207623,22 @@ "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the Markdown. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the Markdown element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/markdown.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L39" }, "streamlit.metric": { "name": "metric", - "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False)", + "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False, width=\"stretch\")", "examples": "

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ @@ -196445,7 +207687,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": false, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -196455,10 +207697,18 @@ "is_kwarg_only": false, "description": "

Whether to show a border around the metric container. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The width of the metric element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/metric.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/metric.py#L52" }, "streamlit.multiselect": { "name": "multiselect", @@ -196567,7 +207817,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -196587,12 +207837,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/multiselect.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/multiselect.py#L215" }, "streamlit.navigation": { "name": "navigation", "signature": "st.navigation(pages, *, position=\"sidebar\", expanded=False)", - "examples": "

The following examples show different possible entrypoint files, each named\nstreamlit_app.py. An entrypoint file is passed to streamlit run. It\nmanages your app's navigation and serves as a router between pages.

\n

Example 1: Use a callable or Python file as a page

\n

You can declare pages from callables or file paths. If you pass callables\nor paths to st.navigation as a page-like objects, they are internally\nconverted to StreamlitPage objects using st.Page. In this case, the\npage titles, icons, and paths are inferred from the file or callable names.

\n

page_1.py (in the same directory as your entrypoint file):

\n
\nimport streamlit as st\n\nst.title("Page 1")\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page_2():\n    st.title("Page 2")\n\npg = st.navigation(["page_1.py", page_2])\npg.run()\n
\n

Example 2: Group pages into sections and customize them with ``st.Page``

\n

You can use a dictionary to create sections within your navigation menu. In\nthe following example, each page is similar to Page 1 in Example 1, and all\npages are in the same directory. However, you can use Python files from\nanywhere in your repository. st.Page is used to give each page a custom\ntitle. For more information, see st.Page.

\n

Directory structure:

\n
\nyour_repository/\n\u251c\u2500\u2500 create_account.py\n\u251c\u2500\u2500 learn.py\n\u251c\u2500\u2500 manage_account.py\n\u251c\u2500\u2500 streamlit_app.py\n\u2514\u2500\u2500 trial.py\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Example 3: Stateful widgets across multiple pages

\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([page1, page2])\npg.run()\n
\n", + "examples": "

The following examples show different possible entrypoint files, each named\nstreamlit_app.py. An entrypoint file is passed to streamlit run. It\nmanages your app's navigation and serves as a router between pages.

\n

Example 1: Use a callable or Python file as a page

\n

You can declare pages from callables or file paths. If you pass callables\nor paths to st.navigation as a page-like objects, they are internally\nconverted to StreamlitPage objects using st.Page. In this case, the\npage titles, icons, and paths are inferred from the file or callable names.

\n

page_1.py (in the same directory as your entrypoint file):

\n
\nimport streamlit as st\n\nst.title("Page 1")\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page_2():\n    st.title("Page 2")\n\npg = st.navigation(["page_1.py", page_2])\npg.run()\n
\n

Example 2: Group pages into sections and customize them with ``st.Page``

\n

You can use a dictionary to create sections within your navigation menu. In\nthe following example, each page is similar to Page 1 in Example 1, and all\npages are in the same directory. However, you can use Python files from\nanywhere in your repository. st.Page is used to give each page a custom\ntitle. For more information, see st.Page.

\n

Directory structure:

\n
\nyour_repository/\n\u251c\u2500\u2500 create_account.py\n\u251c\u2500\u2500 learn.py\n\u251c\u2500\u2500 manage_account.py\n\u251c\u2500\u2500 streamlit_app.py\n\u2514\u2500\u2500 trial.py\n
\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages)\npg.run()\n
\n

Example 3: Use top navigation

\n

You can use the position parameter to place the navigation at the top\nof the app. This is useful for apps with a lot of pages because it allows\nyou to create collapsible sections for each group of pages. The following\nexample uses the same directory structure as Example 2 and shows how to\ncreate a top navigation menu.

\n

streamlit_app.py:

\n
\nimport streamlit as st\n\npages = {\n    "Your account": [\n        st.Page("create_account.py", title="Create your account"),\n        st.Page("manage_account.py", title="Manage your account"),\n    ],\n    "Resources": [\n        st.Page("learn.py", title="Learn about us"),\n        st.Page("trial.py", title="Try it out"),\n    ],\n}\n\npg = st.navigation(pages, position="top")\npg.run()\n
\n

Example 4: Stateful widgets across multiple pages

\n

Call widget functions in your entrypoint file when you want a widget to be\nstateful across pages. Assign keys to your common widgets and access their\nvalues through Session State within your pages.

\n

streamlit_app.py:

\n
\nimport streamlit as st\n\ndef page1():\n    st.write(st.session_state.foo)\n\ndef page2():\n    st.write(st.session_state.bar)\n\n# Widgets shared by all the pages\nst.sidebar.selectbox("Foo", ["A", "B", "C"], key="foo")\nst.sidebar.checkbox("Bar", key="bar")\n\npg = st.navigation([page1, page2])\npg.run()\n
\n", "description": "

Configure the available pages in a multipage app.

\n

Call st.navigation in your entrypoint file to define the available\npages for your app. st.navigation returns the current page, which can\nbe executed using .run() method.

\n

When using st.navigation, your entrypoint file (the file passed to\nstreamlit run) acts like a router or frame of common elements around\neach of your pages. Streamlit executes the entrypoint file with every app\nrerun. To execute the current page, you must call the .run() method on\nthe StreamlitPage object returned by st.navigation.

\n

The set of available pages can be updated with each rerun for dynamic\nnavigation. By default, st.navigation displays the available pages in\nthe sidebar if there is more than one page. This behavior can be changed\nusing the position keyword argument.

\n

As soon as any session of your app executes the st.navigation command,\nyour app will ignore the pages/ directory (across all sessions).

\n", "args": [ { @@ -196600,15 +207850,15 @@ "type_name": "Sequence[page-like], Mapping[str, Sequence[page-like]]", "is_optional": false, "is_kwarg_only": false, - "description": "

The available pages for the app.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of page-like objects. Page-like objects are\nanything that can be passed to st.Page or a StreamlitPage\nobject returned by st.Page.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of page-like objects for\nthat section.

\n

When you use a string or path as a page-like object, they are\ninternally passed to st.Page and converted to StreamlitPage\nobjects. In this case, the page will have the default title, icon, and\npath inferred from its path or filename. To customize these attributes\nfor your page, initialize your page with st.Page.

\n", + "description": "

The available pages for the app.

\n

To create a navigation menu with no sections or page groupings,\npages must be a list of page-like objects. Page-like objects are\nanything that can be passed to st.Page or a StreamlitPage\nobject returned by st.Page.

\n

To create labeled sections or page groupings within the navigation\nmenu, pages must be a dictionary. Each key is the label of a\nsection and each value is the list of page-like objects for\nthat section. If you use position="top", each grouping will be a\ncollapsible item in the navigation menu.

\n

When you use a string or path as a page-like object, they are\ninternally passed to st.Page and converted to StreamlitPage\nobjects. In this case, the page will have the default title, icon, and\npath inferred from its path or filename. To customize these attributes\nfor your page, initialize your page with st.Page.

\n", "default": "title" }, { "name": "position", - "type_name": "\"sidebar\" or \"hidden\"", + "type_name": "\"sidebar\", \"top\", or \"hidden\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The position of the navigation menu. If this is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nthis is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", + "description": "

The position of the navigation menu. If this is "sidebar"\n(default), the navigation widget appears at the top of the sidebar. If\nthis is "top", the navigation appears in the top header of the app.\nIf this is "hidden", the navigation widget is not displayed.

\n

If there is only one page in pages, the navigation will be hidden\nfor any value of position.

\n", "default": null }, { @@ -196616,7 +207866,7 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether the navigation menu should be expanded. If this is False\n(default), the navigation menu will be collapsed and will include a\nbutton to view more options when there are too many pages to display.\nIf this is True, the navigation menu will always be expanded; no\nbutton to collapse the menu will be displayed.

\n

If st.navigation changes from expanded=True to\nexpanded=False on a rerun, the menu will stay expanded and a\ncollapse button will be displayed.

\n", + "description": "

Whether the navigation menu should be expanded. If this is False\n(default), the navigation menu will be collapsed and will include a\nbutton to view more options when there are too many pages to display.\nIf this is True, the navigation menu will always be expanded; no\nbutton to collapse the menu will be displayed.

\n

If st.navigation changes from expanded=True to\nexpanded=False on a rerun, the menu will stay expanded and a\ncollapse button will be displayed.

\n

The parameter is only used when position="sidebar".

\n", "default": null } ], @@ -196628,13 +207878,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/navigation.py#L83" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/navigation.py#L82" }, "streamlit.number_input": { "name": "number_input", - "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None)", + "signature": "st.number_input(label, min_value=None, max_value=None, value=\"min\", step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nnumber = st.number_input("Insert a number")\nst.write("The current number is ", number)\n
\n

To initialize an empty number input, use None as the value:

\n
\nimport streamlit as st\n\nnumber = st.number_input(\n    "Insert a number", value=None, placeholder="Type a number..."\n)\nst.write("The current number is ", number)\n
\n", - "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", + "description": "

Display a numeric input widget.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization constraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { "name": "label", @@ -196745,7 +207995,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -196755,6 +208005,14 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display within the input field to the\nleft of the value. If icon is None (default), no icon is\ndisplayed. If icon is a string, the following options are\nvalid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the number input widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -196765,7 +208023,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/number_input.py#L171" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/number_input.py#L216" }, "streamlit.page_link": { "name": "page_link", @@ -196775,10 +208033,10 @@ "args": [ { "name": "page", - "type_name": "str, Path, or st.Page", + "type_name": "str, Path, or StreamlitPage", "is_optional": false, "is_kwarg_only": false, - "description": "

The file path (relative to the main script) or an st.Page indicating\nthe page to switch to. Alternatively, this can be the URL to an\nexternal page (must start with "http://" or "https://").

\n", + "description": "

The file path (relative to the main script) or a StreamlitPage\nindicating the page to switch to. Alternatively, this can be the\nURL to an external page (must start with "http://" or "https://").

\n", "default": null }, { @@ -196794,7 +208052,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional emoji or icon to display next to the button label. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", + "description": "

An optional emoji or icon to display next to the button label. If\nicon is None (default), the icon is inferred from the\nStreamlitPage object or no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null }, { @@ -196823,7 +208081,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button.py#L662" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L662" }, "streamlit.pills": { "name": "pills", @@ -196924,7 +208182,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -196936,7 +208194,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L454" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L448" }, "streamlit.plotly_chart": { "name": "plotly_chart", @@ -197009,13 +208267,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", "signature": "st.popover(label, *, help=None, icon=None, disabled=False, use_container_width=False)", "examples": "

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n", - "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Warning

\n

You may not put a popover inside another popover.

\n
\n", + "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Note

\n

To follow best design practices, don't nest popovers.

\n
\n", "args": [ { "name": "label", @@ -197059,11 +208317,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L676" }, "streamlit.progress": { "name": "progress", - "signature": "st.progress(value, text=None)", + "signature": "st.progress(value, text=None, width=\"stretch\")", "example": "

Here is an example of a progress bar increasing over time and disappearing when it reaches completion:

\n
\nimport streamlit as st\nimport time\n\nprogress_text = "Operation in progress. Please wait."\nmy_bar = st.progress(0, text=progress_text)\n\nfor percent_complete in range(100):\n    time.sleep(0.01)\n    my_bar.progress(percent_complete + 1, text=progress_text)\ntime.sleep(1)\nmy_bar.empty()\n\nst.button("Rerun")\n
\n", "description": "

Display a progress bar.

\n", "args": [ @@ -197082,16 +208340,24 @@ "is_kwarg_only": false, "description": "

A message to display above the progress bar. The text can optionally\ncontain GitHub-flavored Markdown of the following types: Bold, Italics,\nStrikethroughs, Inline Code, Links, and Images. Images display like\nicons, with a max height equal to the font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The width of the progress element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/progress.py#L95" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/progress.py#L94" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=True, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", - "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", - "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, Mapbox provides the map tiles to render map\ncontent. Note that Mapbox is a third-party product and Streamlit accepts\nno responsibility or liability of any kind for Mapbox or for any content\nor information made available by Mapbox.

\n

Mapbox requires users to register and provide a token before users can\nrequest map tiles. Currently, Streamlit provides this token for you, but\nthis could change at any time. We strongly recommend all users create and\nuse their own personal Mapbox token to avoid any disruptions to their\nexperience. You can do this with the mapbox.token config option. The\nuse of Mapbox is governed by Mapbox's Terms of Use.

\n

To get a token for yourself, create an account at https://mapbox.com.\nFor more info on how to set config options, see\nhttps://docs.streamlit.io/develop/api-reference/configuration/config.toml.

\n", + "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,  # Use Streamlit theme to pick map style\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", + "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n", "args": [ { "name": "pydeck_obj", @@ -197158,7 +208424,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L289" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", @@ -197200,11 +208466,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", - "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\")", + "signature": "st.radio(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, horizontal=False, captions=None, label_visibility=\"visible\", width=\"content\")", "example": "
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    captions=[\n        "Laugh out loud.",\n        "Get the popcorn.",\n        "Never stop learning.",\n    ],\n)\n\nif genre == ":rainbow[Comedy]":\n    st.write("You selected comedy.")\nelse:\n    st.write("You didn't select comedy.")\n
\n

To initialize an empty radio widget, use None as the index value:

\n
\nimport streamlit as st\n\ngenre = st.radio(\n    "What's your favorite movie genre",\n    [":rainbow[Comedy]", "***Drama***", "Documentary :movie_camera:"],\n    index=None,\n)\n\nst.write("You selected:", genre)\n
\n", "description": "

Display a radio button widget.

\n", "args": [ @@ -197309,8 +208575,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the radio button widget. This can be one of the\nfollowing:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -197321,7 +208595,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/radio.py#L124" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/radio.py#L149" }, "streamlit.rerun": { "name": "rerun", @@ -197338,7 +208612,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L104" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -197428,7 +208702,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1263" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1292" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -197529,7 +208803,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" } ], @@ -197541,11 +208815,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/button_group.py#L664" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L658" }, "streamlit.select_slider": { "name": "select_slider", - "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.select_slider(label, options=(), value=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "
\nimport streamlit as st\n\ncolor = st.select_slider(\n    "Select a color of the rainbow",\n    options=[\n        "red",\n        "orange",\n        "yellow",\n        "green",\n        "blue",\n        "indigo",\n        "violet",\n    ],\n)\nst.write("My favorite color is", color)\n
\n

And here's an example of a range select slider:

\n
\nimport streamlit as st\n\nstart_color, end_color = st.select_slider(\n    "Select a range of color wavelength",\n    options=[\n        "red",\n        "orange",\n        "yellow",\n        "green",\n        "blue",\n        "indigo",\n        "violet",\n    ],\n    value=("red", "blue"),\n)\nst.write("You selected wavelengths between", start_color, "and", end_color)\n
\n", "description": "

Display a slider widget to select items from a list.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.select_slider and st.slider is that\nselect_slider accepts any datatype and takes an iterable set of\noptions, while st.slider only accepts numerical or date/time data and\ntakes a range as input.

\n", "args": [ @@ -197634,8 +208908,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the slider widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -197646,11 +208928,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/select_slider.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/select_slider.py#L144" }, "streamlit.selectbox": { "name": "selectbox", - "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False)", + "signature": "st.selectbox(label, options, index=0, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False, width=\"stretch\")", "examples": "

Example 1: Use a basic selectbox widget

\n

If no index is provided, the first option is selected by default.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n)\n\nst.write("You selected:", option)\n
\n

Example 2: Use a selectbox widget with no initial selection

\n

To initialize an empty selectbox, use None as the index value.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "How would you like to be contacted?",\n    ("Email", "Home phone", "Mobile phone"),\n    index=None,\n    placeholder="Select contact method...",\n)\n\nst.write("You selected:", option)\n
\n

Example 3: Let users add a new option

\n

To allow users to add a new option that isn't included in the\noptions list, use the accept_new_options=True parameter. You\ncan also customize the placeholder text.

\n
\nimport streamlit as st\n\noption = st.selectbox(\n    "Default email",\n    ["foo@example.com", "bar@example.com", "baz@example.com"],\n    index=None,\n    placeholder="Select a saved email or enter a new one",\n    accept_new_options=True,\n)\n\nst.write("You selected:", option)\n
\n", "description": "

Display a select widget.

\n", "args": [ @@ -197747,7 +209029,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -197757,6 +209039,14 @@ "is_kwarg_only": true, "description": "

Whether the user can add a selection that isn't included in options.\nIf this is False (default), the user can only select from the\nitems in options. If this is True, the user can enter a new\nitem that doesn't exist in options.

\n

When a user enters a new item, it is returned by the widget as a\nstring. The new item is not added to the widget's drop-down menu.\nStreamlit will use a case-insensitive match from options before\nadding a new item.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the selectbox widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -197767,7 +209057,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/selectbox.py#L232" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/selectbox.py#L260" }, "streamlit.set_option": { "name": "set_option", @@ -197793,63 +209083,63 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/config.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/config.py#L128" }, "streamlit.set_page_config": { "name": "set_page_config", - "signature": "st.set_page_config(page_title=None, page_icon=None, layout=\"centered\", initial_sidebar_state=\"auto\", menu_items=None)", + "signature": "st.set_page_config(page_title=None, page_icon=None, layout=None, initial_sidebar_state=None, menu_items=None)", "example": "
\nimport streamlit as st\n\nst.set_page_config(\n    page_title="Ex-stream-ly Cool App",\n    page_icon="\ud83e\uddca",\n    layout="wide",\n    initial_sidebar_state="expanded",\n    menu_items={\n        'Get Help': 'https://www.extremelycoolapp.com/help',\n        'Report a bug': "https://www.extremelycoolapp.com/bug",\n        'About': "# This is a header. This is an *extremely* cool app!"\n    }\n)\n
\n", - "description": "

Configures the default settings of the page.

\n
\n

Note

\n

This must be the first Streamlit command used on an app page, and must only\nbe set once per page.

\n
\n", + "description": "

Configure the default settings of the page.

\n

This command can be called multiple times in a script run to dynamically\nchange the page configuration. The calls are additive, with each successive\ncall overriding only the parameters that are specified.

\n", "args": [ { "name": "page_title", "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page title, shown in the browser tab. If None, defaults to the\nfilename of the script ("app.py" would show "app \u2022 Streamlit").

\n", - "default": "the" + "description": "

The page title, shown in the browser tab. If this is None\n(default), the page title is inherited from the previous call of\nst.set_page_config. If this is None and no previous call\nexists, the page title is inferred from the page source.

\n

If a page source is a Python file, its inferred title is derived from\nthe filename. If a page source is a callable object, its inferred title\nis derived from the callable's name.

\n", + "default": null }, { "name": "page_icon", "type_name": "Anything supported by st.image (except list), str, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The page favicon. If page_icon is None (default), the favicon\nwill be a monochrome Streamlit logo.

\n

In addition to the types supported by st.image (except list), the\nfollowing strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, page_icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", + "description": "

The page favicon. If page_icon is None (default), the page icon\nis inherited from the previous call of st.set_page_config. If this\nis None and no previous call exists, the favicon is a monochrome\nStreamlit logo.

\n

In addition to the types supported by st.image (except list), the\nfollowing strings are valid:

\n
    \n
  • A single-character emoji. For example, you can set page_icon="\ud83e\udd88".

    \n
  • \n
  • An emoji short code. For example, you can set page_icon=":shark:".\nFor a list of all supported codes, see\nhttps://share.streamlit.io/streamlit/emoji-shortcodes.

    \n
  • \n
  • The string literal, "random". You can set page_icon="random"\nto set a random emoji from the supported list above.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, page_icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n
\n

Note

\n

Colors are not supported for Material icons. When you use a\nMaterial icon for favicon, it will be black, regardless of browser\ntheme.

\n
\n", "default": null }, { "name": "layout", - "type_name": "\"centered\" or \"wide\"", + "type_name": "\"centered\", \"wide\", or None", "is_optional": false, "is_kwarg_only": false, - "description": "

How the page content should be laid out. Defaults to "centered",\nwhich constrains the elements into a centered column of fixed width;\n"wide" uses the entire screen.

\n", - "default": "s" + "description": "

How the page content should be laid out. If this is None (default),\nthe page layout is inherited from the previous call of\nst.set_page_config. If this is None and no previous call\nexists, the page layout is "centered".

\n

"centered" constrains the elements into a centered column of fixed\nwidth. "wide" uses the entire screen.

\n", + "default": null }, { "name": "initial_sidebar_state", - "type_name": "\"auto\", \"expanded\", or \"collapsed\"", + "type_name": "\"auto\", \"expanded\", \"collapsed\", or None", "is_optional": false, "is_kwarg_only": false, - "description": "

How the sidebar should start out. Defaults to "auto",\nwhich hides the sidebar on small devices and shows it otherwise.\n"expanded" shows the sidebar initially; "collapsed" hides it.\nIn most cases, you should just use "auto", otherwise the app will\nlook bad when embedded and viewed on mobile.

\n", - "default": "s" + "description": "

How the sidebar should start out. If this is None (default), the\nsidebar state is inherited from the previous call of\nst.set_page_config. If no previous call exists, the sidebar state\nis "auto".

\n

The following states are supported:

\n
    \n
  • "auto": The sidebar is hidden on small devices and shown otherwise.
  • \n
  • "expanded": The sidebar is shown initially.
  • \n
  • "collapsed": The sidebar is hidden initially.
  • \n
\n

In most cases, "auto" provides the best user experience across\ndevices of different sizes.

\n", + "default": null }, { "name": "menu_items", "type_name": "dict", "is_optional": false, "is_kwarg_only": false, - "description": "

Configure the menu that appears on the top-right side of this app.\nThe keys in this dict denote the menu item you'd like to configure:

\n
    \n
  • \n
    "Get help": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "Report a Bug": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "About": str or None
    \n
    A markdown string to show in the About dialog.\nIf None, only shows Streamlit's default About text.
    \n
    \n
  • \n
\n

The URL may also refer to an email address e.g. mailto:john@example.com.

\n", + "description": "

Configure the menu that appears on the top-right side of this app.\nThe keys in this dict denote the menu item you'd like to configure:

\n
    \n
  • \n
    "Get help": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "Report a Bug": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "About": str or None
    \n
    A markdown string to show in the About dialog.\nIf None, only shows Streamlit's default About text.
    \n
    \n
  • \n
\n

The URL may also refer to an email address e.g. mailto:john@example.com.\nTo remove an item that was specified in a previous call to\nst.set_page_config, set its value to None in the dictionary.

\n", "default": "About" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/page_config.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/page_config.py#L109" }, "streamlit.slider": { "name": "slider", - "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.slider(label, min_value=None, max_value=None, value=None, step=None, format=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nage = st.slider("How old are you?", 0, 130, 25)\nst.write("I'm ", age, "years old")\n
\n

And here's an example of a range slider:

\n
\nimport streamlit as st\n\nvalues = st.slider("Select a range of values", 0.0, 100.0, (25.0, 75.0))\nst.write("Values:", values)\n
\n

This is a range time slider:

\n
\nimport streamlit as st\nfrom datetime import time\n\nappointment = st.slider(\n    "Schedule your appointment:", value=(time(11, 30), time(12, 45))\n)\nst.write("You're scheduled for:", appointment)\n
\n

Finally, a datetime slider:

\n
\nimport streamlit as st\nfrom datetime import datetime\n\nstart_time = st.slider(\n    "When do you start?",\n    value=datetime(2020, 1, 1, 9, 30),\n    format="MM/DD/YY - hh:mm",\n)\nst.write("Start time:", start_time)\n
\n", - "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization contstraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", + "description": "

Display a slider widget.

\n

This supports int, float, date, time, and datetime types.

\n

This also allows you to render a range slider by passing a two-element\ntuple or list as the value.

\n

The difference between st.slider and st.select_slider is that\nslider only accepts numerical or date/time data and takes a range as\ninput, while select_slider accepts any datatype and takes an iterable\nset of options.

\n
\n

Note

\n

Integer values exceeding +/- (1<<53) - 1 cannot be accurately\nstored or returned by the widget due to serialization constraints\nbetween the Python server and JavaScript client. You must handle\nsuch numbers as floats, leading to a loss in precision.

\n
\n", "args": [ { "name": "label", @@ -197952,8 +209242,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the slider widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -197964,7 +209262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/slider.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/slider.py#L430" }, "streamlit.snow": { "name": "snow", @@ -197973,11 +209271,11 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", - "signature": "st.spinner(text=\"In progress...\", *, show_time=False)", + "signature": "st.spinner(text=\"In progress...\", *, show_time=False, width=\"content\")", "example": "
\nimport streamlit as st\nimport time\n\nwith st.spinner("Wait for it...", show_time=True):\n    time.sleep(5)\nst.success("Done!")\nst.button("Rerun")\n
\n", "description": "

Display a loading spinner while executing a block of code.

\n", "args": [ @@ -197996,16 +209294,24 @@ "is_kwarg_only": true, "description": "

Whether to show the elapsed time next to the spinner text. If this is\nFalse (default), no time is displayed. If this is True,\nelapsed time is displayed with a precision of 0.1 seconds. The time\nformat is not configurable.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the spinner element. This can be one of the following:

\n
    \n
  • "content" (default): The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the element matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/spinner.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/spinner.py#L37" }, "streamlit.status": { "name": "status", - "signature": "st.status(label, *, expanded=False, state=\"running\")", + "signature": "st.status(label, *, expanded=False, state=\"running\", width=\"stretch\")", "examples": "

You can use the with notation to insert any element into an status container:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data..."):\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n\nst.button("Rerun")\n
\n

You can also use .update() on the container to change the label, state,\nor expanded state:

\n
\nimport time\nimport streamlit as st\n\nwith st.status("Downloading data...", expanded=True) as status:\n    st.write("Searching for data...")\n    time.sleep(2)\n    st.write("Found URL.")\n    time.sleep(1)\n    st.write("Downloading data...")\n    time.sleep(1)\n    status.update(\n        label="Download complete!", state="complete", expanded=False\n    )\n\nst.button("Rerun")\n
\n", - "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n", + "description": "

Insert a status container to display output from long-running tasks.

\n

Inserts a container into your app that is typically used to show the status and\ndetails of a process or task. The container can hold multiple elements and can\nbe expanded or collapsed by the user similar to st.expander.\nWhen collapsed, all that is visible is the status icon and label.

\n

The label, state, and expanded state can all be updated by calling .update()\non the returned object. To add elements to the returned container, you can\nuse with notation (preferred) or just call methods directly on the returned\nobject.

\n

By default, st.status() initializes in the "running" state. When called using\nwith notation, it automatically updates to the "complete" state at the end\nof the "with" block. See examples below for more details.

\n
\n

Note

\n

All content within the status container is computed and sent to the\nfrontend, even if the status container is closed.

\n

To follow best design practices and maintain a good appearance on\nall screen sizes, don't nest status containers.

\n
\n", "args": [ { "name": "label", @@ -198030,6 +209336,14 @@ "is_kwarg_only": true, "description": "

The initial state of the status container which determines which icon is\nshown:

\n
    \n
  • running (default): A spinner icon is shown.
  • \n
  • complete: A checkmark icon is shown.
  • \n
  • error: An error icon is shown.
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the status container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198040,7 +209354,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L816" }, "streamlit.stop": { "name": "stop", @@ -198049,11 +209363,11 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", - "signature": "st.subheader(body, anchor=None, *, help=None, divider=False)", + "signature": "st.subheader(body, anchor=None, *, help=None, divider=False, width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nst.subheader("_Streamlit_ is :blue[cool] :sunglasses:")\nst.subheader("This is a subheader with a divider", divider="gray")\nst.subheader("These subheaders have rotating dividers", divider=True)\nst.subheader("One", divider=True)\nst.subheader("Two", divider=True)\nst.subheader("Three", divider=True)\nst.subheader("Four", divider=True)\n
\n", "description": "

Display text in subheader formatting.

\n", "args": [ @@ -198088,10 +209402,18 @@ "is_kwarg_only": true, "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the subheader element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L115" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L134" }, "streamlit.success": { "name": "success", @@ -198117,15 +209439,15 @@ }, { "name": "width", - "type_name": "int or \"stretch\"", + "type_name": "\"stretch\" or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "description": "

The width of the success element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L250" }, "streamlit.switch_page": { "name": "switch_page", @@ -198143,7 +209465,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/commands/execution_control.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L157" }, "streamlit.table": { "name": "table", @@ -198161,13 +209483,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L651" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L651" }, "streamlit.tabs": { "name": "tabs", - "signature": "st.tabs(tabs)", + "signature": "st.tabs(tabs, *, width=\"stretch\")", "examples": "

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n", - "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Warning

\n

All the content of every tab is always sent to and rendered on the frontend.\nConditional rendering is currently not supported.

\n
\n", + "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Note

\n

All content within every tab is computed and sent to the frontend,\nregardless of which tab is selected. Tabs do not currently support\nconditional rendering. If you have a slow-loading tab, consider\nusing a widget like st.segmented_control to conditionally\nrender content instead.

\n
\n", "args": [ { "name": "tabs", @@ -198176,6 +209498,14 @@ "is_kwarg_only": false, "description": "

Creates a tab for each string in the list. The first tab is selected\nby default. The string is used as the name of the tab and can\noptionally contain GitHub-flavored Markdown of the following types:\nBold, Italics, Strikethroughs, Inline Code, Links, and Images.\nImages display like icons, with a max height equal to the font\nheight.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the tab container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198186,11 +209516,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/layouts.py#L383" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L419" }, "streamlit.text": { "name": "text", - "signature": "st.text(body, *, help=None)", + "signature": "st.text(body, *, help=None, width=\"content\")", "example": "
\nimport streamlit as st\n\nst.text("This is text\\n[and more text](that's not a Markdown link).")\n
\n", "description": "

Write text without Markdown or HTML parsing.

\n

For monospace text, use st.code.

\n", "args": [ @@ -198209,14 +209539,22 @@ "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the text. If this is None\n(default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the text element. This can be one of the following:

\n
    \n
  • "content" (default): The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the element matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/text.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/text.py#L31" }, "streamlit.text_area": { "name": "text_area", - "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.text_area(label, value=\"\", height=None, max_chars=None, key=None, help=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", width=\"stretch\")", "example": "
\nimport streamlit as st\n\ntxt = st.text_area(\n    "Text to analyze",\n    "It was the best of times, it was the worst of times, it was the age of "\n    "wisdom, it was the age of foolishness, it was the epoch of belief, it "\n    "was the epoch of incredulity, it was the season of Light, it was the "\n    "season of Darkness, it was the spring of hope, it was the winter of "\n    "despair, (...)",\n)\n\nst.write(f"You wrote {len(txt)} characters.")\n
\n", "description": "

Display a multi-line text input widget.

\n", "args": [ @@ -198313,8 +209651,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the text area widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198325,11 +209671,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/text_widgets.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/text_widgets.py#L448" }, "streamlit.text_input": { "name": "text_input", - "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None)", + "signature": "st.text_input(label, value=\"\", max_chars=None, key=None, type=\"default\", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility=\"visible\", icon=None, width=\"stretch\")", "example": "
\nimport streamlit as st\n\ntitle = st.text_input("Movie title", "Life of Brian")\nst.write("The current movie title is", title)\n
\n", "description": "

Display a single-line text input widget.

\n", "args": [ @@ -198434,7 +209780,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.

\n", "default": "is" }, { @@ -198444,6 +209790,14 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display within the input field to the\nleft of the value. If icon is None (default), no icon is\ndisplayed. If icon is a string, the following options are\nvalid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols \nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the text input widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198454,11 +209808,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/text_widgets.py#L118" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/text_widgets.py#L125" }, "streamlit.time_input": { "name": "time_input", - "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00)", + "signature": "st.time_input(label, value=\"now\", key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", step=0:15:00, width=\"stretch\")", "example": "
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", datetime.time(8, 45))\nst.write("Alarm is set for", t)\n
\n

To initialize an empty time input, use None as the value:

\n
\nimport datetime\nimport streamlit as st\n\nt = st.time_input("Set an alarm for", value=None)\nst.write("Alarm is set for", t)\n
\n", "description": "

Display a time input widget.

\n", "args": [ @@ -198531,7 +209885,7 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, { @@ -198541,6 +209895,14 @@ "is_kwarg_only": true, "description": "

The stepping interval in seconds. Defaults to 900, i.e. 15 minutes.\nYou can also pass a datetime.timedelta object.

\n", "default": "900" + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the time input widget. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198551,11 +209913,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/time_widgets.py#L348" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/time_widgets.py#L351" }, "streamlit.title": { "name": "title", - "signature": "st.title(body, anchor=None, *, help=None)", + "signature": "st.title(body, anchor=None, *, help=None, width=\"stretch\")", "examples": "
\nimport streamlit as st\n\nst.title("This is a title")\nst.title("_Streamlit_ is :blue[cool] :sunglasses:")\n
\n", "description": "

Display text in title formatting.

\n

Each document should have a single st.title(), although this is not\nenforced.

\n", "args": [ @@ -198582,15 +209944,23 @@ "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the title. If this is\nNone (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the title element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/heading.py#L187" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L223" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's top-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -198611,11 +209981,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/toast.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/toast.py#L38" }, "streamlit.toggle": { "name": "toggle", - "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\")", + "signature": "st.toggle(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"content\")", "example": "
\nimport streamlit as st\n\non = st.toggle("Activate feature")\n\nif on:\n    st.write("Feature activated!")\n
\n", "description": "

Display a toggle widget.

\n", "args": [ @@ -198688,8 +210058,16 @@ "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget alligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", + "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the toggle widget. This can be one of the following:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -198700,7 +210078,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/widgets/checkbox.py#L170" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/checkbox.py#L190" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -198781,12 +210159,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L1661" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1691" }, "streamlit.video": { "name": "video", - "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False)", - "example": "
\nimport streamlit as st\n\nvideo_file = open("myvideo.mp4", "rb")\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is\nnot widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n", + "signature": "st.video(data, format=\"video/mp4\", start_time=0, *, subtitles=None, end_time=None, loop=False, autoplay=False, muted=False, width=\"stretch\")", + "example": "
\nimport streamlit as st\n\nvideo_file = open("myvideo.mp4", "rb")\nvideo_bytes = video_file.read()\n\nst.video(video_bytes)\n
\n

When you include subtitles, they will be turned on by default. A viewer\ncan turn off the subtitles (or captions) from the browser's default video\ncontrol menu, usually located in the lower-right corner of the video.

\n

Here is a simple VTT file (subtitles.vtt):

\n
\nWEBVTT\n\n0:00:01.000 --> 0:00:02.000\nLook!\n\n0:00:03.000 --> 0:00:05.000\nLook at the pretty stars!\n
\n

If the above VTT file lives in the same directory as your app, you can\nadd subtitles like so:

\n
\nimport streamlit as st\n\nVIDEO_URL = "https://example.com/not-youtube.mp4"\nst.video(VIDEO_URL, subtitles="subtitles.vtt")\n
\n

See additional examples of supported subtitle input types in our\nvideo subtitles feature demo.

\n
\n

Note

\n

Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV),\nas this codec is not widely supported by browsers. Converting your video to H.264 will allow\nthe video to be displayed in Streamlit.\nSee this StackOverflow post or this\nStreamlit forum post\nfor more information.

\n
\n", "description": "

Display a video player.

\n", "args": [ { @@ -198852,10 +210230,18 @@ "is_kwarg_only": true, "description": "

Whether the video should play with the audio silenced. This is\nFalse by default. Use this in conjunction with autoplay=True\nto enable autoplay without user interaction.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the video player element. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/media.py#L213" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/media.py#L228" }, "streamlit.warning": { "name": "warning", @@ -198881,15 +210267,15 @@ }, { "name": "width", - "type_name": "int or \"stretch\"", + "type_name": "\"stretch\" or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The desired width of the alert expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the alert to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the alert to match\nthe width of the parent container.

\n", + "description": "

The width of the warning element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/alert.py#L103" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L105" }, "streamlit.write": { "name": "write", @@ -198934,7 +210320,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/write.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/write.py#L255" }, "streamlit.write_stream": { "name": "write_stream", @@ -198959,7 +210345,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -198967,7 +210353,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_data_api.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_data_api.py#L599" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -198975,7 +210361,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" }, "streamlit.query_params.clear": { "name": "clear", @@ -198990,7 +210376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -199008,7 +210394,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -199032,7 +210418,23 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + }, + "streamlit.query_params.missing_attr_error_message": { + "name": "missing_attr_error_message", + "signature": "st.query_params.missing_attr_error_message(key)", + "description": "

Returns a formatted error message for missing attributes.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" + }, + "streamlit.query_params.missing_key_error_message": { + "name": "missing_key_error_message", + "signature": "st.query_params.missing_key_error_message(key)", + "description": "

Returns a formatted error message for missing keys.

\n", + "args": [], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -199043,22 +210445,21 @@ { "type_name": "Dict[str,str]", "is_generator": false, - "description": "

A dictionary of the current query paramters in the app's URL.

\n", + "description": "

A dictionary of the current query parameters in the app's URL.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", - "signature": "st.query_params.update(other=(), /, **kwds)", + "signature": "st.query_params.update(params=(), /, **kwds)", "description": "

Update one or more values in query_params at once from a dictionary or

\n

dictionary-like object.

\n

See Mapping.update() from Python's collections library.

\n", "args": [ { "name": "other", "type_name": "SupportsKeysAndGetItem[str, str] | Iterable[tuple[str, str]]", "is_optional": false, - "is_kwarg_only": false, "description": "

A dictionary or mapping of strings to strings.

\n", "default": null }, @@ -199072,7 +210473,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -199093,11 +210494,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -199121,11 +210522,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -199148,7 +210549,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L353" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L355" }, { "name": "query", @@ -199221,7 +210622,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L222" }, { "name": "reset", @@ -199237,7 +210638,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -199254,7 +210655,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L384" }, { "name": "engine", @@ -199269,7 +210670,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L371" }, { "name": "session", @@ -199285,10 +210686,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L397" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -199313,7 +210714,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L457" }, { "name": "query", @@ -199362,7 +210763,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L282" }, { "name": "reset", @@ -199378,7 +210779,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -199394,7 +210795,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L529" }, { "name": "write_pandas", @@ -199459,7 +210860,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L375" } ], "properties": [ @@ -199477,10 +210878,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L490" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L45", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L49", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -199522,7 +210923,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -199538,7 +210939,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -199547,7 +210948,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -199558,10 +210959,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -199579,7 +210980,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L353" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L355" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -199594,7 +210995,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L384" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -199609,7 +211010,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L371" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -199682,7 +211083,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L222" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -199698,7 +211099,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -199714,7 +211115,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/sql_connection.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L397" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -199747,7 +211148,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -199763,7 +211164,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -199772,7 +211173,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -199781,7 +211182,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -199797,7 +211198,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L455" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L457" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -199846,7 +211247,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L277" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L282" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -199862,7 +211263,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L490" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -199878,7 +211279,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -199894,7 +211295,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L527" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L529" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -199959,7 +211360,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/snowflake_connection.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L375" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -199975,7 +211376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -200033,7 +211434,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1209" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1214" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -200091,7 +211492,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1016" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1021" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -200157,7 +211558,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L784" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L789" }, "streamlit.column_config.Column": { "name": "Column", @@ -200215,7 +211616,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L244" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L248" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -200313,7 +211714,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1797" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1802" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -200419,7 +211820,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1480" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1485" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -200461,7 +211862,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1306" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1311" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -200503,7 +211904,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L2074" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L2080" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -200561,7 +211962,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1112" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1117" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -200651,7 +212052,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L630" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -200693,7 +212094,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1396" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1401" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -200759,10 +212160,10 @@ }, { "name": "format", - "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", + "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"yen\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A format string controlling how numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexidecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "description": "

A format string controlling how numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", "default": "locale" }, { @@ -200791,7 +212192,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L347" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L351" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -200825,10 +212226,10 @@ }, { "name": "format", - "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", + "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"yen\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A format string controlling how the numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexidecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler. The number formatting does\nnot impact the return value when used in st.data_editor.

\n", + "description": "

A format string controlling how the numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler. The number formatting does\nnot impact the return value when used in st.data_editor.

\n", "default": "locale" }, { @@ -200857,7 +212258,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1951" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1956" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -200931,7 +212332,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L891" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L896" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -201013,7 +212414,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L505" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L510" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -201111,7 +212512,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/column_types.py#L1644" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1649" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -201151,7 +212552,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/components/v1/component_registry.py#L51" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/components/v1/component_registry.py#L52" }, "streamlit.components.v1.html": { "name": "html", @@ -201201,7 +212602,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/iframe.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/iframe.py#L105" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -201251,7 +212652,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/iframe.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/iframe.py#L28" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -201277,7 +212678,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L735" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L735" }, "StatusContainer.update": { "name": "update", @@ -201310,7 +212711,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/lib/mutable_status_container.py#L99" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -201339,7 +212740,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1029" }, { "name": "run", @@ -201363,7 +212764,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L372" }, { "name": "switch_page", @@ -201387,7 +212788,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L395" } ], "properties": [ @@ -201404,7 +212805,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L450" }, { "name": "button_group", @@ -201419,7 +212820,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L465" }, { "name": "caption", @@ -201434,7 +212835,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L479" }, { "name": "chat_input", @@ -201449,7 +212850,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L493" }, { "name": "chat_message", @@ -201464,7 +212865,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L507" }, { "name": "checkbox", @@ -201479,7 +212880,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L521" }, { "name": "code", @@ -201494,7 +212895,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L535" }, { "name": "color_picker", @@ -201509,7 +212910,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L549" }, { "name": "columns", @@ -201524,7 +212925,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L563" }, { "name": "dataframe", @@ -201539,7 +212940,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L580" }, { "name": "date_input", @@ -201554,7 +212955,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L594" }, { "name": "divider", @@ -201569,7 +212970,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L608" }, { "name": "error", @@ -201584,7 +212985,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L622" }, { "name": "exception", @@ -201599,7 +213000,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L636" }, { "name": "expander", @@ -201614,7 +213015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L650" }, { "name": "header", @@ -201629,7 +213030,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L664" }, { "name": "info", @@ -201644,7 +213045,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L678" }, { "name": "json", @@ -201659,7 +213060,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L692" }, { "name": "latex", @@ -201674,7 +213075,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L706" }, { "name": "main", @@ -201689,7 +213090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L424" }, { "name": "markdown", @@ -201704,7 +213105,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L720" }, { "name": "metric", @@ -201719,7 +213120,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L734" }, { "name": "multiselect", @@ -201734,7 +213135,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L748" }, { "name": "number_input", @@ -201749,7 +213150,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L762" }, { "name": "radio", @@ -201764,7 +213165,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L776" }, { "name": "select_slider", @@ -201779,7 +213180,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L790" }, { "name": "selectbox", @@ -201794,7 +213195,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L804" }, { "name": "sidebar", @@ -201809,7 +213210,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L437" }, { "name": "slider", @@ -201824,7 +213225,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L818" }, { "name": "status", @@ -201839,7 +213240,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L860" }, { "name": "subheader", @@ -201854,7 +213255,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L832" }, { "name": "success", @@ -201869,7 +213270,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L846" }, { "name": "table", @@ -201884,7 +213285,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L874" }, { "name": "tabs", @@ -201899,7 +213300,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L888" }, { "name": "text", @@ -201914,7 +213315,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L908" }, { "name": "text_area", @@ -201929,7 +213330,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L922" }, { "name": "text_input", @@ -201944,7 +213345,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L936" }, { "name": "time_input", @@ -201959,7 +213360,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L950" }, { "name": "title", @@ -201974,7 +213375,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L964" }, { "name": "toast", @@ -201989,7 +213390,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L978" }, { "name": "toggle", @@ -202004,7 +213405,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L992" }, { "name": "warning", @@ -202019,10 +213420,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1006" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -202062,7 +213463,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L445" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L450" }, "AppTest.button_group": { "name": "button_group", @@ -202077,7 +213478,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L460" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L465" }, "AppTest.caption": { "name": "caption", @@ -202092,7 +213493,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L474" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L479" }, "AppTest.chat_input": { "name": "chat_input", @@ -202107,7 +213508,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L488" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L493" }, "AppTest.chat_message": { "name": "chat_message", @@ -202122,7 +213523,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L502" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L507" }, "AppTest.checkbox": { "name": "checkbox", @@ -202137,7 +213538,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L516" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L521" }, "AppTest.code": { "name": "code", @@ -202152,7 +213553,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L530" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L535" }, "AppTest.color_picker": { "name": "color_picker", @@ -202167,7 +213568,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L549" }, "AppTest.columns": { "name": "columns", @@ -202182,7 +213583,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L558" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L563" }, "AppTest.dataframe": { "name": "dataframe", @@ -202197,7 +213598,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L575" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L580" }, "AppTest.date_input": { "name": "date_input", @@ -202212,7 +213613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L589" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L594" }, "AppTest.divider": { "name": "divider", @@ -202227,7 +213628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L603" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L608" }, "AppTest.error": { "name": "error", @@ -202242,7 +213643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L617" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L622" }, "AppTest.exception": { "name": "exception", @@ -202257,7 +213658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L631" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L636" }, "AppTest.expander": { "name": "expander", @@ -202272,7 +213673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L645" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L650" }, "AppTest.from_file": { "name": "from_file", @@ -202304,7 +213705,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L267" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L272" }, "AppTest.from_function": { "name": "from_function", @@ -202352,7 +213753,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L220" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L225" }, "AppTest.from_string": { "name": "from_string", @@ -202384,7 +213785,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -202408,7 +213809,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1029" }, "AppTest.header": { "name": "header", @@ -202423,7 +213824,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L659" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L664" }, "AppTest.info": { "name": "info", @@ -202438,7 +213839,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L673" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L678" }, "AppTest.json": { "name": "json", @@ -202453,7 +213854,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L687" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L692" }, "AppTest.latex": { "name": "latex", @@ -202468,7 +213869,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L701" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L706" }, "AppTest.main": { "name": "main", @@ -202483,7 +213884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L424" }, "AppTest.markdown": { "name": "markdown", @@ -202498,7 +213899,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L715" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L720" }, "AppTest.metric": { "name": "metric", @@ -202513,7 +213914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L729" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L734" }, "AppTest.multiselect": { "name": "multiselect", @@ -202528,7 +213929,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L748" }, "AppTest.number_input": { "name": "number_input", @@ -202543,7 +213944,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L757" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L762" }, "AppTest.radio": { "name": "radio", @@ -202558,7 +213959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L771" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L776" }, "AppTest.run": { "name": "run", @@ -202582,7 +213983,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L367" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L372" }, "AppTest.select_slider": { "name": "select_slider", @@ -202597,7 +213998,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L785" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L790" }, "AppTest.selectbox": { "name": "selectbox", @@ -202612,7 +214013,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L799" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L804" }, "AppTest.sidebar": { "name": "sidebar", @@ -202627,7 +214028,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L437" }, "AppTest.slider": { "name": "slider", @@ -202642,7 +214043,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L818" }, "AppTest.status": { "name": "status", @@ -202657,7 +214058,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L855" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L860" }, "AppTest.subheader": { "name": "subheader", @@ -202672,7 +214073,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L827" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L832" }, "AppTest.success": { "name": "success", @@ -202687,7 +214088,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L841" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L846" }, "AppTest.switch_page": { "name": "switch_page", @@ -202711,7 +214112,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L390" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L395" }, "AppTest.table": { "name": "table", @@ -202726,7 +214127,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L869" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L874" }, "AppTest.tabs": { "name": "tabs", @@ -202741,7 +214142,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L883" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L888" }, "AppTest.text": { "name": "text", @@ -202756,7 +214157,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L903" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L908" }, "AppTest.text_area": { "name": "text_area", @@ -202771,7 +214172,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L917" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L922" }, "AppTest.text_input": { "name": "text_input", @@ -202786,7 +214187,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L931" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L936" }, "AppTest.time_input": { "name": "time_input", @@ -202801,7 +214202,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L945" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L950" }, "AppTest.title": { "name": "title", @@ -202816,7 +214217,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L959" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L964" }, "AppTest.toast": { "name": "toast", @@ -202831,7 +214232,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L978" }, "AppTest.toggle": { "name": "toggle", @@ -202846,7 +214247,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L987" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L992" }, "AppTest.warning": { "name": "warning", @@ -202861,7 +214262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/app_test.py#L1001" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1006" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -202874,7 +214275,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L340" }, { "name": "run", @@ -202891,7 +214292,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -202899,7 +214300,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L335" } ], "properties": [ @@ -202909,10 +214310,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L324" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L326" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L301", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L303", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -202937,7 +214338,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -202945,7 +214346,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L749" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L745" }, { "name": "set_value", @@ -202953,7 +214354,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L743" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L739" }, { "name": "unselect", @@ -202961,7 +214362,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L764" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L759" } ], "properties": [ @@ -202971,7 +214372,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L733" }, { "name": "indices", @@ -202979,7 +214380,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L732" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L728" }, { "name": "value", @@ -202987,10 +214388,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L722" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L719" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L696", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L693", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -203015,7 +214416,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203023,7 +214424,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L357" } ], "properties": [ @@ -203033,10 +214434,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L370" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L344", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L345", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -203052,7 +214453,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L417" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L416" }, { "name": "run", @@ -203069,7 +214470,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203077,7 +214478,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L412" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L411" }, { "name": "uncheck", @@ -203085,7 +214486,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L421" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L420" } ], "properties": [ @@ -203095,10 +214496,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L402" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L402" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L380", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L380", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -203114,7 +214515,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L489" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L487" }, { "name": "run", @@ -203131,7 +214532,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203139,7 +214540,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L484" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L482" } ], "properties": [ @@ -203149,10 +214550,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L463" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L462" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L448", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L447", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -203177,7 +214578,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203185,7 +214586,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L533" } ], "properties": [ @@ -203195,10 +214596,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L547" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L515", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L513", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -203223,7 +214624,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" } ], "properties": [ @@ -203233,10 +214634,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L107", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -203261,7 +214662,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -203269,7 +214670,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L842" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L835" }, { "name": "set_value", @@ -203277,7 +214678,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L836" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L829" }, { "name": "unselect", @@ -203285,7 +214686,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L857" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L849" } ], "properties": [ @@ -203295,7 +214696,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L830" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L823" }, { "name": "indices", @@ -203303,7 +214704,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L820" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L813" }, { "name": "value", @@ -203311,7 +214712,7 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L810" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L804" }, { "name": "values", @@ -203319,10 +214720,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L825" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L818" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L781", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L775", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -203338,7 +214739,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L930" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L920" }, { "name": "increment", @@ -203346,7 +214747,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L922" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L912" }, { "name": "run", @@ -203363,7 +214764,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203371,7 +214772,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L897" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L888" } ], "properties": [ @@ -203381,10 +214782,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L910" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L901" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L877", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L868", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -203409,7 +214810,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203417,7 +214818,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L981" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L970" } ], "properties": [ @@ -203427,7 +214828,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L975" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L964" }, { "name": "index", @@ -203435,7 +214836,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L948" }, { "name": "value", @@ -203443,10 +214844,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L965" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L955" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L939", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L929", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -203471,7 +214872,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_range", @@ -203479,7 +214880,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1127" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1114" }, { "name": "set_value", @@ -203487,7 +214888,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1089" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1077" } ], "properties": [ @@ -203497,7 +214898,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1121" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1108" }, { "name": "value", @@ -203505,10 +214906,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1110" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1098" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1071", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1059", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -203533,7 +214934,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -203541,7 +214942,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1048" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1036" }, { "name": "select_index", @@ -203549,7 +214950,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1052" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1040" }, { "name": "set_value", @@ -203557,7 +214958,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1043" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1031" } ], "properties": [ @@ -203567,7 +214968,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1037" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1025" }, { "name": "index", @@ -203575,7 +214976,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1017" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1006" }, { "name": "value", @@ -203583,10 +214984,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1027" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1016" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L999", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L988", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -203611,7 +215012,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_range", @@ -203619,7 +215020,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1180" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1166" }, { "name": "set_value", @@ -203627,7 +215028,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1151" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1138" } ], "properties": [ @@ -203637,10 +215038,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1169" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1156" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1132", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1119", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -203656,7 +215057,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1261" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1246" }, { "name": "run", @@ -203673,7 +215074,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203681,7 +215082,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1237" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1223" } ], "properties": [ @@ -203691,10 +215092,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1250" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1236" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1219", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1205", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -203710,7 +215111,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1314" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1298" }, { "name": "run", @@ -203727,7 +215128,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203735,7 +215136,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1290" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1275" } ], "properties": [ @@ -203745,10 +215146,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1303" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1288" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1272", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1257", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -203764,7 +215165,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1379" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1361" }, { "name": "increment", @@ -203772,7 +215173,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1372" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1354" }, { "name": "run", @@ -203789,7 +215190,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203797,7 +215198,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1344" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1328" } ], "properties": [ @@ -203807,10 +215208,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1360" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1344" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1328", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1312", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -203835,7 +215236,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203843,7 +215244,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1436" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1417" } ], "properties": [ @@ -203853,10 +215254,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1426" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1408" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L1403", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1385", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -203881,7 +215282,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -203889,7 +215290,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L197" } ], "properties": [ @@ -203899,10 +215300,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L182", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -203920,7 +215321,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L509" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L510" }, "context.cookies": { "name": "cookies", @@ -203929,7 +215330,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L184" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L205" }, "context.headers": { "name": "headers", @@ -203938,7 +215339,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L138" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L159" }, "context.ip_address": { "name": "ip_address", @@ -203947,7 +215348,7 @@ "description": "

The read-only IP address of the user's connection.

\n

This should not be used for security measures because it can easily be\nspoofed. When a user accesses the app through localhost, the IP\naddress is None. Otherwise, the IP address is determined from the\nremote_ip attribute of the Tornado request object and may be an\nIPv4 or IPv6 address.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L337" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L386" }, "context.is_embedded": { "name": "is_embedded", @@ -203956,7 +215357,7 @@ "description": "

Whether the app is embedded.

\n

This property returns a boolean value indicating whether the app is\nrunning in an embedded context. This is determined by the presence of\nembed=true as a query parameter in the URL. This is the only way to\ndetermine if the app is currently configured for embedding because\nembedding settings are not accessible through st.query_params or\nst.context.url.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L424" }, "context.locale": { "name": "locale", @@ -203965,7 +215366,24 @@ "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L327" + }, + "context.theme": { + "name": "theme", + "signature": "context.theme", + "example": "

Access the theme type of the app:

\n
\nimport streamlit as st\n\nst.write(f"The current theme type is {st.context.theme.type}.")\n
\n", + "description": "

A read-only, dictionary-like object containing theme information.

\n

Theme information is restricted to the type of the theme (dark or\nlight) and is inferred from the background color of the app.

\n
\n

Note

\n

Changes made to the background color through CSS are not included.

\n
\n", + "args": [ + { + "name": "type", + "type_name": "\"light\", \"dark\"", + "is_optional": false, + "description": "

The theme type inferred from the background color of the app.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L239" }, "context.timezone": { "name": "timezone", @@ -203974,7 +215392,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L271" }, "context.timezone_offset": { "name": "timezone_offset", @@ -203983,7 +215401,7 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L247" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L300" }, "context.url": { "name": "url", @@ -203992,7 +215410,7 @@ "description": "

The read-only URL of the app in the user's browser.

\n

st.context.url returns the URL through which the user is accessing\nthe app. This includes the scheme, domain name, port, and path. If\nquery parameters or anchors are present in the URL, they are removed\nand not included in this value.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L303" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L356" }, "CachedFunc.clear": { "name": "clear", @@ -204018,7 +215436,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/caching/cache_utils.py#L349" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_utils.py#L349" }, "StreamlitPage": { "name": "StreamlitPage", @@ -204031,7 +215449,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L268" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L272" } ], "properties": [ @@ -204041,7 +215459,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L245" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L249" }, { "name": "title", @@ -204049,7 +215467,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L234" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L238" }, { "name": "url_path", @@ -204057,10 +215475,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L253" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L257" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L128", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -204093,7 +215511,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L245" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L249" }, "StreamlitPage.run": { "name": "run", @@ -204101,7 +215519,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L268" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L272" }, "StreamlitPage.title": { "name": "title", @@ -204109,7 +215527,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L234" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L238" }, "StreamlitPage.url_path": { "name": "url_path", @@ -204117,7 +215535,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/navigation/page.py#L253" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L257" }, "streamlit.user": { "name": "user", @@ -204137,11 +215555,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L509" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L510" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/user_info.py#L374", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L375", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.user is dependent on the host platform running your\nStreamlit app. If your host platform has not configured the object,\nst.user will behave as it does in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.user["email"] or st.user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -204168,7 +215586,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L184" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L205" }, { "name": "headers", @@ -204177,7 +215595,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L138" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L159" }, { "name": "ip_address", @@ -204186,7 +215604,7 @@ "description": "

The read-only IP address of the user's connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L337" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L386" }, { "name": "is_embedded", @@ -204195,7 +215613,7 @@ "description": "

Whether the app is embedded.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L424" }, { "name": "locale", @@ -204204,7 +215622,24 @@ "description": "

The read-only locale of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L274" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L327" + }, + { + "name": "theme", + "signature": "st.theme.theme", + "example": "

Access the theme type of the app:

\n
\nimport streamlit as st\n\nst.write(f"The current theme type is {st.context.theme.type}.")\n
\n", + "description": "

A read-only, dictionary-like object containing theme information.

", + "args": [ + { + "name": "type", + "type_name": "\"light\", \"dark\"", + "is_optional": false, + "description": "

The theme type inferred from the background color of the app.

\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L239" }, { "name": "timezone", @@ -204213,7 +215648,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L218" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L271" }, { "name": "timezone_offset", @@ -204222,7 +215657,7 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L247" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L300" }, { "name": "url", @@ -204231,10 +215666,10 @@ "description": "

The read-only URL of the app in the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L303" + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L356" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/runtime/context.py#L127", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L148", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -204244,7 +215679,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L168", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -204264,7 +215699,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/plotly_chart.py#L80", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -204305,7 +215740,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/vega_charts.py#L109", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L108", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -204325,7 +215760,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -204344,7 +215779,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -204352,7 +215787,7 @@ "name": "rows", "type_name": "list[int]", "is_optional": false, - "description": "

The selected rows, identified by their integer position. The integer\npositions match the original dataframe, even if the user sorts the\ndataframe in their browser. For a pandas.DataFrame, you can\nretrieve data from its interger position using methods like .iloc[]\nor .iat[].

\n", + "description": "

The selected rows, identified by their integer position. The integer\npositions match the original dataframe, even if the user sorts the\ndataframe in their browser. For a pandas.DataFrame, you can\nretrieve data from its integer position using methods like .iloc[]\nor .iat[].

\n", "default": null }, { @@ -204371,7 +215806,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -204390,7 +215825,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.45.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -204413,7 +215848,7 @@ "is_attribute_dict": true } }, - "1.46.0": { + "1.47.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -204469,7 +215904,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -204498,7 +215933,7 @@ "type_name": "\"streamlit\" or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n

The "streamlit" theme can be partially customized through the\nconfiguration options theme.chartCategoricalColors and\ntheme.chartSequentialColors. Font configuration options are\nalso applied.

\n", "default": "behavior" }, { @@ -204534,7 +215969,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1529" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1537" }, "streamlit.area_chart": { "name": "area_chart", @@ -204624,7 +216059,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L782" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L790" }, "streamlit.audio": { "name": "audio", @@ -204698,7 +216133,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/media.py#L74" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/media.py#L73" }, "streamlit.audio_input": { "name": "audio_input", @@ -204787,7 +216222,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/audio_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/audio_input.py#L88" }, "streamlit.badge": { "name": "badge", @@ -204829,7 +216264,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L355" }, "streamlit.balloons": { "name": "balloons", @@ -204838,7 +216273,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -204936,7 +216371,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1032" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -204962,7 +216397,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", @@ -205059,7 +216494,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L88" }, "streamlit.cache": { "name": "cache", @@ -205133,11 +216568,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", - "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, persist, experimental_allow_widgets, hash_funcs=None)", + "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, show_time=False, persist, experimental_allow_widgets, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n", "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ @@ -205173,6 +216608,14 @@ "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached data is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", "default": "True" }, + { + "name": "show_time", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show the elapsed time next to the spinner text. If this is\nFalse (default), no time is displayed. If this is True,\nelapsed time is displayed with a precision of 0.1 seconds. The time\nformat is not configurable.

\n", + "default": null + }, { "name": "persist", "type_name": "\"disk\", bool, or None", @@ -205203,11 +216646,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_data_api.py#L382" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_data_api.py#L388" }, "streamlit.cache_resource": { "name": "cache_resource", - "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, validate, experimental_allow_widgets, hash_funcs=None)", + "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, show_time=False, validate, experimental_allow_widgets, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n", "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", "args": [ @@ -205243,6 +216686,14 @@ "description": "

Enable the spinner. Default is True to show a spinner when there is\na "cache miss" and the cached resource is being created. If string,\nvalue of show_spinner param will be used for spinner text.

\n", "default": "True" }, + { + "name": "show_time", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to show the elapsed time next to the spinner text. If this is\nFalse (default), no time is displayed. If this is True,\nelapsed time is displayed with a precision of 0.1 seconds. The time\nformat is not configurable.

\n", + "default": null + }, { "name": "validate", "type_name": "callable or None", @@ -205273,7 +216724,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_resource_api.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_resource_api.py#L262" }, "streamlit.camera_input": { "name": "camera_input", @@ -205362,7 +216813,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/camera_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/camera_input.py#L88" }, "streamlit.caption": { "name": "caption", @@ -205404,12 +216855,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L168" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L168" }, "streamlit.chat_input": { "name": "chat_input", "signature": "st.chat_input(placeholder=\"Your message\", *, key=None, max_chars=None, accept_file=False, file_type=None, disabled=False, on_submit=None, args=None, kwargs=None, width=\"stretch\")", - "examples": "

Example 1: Pin the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n", + "examples": "

Example 1: Pin the chat input widget to the bottom of your app

\n

When st.chat_input is used in the main body of an app, it will be\npinned to the bottom of the page.

\n
\nimport streamlit as st\n\nprompt = st.chat_input("Say something")\nif prompt:\n    st.write(f"User has sent the following prompt: {prompt}")\n
\n

Example 2: Use the chat input widget inline

\n

The chat input can also be used inline by nesting it inside any layout\ncontainer (container, columns, tabs, sidebar, etc) or fragment. Create\nchat interfaces embedded next to other content, or have multiple\nchatbots!

\n
\nimport streamlit as st\n\nwith st.sidebar:\n    messages = st.container(height=300)\n    if prompt := st.chat_input("Say something"):\n        messages.chat_message("user").write(prompt)\n        messages.chat_message("assistant").write(f"Echo: {prompt}")\n
\n

Example 3: Let users upload files

\n

When you configure your chat input widget to allow file attachments, it\nwill return a dict-like object when the user sends a submission. You\ncan access the user's message through the text attribute of this\ndictionary. You can access a list of the user's submitted file(s)\nthrough the files attribute. Similar to st.session_state, you\ncan use key or attribute notation.

\n
\nimport streamlit as st\n\nprompt = st.chat_input(\n    "Say something and/or attach an image",\n    accept_file=True,\n    file_type=["jpg", "jpeg", "png"],\n)\nif prompt and prompt.text:\n    st.markdown(prompt.text)\nif prompt and prompt["files"]:\n    st.image(prompt["files"][0])\n
\n

Example 4: Programmatically set the text via session state

\n

You can use st.session_state to set the text of the chat input widget.

\n
\nimport streamlit as st\n\nif st.button("Set Value"):\n    st.session_state.chat_input = "Hello, world!"\nst.chat_input(key="chat_input")\nst.write("Chat input value:", st.session_state.chat_input)\n
\n", "description": "

Display a chat input widget.

\n", "args": [ { @@ -205501,7 +216952,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/chat.py#L402" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/chat.py#L403" }, "streamlit.chat_message": { "name": "chat_message", @@ -205542,7 +216993,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/chat.py#L226" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/chat.py#L227" }, "streamlit.checkbox": { "name": "checkbox", @@ -205639,7 +217090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/checkbox.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/checkbox.py#L64" }, "streamlit.code": { "name": "code", @@ -205681,23 +217132,23 @@ }, { "name": "height", - "type_name": "\"content\" or int", + "type_name": "\"content\", \"stretch\", or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The height of the code block element. This can be one of the following:

\n
    \n
  • "content" (default): The height of the element matches the\nheight of its content.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", + "description": "

The height of the code block element. This can be one of the following:

\n
    \n
  • "content" (default): The height of the element matches the\nheight of its content.
  • \n
  • "stretch": The height of the element matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the element is not in a parent container, the height\nof the element matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", "default": null }, { "name": "width", - "type_name": "\"stretch\" or int", + "type_name": "\"stretch\", \"content\", or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The width of the code block element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "description": "

The width of the code block element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/code.py#L35" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/code.py#L36" }, "streamlit.color_picker": { "name": "color_picker", @@ -205794,7 +217245,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/color_picker.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/color_picker.py#L66" }, "streamlit.columns": { "name": "columns", @@ -205843,7 +217294,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L191" }, "streamlit.connection": { "name": "connection", @@ -205900,7 +217351,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/connection_factory.py#L206" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/connection_factory.py#L206" }, "streamlit.container": { "name": "container", @@ -205934,7 +217385,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L50" }, "streamlit.data_editor": { "name": "data_editor", @@ -206063,7 +217514,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/data_editor.py#L618" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/data_editor.py#L618" }, "streamlit.dataframe": { "name": "dataframe", @@ -206076,7 +217527,7 @@ "type_name": "dataframe-like, collection-like, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to display.

\n

Dataframe-like objects include dataframe and series objects from\npopular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow,\nSnowpark, Xarray, and more. You can use database cursors and\nclients that comply with the\nPython Database API Specification v2.0 (PEP 249). Additionally, you can use\nanything that supports the Python dataframe interchange protocol.

\n

For example, you can use the following:

\n
    \n
  • pandas.DataFrame, pandas.Series, pandas.Index,\npandas.Styler, and pandas.Array
  • \n
  • polars.DataFrame, polars.LazyFrame, and polars.Series
  • \n
  • snowflake.snowpark.dataframe.DataFrame,\nsnowflake.snowpark.table.Table
  • \n
\n

If a data type is not recognized, Streamlit will convert the object\nto a pandas.DataFrame or pyarrow.Table using a\n.to_pandas() or .to_arrow() method, respectively, if\navailable.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues and colors. It does not support some of the more exotic\nstyling options, like bar charts, hovering, and captions. For\nthese styling options, use column configuration instead. Text and\nnumber formatting from column_config always takes precedence\nover text and number formatting from pandas.Styler.

\n

Collection-like objects include all Python-native Collection\ntypes, such as dict, list, and set.

\n

If data is None, Streamlit renders an empty table.

\n", + "description": "

The data to display.

\n

Dataframe-like objects include dataframe and series objects from\npopular libraries like Dask, Modin, Numpy, pandas, Polars, PyArrow,\nSnowpark, Xarray, and more. You can use database cursors and\nclients that comply with the\nPython Database API Specification v2.0 (PEP 249). Additionally, you can use\nanything that supports the Python dataframe interchange protocol.

\n

For example, you can use the following:

\n
    \n
  • pandas.DataFrame, pandas.Series, pandas.Index,\npandas.Styler, and pandas.Array
  • \n
  • polars.DataFrame, polars.LazyFrame, and polars.Series
  • \n
  • snowflake.snowpark.dataframe.DataFrame,\nsnowflake.snowpark.table.Table
  • \n
\n

If a data type is not recognized, Streamlit will convert the object\nto a pandas.DataFrame or pyarrow.Table using a\n.to_pandas() or .to_arrow() method, respectively, if\navailable.

\n

If data is a pandas.Styler, it will be used to style its\nunderlying pandas.DataFrame. Streamlit supports custom cell\nvalues, colors, and font weights. It does not support some of the\nmore exotic styling options, like bar charts, hovering, and\ncaptions. For these styling options, use column configuration\ninstead. Text and number formatting from column_config always\ntakes precedence over text and number formatting from pandas.Styler.

\n

Collection-like objects include all Python-native Collection\ntypes, such as dict, list, and set.

\n

If data is None, Streamlit renders an empty table.

\n", "default": null }, { @@ -206168,7 +217619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L258" }, "streamlit.date_input": { "name": "date_input", @@ -206289,7 +217740,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/time_widgets.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/time_widgets.py#L653" }, "streamlit.dialog": { "name": "dialog", @@ -206302,7 +217753,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": false, - "description": "

The title to display at the top of the modal dialog. It cannot be empty.

\n", + "description": "

The title to display at the top of the modal dialog. It cannot be empty.

\n

The title can optionally contain GitHub-flavored Markdown of the\nfollowing types: Bold, Italics, Strikethroughs, Inline Code, Links,\nand Images. Images display like icons, with a max height equal to\nthe font height.

\n

Unsupported Markdown elements are unwrapped so only their children\n(text contents) render. Display unsupported elements as literal\ncharacters by backslash-escaping them. E.g.,\n"1\\. Not an ordered list".

\n

See the body parameter of st.markdown for additional,\nsupported Markdown directives.

\n", "default": null }, { @@ -206315,7 +217766,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/dialog_decorator.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/dialog_decorator.py#L133" }, "streamlit.divider": { "name": "divider", @@ -206333,7 +217784,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L318" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L318" }, "streamlit.download_button": { "name": "download_button", @@ -206454,7 +217905,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L258" }, "streamlit.echo": { "name": "echo", @@ -206472,7 +217923,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -206481,7 +217932,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -206515,7 +217966,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L32" }, "streamlit.exception": { "name": "exception", @@ -206541,7 +217992,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -206583,7 +218034,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L544" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L545" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -206591,7 +218042,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/dialog_decorator.py#L242" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/dialog_decorator.py#L259" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -206599,7 +218050,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/fragment.py#L471" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/fragment.py#L471" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -206615,7 +218066,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -206633,11 +218084,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", - "signature": "st.feedback(options=\"thumbs\", *, key=None, disabled=False, on_change=None, args=None, kwargs=None)", + "signature": "st.feedback(options=\"thumbs\", *, key=None, disabled=False, on_change=None, args=None, kwargs=None, width=\"content\")", "examples": "

Display a feedback widget with stars, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = ["one", "two", "three", "four", "five"]\nselected = st.feedback("stars")\nif selected is not None:\n    st.markdown(f"You selected {sentiment_mapping[selected]} star(s).")\n
\n

Display a feedback widget with thumbs, and show the selected sentiment:

\n
\nimport streamlit as st\n\nsentiment_mapping = [":material/thumb_down:", ":material/thumb_up:"]\nselected = st.feedback("thumbs")\nif selected is not None:\n    st.markdown(f"You selected: {sentiment_mapping[selected]}")\n
\n", "description": "

Display a feedback widget.

\n

A feedback widget is an icon-based button group available in three\nstyles, as described in options. It is commonly used in chat and AI\napps to allow users to rate responses.

\n", "args": [ @@ -206688,6 +218139,14 @@ "is_kwarg_only": true, "description": "

An optional dict of kwargs to pass to the callback.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the feedback widget. This can be one of the following:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -206698,7 +218157,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L291" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L298" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -206803,7 +218262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/file_uploader.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/file_uploader.py#L240" }, "streamlit.form": { "name": "form", @@ -206853,15 +218312,15 @@ }, { "name": "height", - "type_name": "\"content\" or int", + "type_name": "\"content\", \"stretch\", or int", "is_optional": false, "is_kwarg_only": true, - "description": "

The height of the form container. This can be one of the following:

\n
    \n
  • "content" (default): The height of the container matches the\nheight of its content.
  • \n
  • An integer specifying the height in pixels: The container has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", + "description": "

The height of the form container. This can be one of the following:

\n
    \n
  • "content" (default): The height of the container matches the\nheight of its content.
  • \n
  • "stretch": The height of the container matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the container is not in a parent container, the height\nof the container matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The container has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/form.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/form.py#L70" }, "streamlit.form_submit_button": { "name": "form_submit_button", @@ -206949,7 +218408,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/form.py#L232" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/form.py#L237" }, "streamlit.fragment": { "name": "fragment", @@ -206975,7 +218434,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/fragment.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/fragment.py#L306" }, "streamlit.get_option": { "name": "get_option", @@ -206993,7 +218452,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/config.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/config.py#L177" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", @@ -207019,7 +218478,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", @@ -207069,11 +218528,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L45" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L45" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=, *, width=\"stretch\")", + "signature": "st.help(obj=, *, width=\"stretch\")", "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -207095,11 +218554,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/doc_string.py#L46" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/doc_string.py#L47" }, "streamlit.html": { "name": "html", - "signature": "st.html(body)", + "signature": "st.html(body, *, width=\"stretch\")", "example": "
\nimport streamlit as st\n\nst.html(\n    "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"\n)\n
\n", "description": "

Insert HTML into your app.

\n

Adding custom HTML to your app impacts safety, styling, and\nmaintainability. We sanitize HTML with DOMPurify, but inserting HTML remains a\ndeveloper risk. Passing untrusted code to st.html or dynamically\nloading external code can increase the risk of vulnerabilities in your\napp.

\n

st.html content is not iframed. Executing JavaScript is not\nsupported at this time.

\n", "args": [ @@ -207110,10 +218569,18 @@ "is_kwarg_only": false, "description": "

The HTML code to insert. This can be one of the following:

\n
    \n
  • A string of HTML code.
  • \n
  • A path to a local file with HTML code. The path can be a str\nor Path object. Paths can be absolute or relative to the\nworking directory (where you execute streamlit run).
  • \n
  • Any object. If body is not a string or path, Streamlit will\nconvert the object to a string. body._repr_html_() takes\nprecedence over str(body) when available.
  • \n
\n

If the resulting HTML content is empty, Streamlit will raise an\nerror.

\n

If body is a path to a CSS file, Streamlit will wrap the CSS\ncontent in <style> tags automatically. When the resulting HTML\ncontent only contains style tags, Streamlit will send the content\nto the event container instead of the main container to avoid\ntaking up space in the app.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the HTML element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/html.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/html.py#L39" }, "streamlit.image": { "name": "image", @@ -207191,7 +218658,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -207225,7 +218692,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L177" }, "streamlit.json": { "name": "json", @@ -207259,7 +218726,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/json.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/json.py#L48" }, "streamlit.latex": { "name": "latex", @@ -207293,7 +218760,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L248" }, "streamlit.line_chart": { "name": "line_chart", @@ -207375,7 +218842,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L585" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L593" }, "streamlit.link_button": { "name": "link_button", @@ -207441,7 +218908,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L545" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L545" }, "streamlit.login": { "name": "login", @@ -207459,7 +218926,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L55" }, "streamlit.logo": { "name": "logo", @@ -207501,7 +218968,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/logo.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/logo.py#L37" }, "streamlit.logout": { "name": "logout", @@ -207510,7 +218977,7 @@ "description": "

Logout the current user.

\n

This command removes the user's information from st.user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.user will not be cleared in any other session.\nst.user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L293" }, "streamlit.map": { "name": "map", @@ -207592,7 +219059,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", @@ -207634,11 +219101,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/markdown.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L39" }, "streamlit.metric": { "name": "metric", - "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False, width=\"stretch\")", + "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False, width=\"stretch\", height=\"content\")", "examples": "

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ @@ -207698,6 +219165,14 @@ "description": "

Whether to show a border around the metric container. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown.

\n", "default": null }, + { + "name": "height", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The height of the metric element. This can be one of the following:

\n
    \n
  • "content" (default): The height of the element matches the\nheight of its content.
  • \n
  • "stretch": The height of the element matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the element is not in a parent container, the height\nof the element matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n", + "default": null + }, { "name": "width", "type_name": "\"stretch\", \"content\", or int", @@ -207708,11 +219183,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/metric.py#L52" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/metric.py#L58" }, "streamlit.multiselect": { "name": "multiselect", - "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False)", + "signature": "st.multiselect(label, options, default=None, format_func=special_internal_function, key=None, help=None, on_change=None, args=None, kwargs=None, *, max_selections=None, placeholder=None, disabled=False, label_visibility=\"visible\", accept_new_options=False, width=\"stretch\")", "examples": "

Example 1: Use a basic multiselect widget

\n

You can declare one or more initial selections with the default\nparameter.

\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite colors?",\n    ["Green", "Yellow", "Red", "Blue"],\n    default=["Yellow", "Red"],\n)\n\nst.write("You selected:", options)\n
\n

Example 2: Let users to add new options

\n

To allow users to enter and select new options that aren't included in\nthe options list, use the accept_new_options parameter. To\nprevent users from adding an unbounded number of new options, use the\nmax_selections parameter.

\n
\nimport streamlit as st\n\noptions = st.multiselect(\n    "What are your favorite cat names?",\n    ["Jellybeans", "Fish Biscuit", "Madam President"],\n    max_selections=5,\n    accept_new_options=True,\n)\n\nst.write("You selected:", options)\n
\n", "description": "

Display a multiselect widget.

\n

The multiselect widget starts as empty.

\n", "args": [ @@ -207801,7 +219276,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays one of the two\nfollowing placeholder strings:

\n
    \n
  • "Choose an option" is displayed if you set\naccept_new_options=False.
  • \n
  • "Choose or add an option" is displayed if you set\naccept_new_options=True.
  • \n
\n", + "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays placeholder text\nbased on the widget's configuration:

\n
    \n
  • "Choose options" is displayed when options are available and\naccept_new_options=False.
  • \n
  • "Choose or add options" is displayed when options are available\nand accept_new_options=True.
  • \n
  • "Add options" is displayed when no options are available and\naccept_new_options=True.
  • \n
  • "No options to select" is displayed when no options are available\nand accept_new_options=False. The widget is also disabled in\nthis case.
  • \n
\n", "default": null }, { @@ -207827,6 +219302,14 @@ "is_kwarg_only": true, "description": "

Whether the user can add selections that aren't included in options.\nIf this is False (default), the user can only select from the\nitems in options. If this is True, the user can enter new\nitems that don't exist in options.

\n

When a user enters and selects a new item, it is included in the\nwidget's returned list as a string. The new item is not added to\nthe widget's drop-down menu. Streamlit will use a case-insensitive\nmatch from options before adding a new item, and a new item\ncan't be added if a case-insensitive match is already selected. The\nmax_selections argument is still enforced.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the multiselect widget. This can be one of the\nfollowing:

\n
    \n
  • "stretch" (default): The width of the widget matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -207837,7 +219320,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/multiselect.py#L215" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/multiselect.py#L223" }, "streamlit.navigation": { "name": "navigation", @@ -207878,7 +219361,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/navigation.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/navigation.py#L82" }, "streamlit.number_input": { "name": "number_input", @@ -208023,7 +219506,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/number_input.py#L216" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/number_input.py#L216" }, "streamlit.page_link": { "name": "page_link", @@ -208081,11 +219564,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button.py#L662" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L662" }, "streamlit.pills": { "name": "pills", - "signature": "st.pills(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.pills(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\", width=\"content\")", "examples": "

Example 1: Multi-select pills

\n

Display a multi-select pills widget, and show the selection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.pills("Directions", options, selection_mode="multi")\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select pills with icons

\n

Display a single-select pills widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.pills(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n", "description": "

Display a pills widget.

\n

A pills widget is similar to a st.selectbox or st.multiselect\nwhere the options are displayed as pill-buttons instead of a\ndrop-down list.

\n", "args": [ @@ -208184,6 +219667,14 @@ "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the pills widget. This can be one of the following:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -208194,12 +219685,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L448" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L472" }, "streamlit.plotly_chart": { "name": "plotly_chart", "signature": "st.plotly_chart(figure_or_data, use_container_width=True, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", - "example": "

The example below comes straight from the examples at\nhttps://plot.ly/python. Note that plotly.figure_factory requires\nscipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n", + "examples": "

Example 1: Basic Plotly Chart

\n

The example below comes from the examples at https://plot.ly/python.\nNote that plotly.figure_factory requires scipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n

Example 2: Plotly Chart with configuration

\n

By default, Plotly charts have scroll zoom enabled. If you have a\nlonger page and want to avoid conflicts between page scrolling and\nzooming, you can use Plotly's configuration options to disable scroll\nzoom. In the following example, scroll zoom is disabled, but the zoom\nbuttons are still enabled in the modebar.

\n
\nimport streamlit as st\nimport plotly.graph_objects as go\n\nfig = go.Figure()\nfig.add_trace(\n    go.Scatter(\n        x=[1, 2, 3, 4, 5],\n        y=[1, 3, 2, 5, 4]\n    )\n)\n\nst.plotly_chart(fig, config = {'scrollZoom': False})\n
\n", "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly to use this command. Your app's\nperformance may be enhanced by installing orjson as well.

\n
\n", "args": [ { @@ -208207,7 +219698,7 @@ "type_name": "plotly.graph_objs.Figure, plotly.graph_objs.Data, or dict/list of plotly.graph_objs.Figure/Data", "is_optional": false, "is_kwarg_only": false, - "description": "

The Plotly Figure or Data object to render. See\nhttps://plot.ly/python/ for examples of graph descriptions.

\n", + "description": "

The Plotly Figure or Data object to render. See\nhttps://plot.ly/python/ for examples of graph descriptions.

\n
\n

Note

\n

If your chart contains more than 1000 data points, Plotly will\nuse a WebGL renderer to display the chart. Different browsers\nhave different limits on the number of WebGL contexts per page.\nIf you have multiple WebGL contexts on a page, you may need to\nswitch to SVG rendering mode. You can do this by setting\nrender_mode="svg" within the figure. For example, the\nfollowing code defines a Plotly Express line chart that will\nrender in SVG mode when passed to st.plotly_chart:\npx.line(df, x="x", y="y", render_mode="svg").

\n
\n", "default": null }, { @@ -208223,7 +219714,7 @@ "type_name": "\"streamlit\" or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n

The "streamlit" theme can be partially customized through the\nconfiguration options theme.chartCategoricalColors and\ntheme.chartSequentialColors. Font configuration options are\nalso applied.

\n", "default": "behavior" }, { @@ -208255,7 +219746,7 @@ "type_name": null, "is_optional": null, "is_kwarg_only": true, - "description": "

Any argument accepted by Plotly's plot() function.

\n", + "description": "

Additional arguments accepted by Plotly's plot() function.

\n

This supports config, a dictionary of Plotly configuration\noptions. For more information about Plotly configuration options,\nsee Plotly's documentation on Configuration in Python.

\n", "default": null } ], @@ -208267,7 +219758,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -208317,7 +219808,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L676" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L677" }, "streamlit.progress": { "name": "progress", @@ -208351,13 +219842,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/progress.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/progress.py#L94" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=True, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,  # Use Streamlit theme to pick map style\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", - "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n", + "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n
\n

Note

\n

Pydeck uses two WebGL contexts per chart, and different browsers\nhave different limits on the number of WebGL contexts per page.\nIf you exceed this limit, the oldest contexts will be dropped to\nmake room for the new ones. To avoid this limitation in most\nbrowsers, don't display more than eight Pydeck charts on a single\npage.

\n
\n", "args": [ { "name": "pydeck_obj", @@ -208424,7 +219915,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", @@ -208466,7 +219957,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -208595,7 +220086,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/radio.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/radio.py#L149" }, "streamlit.rerun": { "name": "rerun", @@ -208612,7 +220103,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L102" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -208702,11 +220193,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1292" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1300" }, "streamlit.segmented_control": { "name": "segmented_control", - "signature": "st.segmented_control(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\")", + "signature": "st.segmented_control(label, options, *, selection_mode=\"single\", default=None, format_func=None, key=None, help=None, on_change=None, args=None, kwargs=None, disabled=False, label_visibility=\"visible\", width=\"content\")", "examples": "

Example 1: Multi-select segmented control

\n

Display a multi-select segmented control widget, and show the\nselection:

\n
\nimport streamlit as st\n\noptions = ["North", "East", "South", "West"]\nselection = st.segmented_control(\n    "Directions", options, selection_mode="multi"\n)\nst.markdown(f"Your selected options: {selection}.")\n
\n

Example 2: Single-select segmented control with icons

\n

Display a single-select segmented control widget with icons:

\n
\nimport streamlit as st\n\noption_map = {\n    0: ":material/add:",\n    1: ":material/zoom_in:",\n    2: ":material/zoom_out:",\n    3: ":material/zoom_out_map:",\n}\nselection = st.segmented_control(\n    "Tool",\n    options=option_map.keys(),\n    format_func=lambda option: option_map[option],\n    selection_mode="single",\n)\nst.write(\n    "Your selected option: "\n    f"{None if selection is None else option_map[selection]}"\n)\n
\n", "description": "

Display a segmented control widget.

\n

A segmented control widget is a linear set of segments where each of\nthe passed options functions like a toggle button.

\n", "args": [ @@ -208805,6 +220296,14 @@ "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the segmented control widget. This can be one of the\nfollowing:

\n
    \n
  • "content" (default): The width of the widget matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the widget matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The widget has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the widget matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [ @@ -208815,7 +220314,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/button_group.py#L658" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L699" }, "streamlit.select_slider": { "name": "select_slider", @@ -208928,7 +220427,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/select_slider.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/select_slider.py#L144" }, "streamlit.selectbox": { "name": "selectbox", @@ -208954,7 +220453,7 @@ }, { "name": "index", - "type_name": "int", + "type_name": "int or None", "is_optional": false, "is_kwarg_only": false, "description": "

The index of the preselected option on first render. If None,\nwill initialize empty and return None until the user selects an option.\nDefaults to 0 (the first option).

\n", @@ -209013,7 +220512,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays one of the two\nfollowing placeholder strings:

\n
    \n
  • "Choose an option" is displayed if you set\naccept_new_options=False.
  • \n
  • "Choose or add an option" is displayed if you set\naccept_new_options=True.
  • \n
\n", + "description": "

A string to display when no options are selected.\nIf this is None (default), the widget displays placeholder text\nbased on the widget's configuration:

\n
    \n
  • "Choose an option" is displayed when options are available and\naccept_new_options=False.
  • \n
  • "Choose or add an option" is displayed when options are available\nand accept_new_options=True.
  • \n
  • "Add an option" is displayed when no options are available and\naccept_new_options=True.
  • \n
  • "No options to select" is displayed when no options are available\nand accept_new_options=False. The widget is also disabled in\nthis case.
  • \n
\n", "default": null }, { @@ -209057,7 +220556,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/selectbox.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/selectbox.py#L260" }, "streamlit.set_option": { "name": "set_option", @@ -209083,7 +220582,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/config.py#L128" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/config.py#L128" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -209120,7 +220619,7 @@ "type_name": "\"auto\", \"expanded\", \"collapsed\", or None", "is_optional": false, "is_kwarg_only": false, - "description": "

How the sidebar should start out. If this is None (default), the\nsidebar state is inherited from the previous call of\nst.set_page_config. If no previous call exists, the sidebar state\nis "auto".

\n

The following states are supported:

\n
    \n
  • "auto": The sidebar is hidden on small devices and shown otherwise.
  • \n
  • "expanded": The sidebar is shown initially.
  • \n
  • "collapsed": The sidebar is hidden initially.
  • \n
\n

In most cases, "auto" provides the best user experience across\ndevices of different sizes.

\n", + "description": "

How the sidebar should start out. If this is None (default), the\nsidebar state is inherited from the previous call of\nst.set_page_config. If no previous call exists, the sidebar state\nis "auto".

\n

The folowing states are supported:

\n
    \n
  • "auto": The sidebar is hidden on small devices and shown otherwise.
  • \n
  • "expanded": The sidebar is shown initially.
  • \n
  • "collapsed": The sidebar is hidden initially.
  • \n
\n

In most cases, "auto" provides the best user experience across\ndevices of different sizes.

\n", "default": null }, { @@ -209133,7 +220632,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/page_config.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/page_config.py#L109" }, "streamlit.slider": { "name": "slider", @@ -209262,7 +220761,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/slider.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/slider.py#L430" }, "streamlit.snow": { "name": "snow", @@ -209271,7 +220770,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -209305,7 +220804,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/spinner.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/spinner.py#L37" }, "streamlit.status": { "name": "status", @@ -209354,7 +220853,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L816" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L817" }, "streamlit.stop": { "name": "stop", @@ -209363,7 +220862,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -209413,7 +220912,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L134" }, "streamlit.success": { "name": "success", @@ -209447,7 +220946,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L250" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L250" }, "streamlit.switch_page": { "name": "switch_page", @@ -209465,7 +220964,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/commands/execution_control.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L157" }, "streamlit.table": { "name": "table", @@ -209483,7 +220982,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L651" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L651" }, "streamlit.tabs": { "name": "tabs", @@ -209516,7 +221015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/layouts.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L420" }, "streamlit.text": { "name": "text", @@ -209550,7 +221049,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/text.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/text.py#L31" }, "streamlit.text_area": { "name": "text_area", @@ -209576,10 +221075,10 @@ }, { "name": "height", - "type_name": "int or None", + "type_name": "\"content\", \"stretch\", int, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired height of the UI element expressed in pixels. If this is\nNone (default), the widget's initial height fits three lines.\nThe height must be at least 68 pixels, which fits two lines.

\n", + "description": "

The height of the text area widget. This can be one of the\nfollowing:

\n
    \n
  • None (default): The height of the widget fits three lines.
  • \n
  • "content": The height of the widget matches the\nheight of its content.
  • \n
  • "stretch": The height of the widget matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the widget is not in a parent container, the height\nof the widget matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The widget has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n

The widget's height can't be smaller than the height of two lines.\nWhen label_visibility="collapsed", the minimum height is 68\npixels. Otherwise, the minimum height is 98 pixels.

\n", "default": null }, { @@ -209671,7 +221170,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/text_widgets.py#L448" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/text_widgets.py#L450" }, "streamlit.text_input": { "name": "text_input", @@ -209808,7 +221307,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/text_widgets.py#L125" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/text_widgets.py#L127" }, "streamlit.time_input": { "name": "time_input", @@ -209913,7 +221412,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/time_widgets.py#L351" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/time_widgets.py#L351" }, "streamlit.title": { "name": "title", @@ -209955,12 +221454,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/heading.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L223" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's top-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -209981,7 +221480,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/toast.py#L38" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/toast.py#L38" }, "streamlit.toggle": { "name": "toggle", @@ -210078,7 +221577,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/widgets/checkbox.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/checkbox.py#L190" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -210115,7 +221614,7 @@ "type_name": "\"streamlit\" or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n", + "description": "

The theme of the chart. If theme is "streamlit" (default),\nStreamlit uses its own design default. If theme is None,\nStreamlit falls back to the default behavior of the library.

\n

The "streamlit" theme can be partially customized through the\nconfiguration options theme.chartCategoricalColors and\ntheme.chartSequentialColors. Font configuration options are\nalso applied.

\n", "default": "behavior" }, { @@ -210159,7 +221658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L1691" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1704" }, "streamlit.video": { "name": "video", @@ -210241,7 +221740,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/media.py#L228" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/media.py#L227" }, "streamlit.warning": { "name": "warning", @@ -210275,7 +221774,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/alert.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L105" }, "streamlit.write": { "name": "write", @@ -210320,7 +221819,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/write.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/write.py#L255" }, "streamlit.write_stream": { "name": "write_stream", @@ -210345,7 +221844,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -210353,7 +221852,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_data_api.py#L599" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_data_api.py#L611" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -210361,7 +221860,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_resource_api.py#L442" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_resource_api.py#L465" }, "streamlit.query_params.clear": { "name": "clear", @@ -210376,7 +221875,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -210394,7 +221893,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -210418,7 +221917,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.missing_attr_error_message": { "name": "missing_attr_error_message", @@ -210426,7 +221925,7 @@ "description": "

Returns a formatted error message for missing attributes.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" }, "streamlit.query_params.missing_key_error_message": { "name": "missing_key_error_message", @@ -210434,7 +221933,7 @@ "description": "

Returns a formatted error message for missing keys.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -210449,7 +221948,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -210473,7 +221972,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -210494,11 +221993,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -210522,11 +222021,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -210549,7 +222048,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L355" }, { "name": "query", @@ -210622,7 +222121,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L222" }, { "name": "reset", @@ -210638,7 +222137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -210655,7 +222154,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L384" }, { "name": "engine", @@ -210670,7 +222169,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L371" }, { "name": "session", @@ -210686,10 +222185,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L397" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -210714,7 +222213,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L457" }, { "name": "query", @@ -210763,7 +222262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L282" }, { "name": "reset", @@ -210779,7 +222278,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -210795,7 +222294,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L529" }, { "name": "write_pandas", @@ -210860,7 +222359,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L375" } ], "properties": [ @@ -210878,10 +222377,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L490" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L49", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L49", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], @@ -210923,7 +222422,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -210939,7 +222438,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -210948,7 +222447,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -210959,10 +222458,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -210980,7 +222479,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L355" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -210995,7 +222494,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L384" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -211010,7 +222509,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L371" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -211083,7 +222582,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L222" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -211099,7 +222598,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -211115,7 +222614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/sql_connection.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L397" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -211148,7 +222647,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -211164,7 +222663,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -211173,7 +222672,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -211182,7 +222681,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -211198,7 +222697,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L457" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -211247,7 +222746,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L282" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -211263,7 +222762,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L490" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -211279,7 +222778,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -211295,7 +222794,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L529" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -211360,7 +222859,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L375" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -211376,7 +222875,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -211394,10 +222893,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211434,7 +222933,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1214" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1234" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -211452,10 +222951,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211492,7 +222991,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1021" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1039" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -211510,10 +223009,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211558,7 +223057,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L789" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L805" }, "streamlit.column_config.Column": { "name": "Column", @@ -211576,10 +223075,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211616,7 +223115,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L252" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -211634,10 +223133,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211714,7 +223213,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1802" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1827" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -211732,10 +223231,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211820,7 +223319,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1485" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1508" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -211838,10 +223337,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211862,7 +223361,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1311" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1332" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -211880,10 +223379,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211904,7 +223403,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L2080" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L2116" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -211922,10 +223421,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -211962,7 +223461,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1136" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -211980,10 +223479,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212047,12 +223546,12 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The text that is displayed in the cell. This can be one of the\nfollowing:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A JS-flavored regular expression (detected by usage of parentheses)\nto extract a part of the URL via a capture group. For example, use\n"https://(.*?)\\.example\\.com" to extract the display text\n"foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.\nText formatting from column_config always takes precedence over\ntext formatting from pandas.Styler.

\n", + "description": "

The text that is displayed in the cell. This can be one of the\nfollowing:

\n
    \n
  • None (default) to display the URL itself.
  • \n
  • A string that is displayed in every cell, e.g. "Open link".
  • \n
  • A Material icon that is displayed in every cell, e.g. ":material/open_in_new:".
  • \n
  • A JS-flavored regular expression (detected by usage of parentheses)\nto extract a part of the URL via a capture group. For example, use\n"https://(.*?)\\.example\\.com" to extract the display text\n"foo" from the URL "https://foo.example.com".
  • \n
\n\n

For more complex cases, you may use Pandas Styler's format\nfunction on the underlying dataframe. Note that this makes the app slow,\ndoesn't work with editable columns, and might be removed in the future.\nText formatting from column_config always takes precedence over\ntext formatting from pandas.Styler.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L630" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L642" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -212070,10 +223569,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212094,7 +223593,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1401" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1423" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -212112,10 +223611,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212163,7 +223662,7 @@ "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"yen\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A format string controlling how numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", + "description": "

A format string controlling how numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "bytes": Show the number in a byte format (e.g. "1.2KB").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Formatting from column_config always takes precedence over\nformatting from pandas.Styler. The formatting does not impact the\nreturn value when used in st.data_editor.

\n", "default": "locale" }, { @@ -212187,16 +223686,16 @@ "type_name": "int, float, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The precision of numbers that can be entered. If this None\n(default), integer columns will have a step of 1 and float columns will\nhave unrestricted precision. In this case, some floats may display like\nintegers. Setting step for float columns will ensure a consistent\nnumber of digits after the decimal even without setting format.

\n", + "description": "

The precision of numbers that can be entered. If this None\n(default), integer columns will have a step of 1 and float columns will\nhave unrestricted precision. In this case, some floats may display like\nintegers. Setting step for float columns will ensure a consistent\nnumber of digits after the decimal are displayed.

\n

If format is a predefined format like "dollar", step\noverrides the display precision. If format is a printf-style format\nstring, step will not change the display precision.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L351" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L356" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", - "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, pinned=None, format=None, min_value=None, max_value=None)", + "signature": "st.column_config.ProgressColumn(label=None, *, width=None, help=None, pinned=None, format=None, min_value=None, max_value=None, step=None)", "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [200, 550, 1000, 80],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ProgressColumn(\n            "Sales volume",\n            help="The sales volume in USD",\n            format="$%f",\n            min_value=0,\n            max_value=1000,\n        ),\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a progress column in st.dataframe or st.data_editor.

\n

Cells need to contain a number. Progress columns are not editable at the moment.\nThis command needs to be used in the column_config parameter of st.dataframe\nor st.data_editor.

\n", "args": [ @@ -212210,10 +223709,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212229,7 +223728,7 @@ "type_name": "str, \"plain\", \"localized\", \"percent\", \"dollar\", \"euro\", \"yen\", \"accounting\", \"compact\", \"scientific\", \"engineering\", or None", "is_optional": false, "is_kwarg_only": true, - "description": "

A format string controlling how the numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler. The number formatting does\nnot impact the return value when used in st.data_editor.

\n", + "description": "

A format string controlling how the numbers are displayed.\nThis can be one of the following values:

\n
    \n
  • None (default): Streamlit infers the formatting from the data.
  • \n
  • "plain": Show the full number without any formatting (e.g. "1234.567").
  • \n
  • "localized": Show the number in the default locale format (e.g. "1,234.567").
  • \n
  • "percent": Show the number as a percentage (e.g. "123456.70%").
  • \n
  • "dollar": Show the number as a dollar amount (e.g. "$1,234.57").
  • \n
  • "euro": Show the number as a euro amount (e.g. "\u20ac1,234.57").
  • \n
  • "yen": Show the number as a yen amount (e.g. "\u00a51,235").
  • \n
  • "accounting": Show the number in an accounting format (e.g. "1,234.00").
  • \n
  • "bytes": Show the number in a byte format (e.g. "1.2KB").
  • \n
  • "compact": Show the number in a compact format (e.g. "1.2K").
  • \n
  • "scientific": Show the number in scientific notation (e.g. "1.235E3").
  • \n
  • "engineering": Show the number in engineering notation (e.g. "1.235E3").
  • \n
  • printf-style format string: Format the number with a printf\nspecifier, like "%d" to show a signed integer (e.g. "1234") or\n"%X" to show an unsigned hexadecimal integer (e.g. "4D2"). You\ncan also add prefixes and suffixes. To show British pounds, use\n"\u00a3 %.2f" (e.g. "\u00a3 1234.57"). For more information, see sprint-js.
  • \n
\n

Number formatting from column_config always takes precedence over\nnumber formatting from pandas.Styler. The number formatting does\nnot impact the return value when used in st.data_editor.

\n", "default": "locale" }, { @@ -212255,10 +223754,18 @@ "is_kwarg_only": true, "description": "

The maximum value of the progress bar. If this is None (default),\nthe maximum will be 100 for integer values and 1.0 for float values.

\n", "default": null + }, + { + "name": "step", + "type_name": "int, float, or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The precision of numbers. If this is None (default), integer columns\nwill have a step of 1 and float columns will have a step of 0.01.\nSetting step for float columns will ensure a consistent number of\ndigits after the decimal are displayed.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1956" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1982" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -212276,10 +223783,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212332,7 +223839,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L896" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L913" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -212350,10 +223857,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212414,7 +223921,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L521" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -212432,10 +223939,10 @@ }, { "name": "width", - "type_name": "\"small\", \"medium\", \"large\", or None", + "type_name": "\"small\", \"medium\", \"large\", int, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
\n", + "description": "

The display width of the column. If this is None (default), the\ncolumn will be sized to fit the cell contents. Otherwise, this can be\none of the following:

\n
    \n
  • "small": 75px wide
  • \n
  • "medium": 200px wide
  • \n
  • "large": 400px wide
  • \n
  • An integer specifying the width in pixels
  • \n
\n", "default": null }, { @@ -212512,7 +224019,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/column_types.py#L1649" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1673" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -212532,7 +224039,7 @@ "type_name": "str, Path, or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The path to serve the component's frontend files from. The path should\nbe absolute. If path is None (default), Streamlit will serve\nthe component from the location in url. Either path or url\nmust be specified, but not both.

\n", + "description": "

The path to serve the component's frontend files from. The path should\nbe absolute. If path is None (default), Streamlit will serve\nthe component from the location in url. Either path or url\nmust be specified. If both are specified, then url will take\nprecedence.

\n", "default": null }, { @@ -212540,7 +224047,7 @@ "type_name": "str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The URL that the component is served from. If url is None\n(default), Streamlit will serve the component from the location in\npath. Either path or url must be specified, but not both.

\n", + "description": "

The URL that the component is served from. If url is None\n(default), Streamlit will serve the component from the location in\npath. Either path or url must be specified. If both are\nspecified, then url will take precedence.

\n", "default": null } ], @@ -212552,7 +224059,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/components/v1/component_registry.py#L52" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/components/v1/component_registry.py#L53" }, "streamlit.components.v1.html": { "name": "html", @@ -212602,7 +224109,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/iframe.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/iframe.py#L105" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -212652,7 +224159,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/iframe.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/iframe.py#L28" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -212678,7 +224185,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L735" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L735" }, "StatusContainer.update": { "name": "update", @@ -212711,7 +224218,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -212740,7 +224247,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1029" }, { "name": "run", @@ -212764,7 +224271,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L372" }, { "name": "switch_page", @@ -212788,7 +224295,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L395" } ], "properties": [ @@ -212805,7 +224312,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L450" }, { "name": "button_group", @@ -212820,7 +224327,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L465" }, { "name": "caption", @@ -212835,7 +224342,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L479" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L479" }, { "name": "chat_input", @@ -212850,7 +224357,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L493" }, { "name": "chat_message", @@ -212865,7 +224372,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L507" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L507" }, { "name": "checkbox", @@ -212880,7 +224387,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L521" }, { "name": "code", @@ -212895,7 +224402,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L535" }, { "name": "color_picker", @@ -212910,7 +224417,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L549" }, { "name": "columns", @@ -212925,7 +224432,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L563" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L563" }, { "name": "dataframe", @@ -212940,7 +224447,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L580" }, { "name": "date_input", @@ -212955,7 +224462,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L594" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L594" }, { "name": "divider", @@ -212970,7 +224477,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L608" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L608" }, { "name": "error", @@ -212985,7 +224492,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L622" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L622" }, { "name": "exception", @@ -213000,7 +224507,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L636" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L636" }, { "name": "expander", @@ -213015,7 +224522,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L650" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L650" }, { "name": "header", @@ -213030,7 +224537,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L664" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L664" }, { "name": "info", @@ -213045,7 +224552,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L678" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L678" }, { "name": "json", @@ -213060,7 +224567,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L692" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L692" }, { "name": "latex", @@ -213075,7 +224582,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L706" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L706" }, { "name": "main", @@ -213090,7 +224597,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L424" }, { "name": "markdown", @@ -213105,7 +224612,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L720" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L720" }, { "name": "metric", @@ -213120,7 +224627,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L734" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L734" }, { "name": "multiselect", @@ -213135,7 +224642,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L748" }, { "name": "number_input", @@ -213150,7 +224657,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L762" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L762" }, { "name": "radio", @@ -213165,7 +224672,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L776" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L776" }, { "name": "select_slider", @@ -213180,7 +224687,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L790" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L790" }, { "name": "selectbox", @@ -213195,7 +224702,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L804" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L804" }, { "name": "sidebar", @@ -213210,7 +224717,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L437" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L437" }, { "name": "slider", @@ -213225,7 +224732,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L818" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L818" }, { "name": "status", @@ -213240,7 +224747,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L860" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L860" }, { "name": "subheader", @@ -213255,7 +224762,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L832" }, { "name": "success", @@ -213270,7 +224777,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L846" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L846" }, { "name": "table", @@ -213285,7 +224792,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L874" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L874" }, { "name": "tabs", @@ -213300,7 +224807,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L888" }, { "name": "text", @@ -213315,7 +224822,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L908" }, { "name": "text_area", @@ -213330,7 +224837,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L922" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L922" }, { "name": "text_input", @@ -213345,7 +224852,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L936" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L936" }, { "name": "time_input", @@ -213360,7 +224867,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L950" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L950" }, { "name": "title", @@ -213375,7 +224882,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L964" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L964" }, { "name": "toast", @@ -213390,7 +224897,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L978" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L978" }, { "name": "toggle", @@ -213405,7 +224912,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L992" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L992" }, { "name": "warning", @@ -213420,10 +224927,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1006" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1006" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -213463,7 +224970,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L450" }, "AppTest.button_group": { "name": "button_group", @@ -213478,7 +224985,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L465" }, "AppTest.caption": { "name": "caption", @@ -213493,7 +225000,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L479" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L479" }, "AppTest.chat_input": { "name": "chat_input", @@ -213508,7 +225015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L493" }, "AppTest.chat_message": { "name": "chat_message", @@ -213523,7 +225030,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L507" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L507" }, "AppTest.checkbox": { "name": "checkbox", @@ -213538,7 +225045,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L521" }, "AppTest.code": { "name": "code", @@ -213553,7 +225060,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L535" }, "AppTest.color_picker": { "name": "color_picker", @@ -213568,7 +225075,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L549" }, "AppTest.columns": { "name": "columns", @@ -213583,7 +225090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L563" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L563" }, "AppTest.dataframe": { "name": "dataframe", @@ -213598,7 +225105,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L580" }, "AppTest.date_input": { "name": "date_input", @@ -213613,7 +225120,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L594" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L594" }, "AppTest.divider": { "name": "divider", @@ -213628,7 +225135,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L608" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L608" }, "AppTest.error": { "name": "error", @@ -213643,7 +225150,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L622" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L622" }, "AppTest.exception": { "name": "exception", @@ -213658,7 +225165,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L636" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L636" }, "AppTest.expander": { "name": "expander", @@ -213673,7 +225180,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L650" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L650" }, "AppTest.from_file": { "name": "from_file", @@ -213705,7 +225212,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L272" }, "AppTest.from_function": { "name": "from_function", @@ -213753,7 +225260,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L225" }, "AppTest.from_string": { "name": "from_string", @@ -213785,7 +225292,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -213809,7 +225316,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1029" }, "AppTest.header": { "name": "header", @@ -213824,7 +225331,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L664" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L664" }, "AppTest.info": { "name": "info", @@ -213839,7 +225346,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L678" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L678" }, "AppTest.json": { "name": "json", @@ -213854,7 +225361,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L692" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L692" }, "AppTest.latex": { "name": "latex", @@ -213869,7 +225376,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L706" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L706" }, "AppTest.main": { "name": "main", @@ -213884,7 +225391,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L424" }, "AppTest.markdown": { "name": "markdown", @@ -213899,7 +225406,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L720" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L720" }, "AppTest.metric": { "name": "metric", @@ -213914,7 +225421,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L734" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L734" }, "AppTest.multiselect": { "name": "multiselect", @@ -213929,7 +225436,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L748" }, "AppTest.number_input": { "name": "number_input", @@ -213944,7 +225451,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L762" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L762" }, "AppTest.radio": { "name": "radio", @@ -213959,7 +225466,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L776" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L776" }, "AppTest.run": { "name": "run", @@ -213983,7 +225490,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L372" }, "AppTest.select_slider": { "name": "select_slider", @@ -213998,7 +225505,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L790" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L790" }, "AppTest.selectbox": { "name": "selectbox", @@ -214013,7 +225520,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L804" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L804" }, "AppTest.sidebar": { "name": "sidebar", @@ -214028,7 +225535,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L437" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L437" }, "AppTest.slider": { "name": "slider", @@ -214043,7 +225550,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L818" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L818" }, "AppTest.status": { "name": "status", @@ -214058,7 +225565,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L860" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L860" }, "AppTest.subheader": { "name": "subheader", @@ -214073,7 +225580,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L832" }, "AppTest.success": { "name": "success", @@ -214088,7 +225595,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L846" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L846" }, "AppTest.switch_page": { "name": "switch_page", @@ -214112,7 +225619,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L395" }, "AppTest.table": { "name": "table", @@ -214127,7 +225634,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L874" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L874" }, "AppTest.tabs": { "name": "tabs", @@ -214142,7 +225649,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L888" }, "AppTest.text": { "name": "text", @@ -214157,7 +225664,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L908" }, "AppTest.text_area": { "name": "text_area", @@ -214172,7 +225679,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L922" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L922" }, "AppTest.text_input": { "name": "text_input", @@ -214187,7 +225694,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L936" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L936" }, "AppTest.time_input": { "name": "time_input", @@ -214202,7 +225709,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L950" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L950" }, "AppTest.title": { "name": "title", @@ -214217,7 +225724,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L964" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L964" }, "AppTest.toast": { "name": "toast", @@ -214232,7 +225739,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L978" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L978" }, "AppTest.toggle": { "name": "toggle", @@ -214247,7 +225754,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L992" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L992" }, "AppTest.warning": { "name": "warning", @@ -214262,7 +225769,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/app_test.py#L1006" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1006" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -214275,7 +225782,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L340" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L343" }, { "name": "run", @@ -214292,7 +225799,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214300,7 +225807,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L338" } ], "properties": [ @@ -214310,10 +225817,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L326" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L329" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L303", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L306", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -214338,7 +225845,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -214346,7 +225853,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L745" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L748" }, { "name": "set_value", @@ -214354,7 +225861,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L739" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L742" }, { "name": "unselect", @@ -214362,7 +225869,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L759" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L762" } ], "properties": [ @@ -214372,7 +225879,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L736" }, { "name": "indices", @@ -214380,7 +225887,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L728" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L731" }, { "name": "value", @@ -214388,10 +225895,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L719" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L722" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L693", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L696", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -214416,7 +225923,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214424,7 +225931,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L357" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L360" } ], "properties": [ @@ -214434,10 +225941,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L370" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L373" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L345", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L348", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -214453,7 +225960,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L416" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L419" }, { "name": "run", @@ -214470,7 +225977,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214478,7 +225985,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L411" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L414" }, { "name": "uncheck", @@ -214486,7 +225993,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L420" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L423" } ], "properties": [ @@ -214496,10 +226003,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L402" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L405" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L380", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L383", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -214515,7 +226022,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L490" }, { "name": "run", @@ -214532,7 +226039,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214540,7 +226047,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L482" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L485" } ], "properties": [ @@ -214550,10 +226057,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L462" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L465" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L447", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L450", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -214578,7 +226085,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214586,7 +226093,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L533" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L536" } ], "properties": [ @@ -214596,10 +226103,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L547" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L550" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L513", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L516", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -214624,7 +226131,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" } ], "properties": [ @@ -214634,10 +226141,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L107", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L107", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -214662,7 +226169,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -214670,7 +226177,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L835" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L838" }, { "name": "set_value", @@ -214678,7 +226185,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L829" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L832" }, { "name": "unselect", @@ -214686,7 +226193,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L849" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L852" } ], "properties": [ @@ -214696,7 +226203,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L823" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L826" }, { "name": "indices", @@ -214704,7 +226211,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L816" }, { "name": "value", @@ -214712,7 +226219,7 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L804" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L807" }, { "name": "values", @@ -214720,10 +226227,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L818" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L821" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L775", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L778", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -214739,7 +226246,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L920" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L923" }, { "name": "increment", @@ -214747,7 +226254,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L912" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L915" }, { "name": "run", @@ -214764,7 +226271,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214772,7 +226279,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L891" } ], "properties": [ @@ -214782,10 +226289,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L901" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L904" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L868", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L871", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -214810,7 +226317,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -214818,7 +226325,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L970" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L973" } ], "properties": [ @@ -214828,7 +226335,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L964" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L967" }, { "name": "index", @@ -214836,7 +226343,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L948" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L951" }, { "name": "value", @@ -214844,10 +226351,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L955" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L958" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L929", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L932", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -214872,7 +226379,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_range", @@ -214880,7 +226387,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1114" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1117" }, { "name": "set_value", @@ -214888,7 +226395,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1077" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1080" } ], "properties": [ @@ -214898,7 +226405,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1108" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1111" }, { "name": "value", @@ -214906,10 +226413,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1098" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1101" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1059", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1062", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -214934,7 +226441,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "select", @@ -214942,7 +226449,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1036" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1039" }, { "name": "select_index", @@ -214950,7 +226457,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1040" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1043" }, { "name": "set_value", @@ -214958,7 +226465,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1031" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1034" } ], "properties": [ @@ -214968,7 +226475,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1025" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1028" }, { "name": "index", @@ -214976,7 +226483,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1006" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1009" }, { "name": "value", @@ -214984,10 +226491,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1016" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1019" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L988", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L991", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -215012,7 +226519,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_range", @@ -215020,7 +226527,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1166" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1169" }, { "name": "set_value", @@ -215028,7 +226535,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1138" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1141" } ], "properties": [ @@ -215038,10 +226545,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1156" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1159" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1119", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1122", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -215057,7 +226564,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1246" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1249" }, { "name": "run", @@ -215074,7 +226581,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -215082,7 +226589,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1223" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1226" } ], "properties": [ @@ -215092,10 +226599,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1236" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1239" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1205", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1208", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -215111,7 +226618,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1298" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1301" }, { "name": "run", @@ -215128,7 +226635,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -215136,7 +226643,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1275" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1278" } ], "properties": [ @@ -215146,10 +226653,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1288" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1291" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1257", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1260", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -215165,7 +226672,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1361" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1364" }, { "name": "increment", @@ -215173,7 +226680,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1354" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1357" }, { "name": "run", @@ -215190,7 +226697,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -215198,7 +226705,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1328" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1331" } ], "properties": [ @@ -215208,10 +226715,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1344" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1347" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1312", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1315", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -215236,7 +226743,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -215244,7 +226751,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1417" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1420" } ], "properties": [ @@ -215254,10 +226761,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1408" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1411" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L1385", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1388", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -215282,7 +226789,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" }, { "name": "set_value", @@ -215290,7 +226797,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L197" } ], "properties": [ @@ -215300,10 +226807,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L136" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/testing/v1/element_tree.py#L182", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L182", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -215321,7 +226828,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L510" }, "context.cookies": { "name": "cookies", @@ -215330,7 +226837,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L205" }, "context.headers": { "name": "headers", @@ -215339,7 +226846,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L159" }, "context.ip_address": { "name": "ip_address", @@ -215348,7 +226855,7 @@ "description": "

The read-only IP address of the user's connection.

\n

This should not be used for security measures because it can easily be\nspoofed. When a user accesses the app through localhost, the IP\naddress is None. Otherwise, the IP address is determined from the\nremote_ip attribute of the Tornado request object and may be an\nIPv4 or IPv6 address.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L386" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L394" }, "context.is_embedded": { "name": "is_embedded", @@ -215357,7 +226864,7 @@ "description": "

Whether the app is embedded.

\n

This property returns a boolean value indicating whether the app is\nrunning in an embedded context. This is determined by the presence of\nembed=true as a query parameter in the URL. This is the only way to\ndetermine if the app is currently configured for embedding because\nembedding settings are not accessible through st.query_params or\nst.context.url.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L432" }, "context.locale": { "name": "locale", @@ -215366,13 +226873,13 @@ "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L327" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L335" }, "context.theme": { "name": "theme", "signature": "context.theme", "example": "

Access the theme type of the app:

\n
\nimport streamlit as st\n\nst.write(f"The current theme type is {st.context.theme.type}.")\n
\n", - "description": "

A read-only, dictionary-like object containing theme information.

\n

Theme information is restricted to the type of the theme (dark or\nlight) and is inferred from the background color of the app.

\n
\n

Note

\n

Changes made to the background color through CSS are not included.

\n
\n", + "description": "

A read-only, dictionary-like object containing theme information.

\n

Theme information is restricted to the type of the theme (dark or\nlight) and is inferred from the background color of the app.

\n
\n

Note

\n

Changes made to the background color through CSS are not included.\nAdditionally, the theme type may be incorrect during a change in\ntheme, like in the following situations:

\n
    \n
  • When the app is first loaded within a session
  • \n
  • When the user changes the theme in the settings menu
  • \n
\n

For more information and to upvote an improvement, see GitHub issue\n#11920.

\n
\n", "args": [ { "name": "type", @@ -215383,7 +226890,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L239" }, "context.timezone": { "name": "timezone", @@ -215392,7 +226899,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L279" }, "context.timezone_offset": { "name": "timezone_offset", @@ -215401,7 +226908,7 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L300" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L308" }, "context.url": { "name": "url", @@ -215410,7 +226917,7 @@ "description": "

The read-only URL of the app in the user's browser.

\n

st.context.url returns the URL through which the user is accessing\nthe app. This includes the scheme, domain name, port, and path. If\nquery parameters or anchors are present in the URL, they are removed\nand not included in this value.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L364" }, "CachedFunc.clear": { "name": "clear", @@ -215436,7 +226943,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/caching/cache_utils.py#L349" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_utils.py#L364" }, "StreamlitPage": { "name": "StreamlitPage", @@ -215449,7 +226956,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L272" } ], "properties": [ @@ -215459,7 +226966,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L249" }, { "name": "title", @@ -215467,7 +226974,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L238" }, { "name": "url_path", @@ -215475,10 +226982,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L257" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L128", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -215511,7 +227018,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L249" }, "StreamlitPage.run": { "name": "run", @@ -215519,7 +227026,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L272" }, "StreamlitPage.title": { "name": "title", @@ -215527,7 +227034,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L238" }, "StreamlitPage.url_path": { "name": "url_path", @@ -215535,7 +227042,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L257" }, "streamlit.user": { "name": "user", @@ -215555,11 +227062,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L510" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/user_info.py#L375", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L375", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.user is dependent on the host platform running your\nStreamlit app. If your host platform has not configured the object,\nst.user will behave as it does in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.user["email"] or st.user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -215586,7 +227093,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L205" }, { "name": "headers", @@ -215595,7 +227102,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L159" }, { "name": "ip_address", @@ -215604,7 +227111,7 @@ "description": "

The read-only IP address of the user's connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L386" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L394" }, { "name": "is_embedded", @@ -215613,7 +227120,7 @@ "description": "

Whether the app is embedded.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L432" }, { "name": "locale", @@ -215622,7 +227129,7 @@ "description": "

The read-only locale of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L327" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L335" }, { "name": "theme", @@ -215639,7 +227146,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L239" }, { "name": "timezone", @@ -215648,7 +227155,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L271" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L279" }, { "name": "timezone_offset", @@ -215657,7 +227164,7 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L300" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L308" }, { "name": "url", @@ -215666,10 +227173,10 @@ "description": "

The read-only URL of the app in the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L364" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/runtime/context.py#L148", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L148", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -215679,7 +227186,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L168", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -215699,7 +227206,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/plotly_chart.py#L80", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -215740,7 +227247,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/vega_charts.py#L108", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L108", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -215760,7 +227267,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L135", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -215779,7 +227286,7 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/arrow.py#L77", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L77", "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ @@ -215806,7 +227313,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -215825,7 +227332,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.46.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -215848,7 +227355,7 @@ "is_attribute_dict": true } }, - "1.47.0": { + "1.48.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -215904,12 +227411,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", "signature": "st.altair_chart(altair_chart, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None)", - "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nc = (\n   alt.Chart(chart_data)\n   .mark_circle()\n   .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(c)\n
\n", + "example": "
\nimport altair as alt\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((60, 3)), columns=["a", "b", "c"])\n\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.altair_chart(chart)\n
\n", "description": "

Display a chart using the Vega-Altair library.

\n

Vega-Altair is a declarative\nstatistical visualization library for Python, based on Vega and\nVega-Lite.

\n", "args": [ { @@ -215969,12 +227476,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1537" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1631" }, "streamlit.area_chart": { "name": "area_chart", "signature": "st.area_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, stack=None, width=None, height=None, use_container_width=True)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.area_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.area_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.area_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can adjust the stacking behavior by setting stack. Create a\nsteamgraph:

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.unemployment_across_industries()\n\nst.area_chart(source, x="date", y="count", color="series", stack="center")\n
\n", + "examples": "

Example 1: Basic area chart from a dataframe

\n

If you don't use any of the optional parameters, Streamlit plots each\ncolumn as a separate area, uses the index as the x values, and labels\neach series with the column name:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nst.area_chart(df)\n
\n

Example 2: Area chart from specific dataframe columns

\n

You can choose different columns to use for the x and y values. If your\ndataframe is in long format (all y-values in one column), you can set\nthe area colors from another column.

\n

If the column contains color strings, the colors will be applied\ndirectly and the series will be unlabeled. If the column contains other\nvalues, those values will label each area, and the area colors will be\nselected from the default color palette. You can configure this color\npalette in the theme.chartCategoryColors configuration option.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": rng(0).standard_normal(60),\n        "col3": ["a"] * 20 + ["b"] * 20 + ["c"] * 20,\n    }\n)\n\nst.area_chart(df, x="col1", y="col2", color="col3")\n
\n

Example 3: Area chart from wide-format dataframe

\n

If your dataframe is in wide format (y-values are in multiple columns),\nyou can pass a list of columns to the y parameter. Each column\nname becomes a series label. To override the default colors, pass a\nlist of colors to the color parameter, one for each series. If your\nareas are overlapping, use colors with some transparency (alpha\nchannel) for the best results.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": rng(0).standard_normal(20),\n        "col3": rng(1).standard_normal(20),\n    }\n)\n\nst.area_chart(\n    df,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF000080", "#0000FF80"],\n)\n
\n

Example 4: Area chart with different stacking

\n

You can adjust the stacking behavior by setting stack. You can\ncreate a streamgraph by setting stack="center":

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\ndf = data.unemployment_across_industries()\n\nst.area_chart(df, x="date", y="count", color="series", stack="center")\n
\n", "description": "

Display an area chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.area_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -216022,7 +227529,7 @@ "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The color to use for different series in this chart.

\n

For an area chart with just 1 series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "description": "

The color to use for different series in this chart.

\n

For an area chart with just 1 series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For an area chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n

You can set the default colors in the theme.chartCategoryColors\nconfiguration option.

\n", "default": "color" }, { @@ -216059,7 +227566,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L790" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L808" }, "streamlit.audio": { "name": "audio", @@ -216133,7 +227640,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/media.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/media.py#L73" }, "streamlit.audio_input": { "name": "audio_input", @@ -216175,10 +227682,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -216222,7 +227729,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/audio_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/audio_input.py#L88" }, "streamlit.badge": { "name": "badge", @@ -216264,7 +227771,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L355" }, "streamlit.balloons": { "name": "balloons", @@ -216273,12 +227780,12 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", "signature": "st.bar_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, horizontal=False, stack=None, width=None, height=None, use_container_width=True)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.bar_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": np.random.randn(60),\n        "col3": ["A"] * 20 + ["B"] * 20 + ["C"] * 20,\n    }\n)\n\nst.bar_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

If your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": np.random.randn(20),\n        "col3": np.random.randn(20),\n    }\n)\n\nst.bar_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n

You can rotate your bar charts to display horizontally.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n

You can unstack your bar charts.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="year", y="yield", color="site", stack=False)\n
\n", + "examples": "

Example 1: Basic bar chart from a dataframe

\n

If you don't use any of the optional parameters, Streamlit plots each\ncolumn as a series of bars, uses the index as the x values, and labels\neach series with the column name:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nst.bar_chart(df)\n
\n

Example 2: Bar chart from specific dataframe columns

\n

You can choose different columns to use for the x and y values. If your\ndataframe is in long format (all y-values in one column), you can set\nthe bar colors from another column.

\n

If the column contains color strings, the colors will be applied\ndirectly and the series will be unlabeled. If the column contains other\nvalues, those values will label each series, and the bar colors will be\nselected from the default color palette. You can configure this color\npalette in the theme.chartCategoryColors configuration option.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": rng(0).standard_normal(60),\n        "col3": ["a"] * 20 + ["b"] * 20 + ["c"] * 20,\n    }\n)\n\nst.bar_chart(df, x="col1", y="col2", color="col3")\n
\n

Example 3: Bar chart from wide-format dataframe

\n

If your dataframe is in wide format (y-values are in multiple columns),\nyou can pass a list of columns to the y parameter. Each column\nname becomes a series label. To override the default colors, pass a\nlist of colors to the color parameter, one for each series:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": list(range(20)),\n        "col2": rng(0).standard_normal(20),\n        "col3": rng(1).standard_normal(20),\n    }\n)\n\nst.bar_chart(\n    df,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],\n)\n
\n

Example 4: Horizontal bar chart

\n

You can use the horizontal parameter to display horizontal bars\ninstead of vertical bars. This is useful when you have long labels on\nthe x-axis, or when you want to display a large number of categories.\nThis example requires vega_datasets to be installed.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="variety", y="yield", color="site", horizontal=True)\n
\n

Example 5: Unstacked bar chart

\n

You can configure the stacking behavior of the bars by setting the\nstack parameter. Set it to False to display bars side by side.\nThis example requires vega_datasets to be installed.

\n
\nimport streamlit as st\nfrom vega_datasets import data\n\nsource = data.barley()\n\nst.bar_chart(source, x="year", y="yield", color="site", stack=False)\n
\n", "description": "

Display a bar chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.bar_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -216326,7 +227833,7 @@ "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The color to use for different series in this chart.

\n

For a bar chart with just one series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "description": "

The color to use for different series in this chart.

\n

For a bar chart with just one series, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto series of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three series whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into 3 series, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a bar chart with multiple series, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe series in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n

You can set the default colors in the theme.chartCategoryColors\nconfiguration option.

\n", "default": "color" }, { @@ -216371,7 +227878,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1078" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", @@ -216397,12 +227904,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/bokeh_chart.py#L36" }, "streamlit.button": { "name": "button", - "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", - "examples": "

Example 1: Customize your button type

\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n\nif st.button("Aloha", type="tertiary"):\n    st.write("Ciao")\n
\n

Example 2: Add icons to your button

\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", use_container_width=True):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", use_container_width=True):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", use_container_width=True):\n    right.markdown("You clicked the Material button.")\n
\n", + "signature": "st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", + "examples": "

Example 1: Customize your button type

\n
\nimport streamlit as st\n\nst.button("Reset", type="primary")\nif st.button("Say hello"):\n    st.write("Why hello there")\nelse:\n    st.write("Goodbye")\n\nif st.button("Aloha", type="tertiary"):\n    st.write("Ciao")\n
\n

Example 2: Add icons to your button

\n

Although you can add icons to your buttons through Markdown, the\nicon parameter is a convenient and consistent alternative.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3)\nif left.button("Plain button", width="stretch"):\n    left.markdown("You clicked the plain button.")\nif middle.button("Emoji button", icon="\ud83d\ude03", width="stretch"):\n    middle.markdown("You clicked the emoji button.")\nif right.button("Material button", icon=":material/mood:", width="stretch"):\n    right.markdown("You clicked the Material button.")\n
\n", "description": "

Display a button widget.

\n", "args": [ { @@ -216439,10 +227946,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -216458,7 +227965,7 @@ "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtlety.
  • \n
\n", "default": null }, { @@ -216483,6 +227990,18 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n", "default": null } ], @@ -216494,7 +228013,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L90" }, "streamlit.cache": { "name": "cache", @@ -216568,13 +228087,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, show_time=False, persist, experimental_allow_widgets, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n", - "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache global resources, use st.cache_resource instead. Learn more\nabout caching at https://docs.streamlit.io/develop/concepts/architecture/caching.

\n", + "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

Cached values are available to all users of your app. If you need to\nsave results that should only be accessible within a session, use\nSession State\ninstead. Within each user session, an @st.cache_data-decorated\nfunction returns a copy of the cached return value (if the value is\nalready cached). To cache shared global resources (singletons), use\nst.cache_resource instead. To learn more about caching, see\nCaching overview.

\n
\n

Note

\n

Caching async functions is not supported. To upvote this feature,\nsee GitHub issue #8308.

\n
\n", "args": [ { "name": "func", @@ -216646,13 +228165,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_data_api.py#L388" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_data_api.py#L388" }, "streamlit.cache_resource": { "name": "cache_resource", "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, show_time=False, validate, experimental_allow_widgets, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n", - "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

To cache data, use st.cache_data instead. Learn more about caching at\nhttps://docs.streamlit.io/develop/concepts/architecture/caching.

\n", + "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

Cached values are available to all users of your app. If you need to\nsave results that should only be accessible within a session, use\nSession State\ninstead. Within each user session, an @st.cache_resource-decorated\nfunction returns the cached instance of the return value (if the value\nis already cached). Therefore, objects cached by st.cache_resource\nact like singletons and can mutate. To cache data and return copies,\nuse st.cache_data instead. To learn more about caching, see\nCaching overview.

\n
\n

Warning

\n

Async objects are not officially supported in Streamlit. Caching\nasync objects or objects that reference async objects may have\nunintended consequences. For example, Streamlit may close event\nloops in its normal operation and make the cached object raise an\nEvent loop closed error.

\n

To upvote official asyncio support, see GitHub issue #8488. To upvote\nsupport for caching async functions, see GitHub issue #8308.

\n
\n", "args": [ { "name": "func", @@ -216724,7 +228243,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_resource_api.py#L262" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" }, "streamlit.camera_input": { "name": "camera_input", @@ -216766,10 +228285,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -216813,7 +228332,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/camera_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/camera_input.py#L88" }, "streamlit.caption": { "name": "caption", @@ -216855,7 +228374,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L168" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L168" }, "streamlit.chat_input": { "name": "chat_input", @@ -216900,7 +228419,7 @@ "type_name": "str, Sequence[str], or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n", + "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n
\n

Note

\n

This is a best-effort check, but doesn't provide a\nsecurity guarantee against users uploading files of other types\nor type extensions. The correct handling of uploaded files is\npart of the app developer's responsibility.

\n
\n", "default": null }, { @@ -216921,10 +228440,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -216952,7 +228471,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/chat.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/chat.py#L403" }, "streamlit.chat_message": { "name": "chat_message", @@ -216993,7 +228512,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/chat.py#L227" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/chat.py#L227" }, "streamlit.checkbox": { "name": "checkbox", @@ -217043,10 +228562,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -217090,7 +228609,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/checkbox.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/checkbox.py#L64" }, "streamlit.code": { "name": "code", @@ -217148,7 +228667,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/code.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/code.py#L36" }, "streamlit.color_picker": { "name": "color_picker", @@ -217198,10 +228717,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -217245,12 +228764,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/color_picker.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/color_picker.py#L66" }, "streamlit.columns": { "name": "columns", - "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\", border=False)", - "examples": "

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ncol1, col2 = st.columns([3, 1])\ndata = np.random.randn(10, 1)\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(data)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(data)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\nimport numpy as np\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n", + "signature": "st.columns(spec, *, gap=\"small\", vertical_alignment=\"top\", border=False, width=\"stretch\")", + "examples": "

Example 1: Use context management

\n

You can use the with statement to insert any element into a column:

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\n\nwith col1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg")\n\nwith col2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg")\n\nwith col3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 2: Use commands as container methods

\n

You can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = rng(0).standard_normal((10, 1))\ncol1, col2 = st.columns([3, 1])\n\ncol1.subheader("A wide column with a chart")\ncol1.line_chart(df)\n\ncol2.subheader("A narrow column with the data")\ncol2.write(df)\n
\n

Example 3: Align widgets

\n

Use vertical_alignment="bottom" to align widgets.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, vertical_alignment="bottom")\n\nleft.text_input("Write something")\nmiddle.button("Click me", use_container_width=True)\nright.checkbox("Check me")\n
\n

Example 4: Use vertical alignment to create grids

\n

Adjust vertical alignment to customize your grid layouts.

\n
\nimport streamlit as st\n\nvertical_alignment = st.selectbox(\n    "Vertical alignment", ["top", "center", "bottom"], index=2\n)\n\nleft, middle, right = st.columns(3, vertical_alignment=vertical_alignment)\nleft.image("https://static.streamlit.io/examples/cat.jpg")\nmiddle.image("https://static.streamlit.io/examples/dog.jpg")\nright.image("https://static.streamlit.io/examples/owl.jpg")\n
\n

Example 5: Add borders

\n

Add borders to your columns instead of nested containers for consistent\nheights.

\n
\nimport streamlit as st\n\nleft, middle, right = st.columns(3, border=True)\n\nleft.markdown("Lorem ipsum " * 10)\nmiddle.markdown("Lorem ipsum " * 5)\nright.markdown("Lorem ipsum ")\n
\n", "description": "

Insert containers laid out as side-by-side columns.

\n

Inserts a number of multi-element containers laid out side-by-side and\nreturns a list of container objects.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Note

\n

To follow best design practices and maintain a good appearance on\nall screen sizes, don't nest columns more than once.

\n
\n", "args": [ { @@ -217284,6 +228803,14 @@ "is_kwarg_only": true, "description": "

Whether to show a border around the column containers. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown around each column.

\n", "default": null + }, + { + "name": "width", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The desired width of the columns expressed in pixels. If this is\n"stretch" (default), Streamlit sets the width of the columns to\nmatch the width of the parent container. Otherwise, this must be an\ninteger. If the specified width is greater than the width of the\nparent container, Streamlit sets the width of the columns to match\nthe width of the parent container.

\n", + "default": null } ], "returns": [ @@ -217294,7 +228821,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L191" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L331" }, "streamlit.connection": { "name": "connection", @@ -217351,22 +228878,14 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/connection_factory.py#L206" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/connection_factory.py#L206" }, "streamlit.container": { "name": "container", - "signature": "st.container(*, height=None, border=None, key=None)", - "examples": "

Inserting elements using with notation:

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Inserting elements out of order:

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\n# Now insert some more in the container\ncontainer.write("This is inside too")\n
\n

Using height to make a grid:

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Using height to create a scrolling container for long content:

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n", - "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n", + "signature": "st.container(*, border=None, key=None, width=\"stretch\", height=\"content\", horizontal=False, horizontal_alignment=\"left\", vertical_alignment=\"top\", gap=\"small\")", + "examples": "

Example 1: Inserting elements using ``with`` notation

\n

You can use the with statement to insert any element into a\ncontainer.

\n
\nimport streamlit as st\n\nwith st.container():\n    st.write("This is inside the container")\n\n    # You can call any Streamlit command, including custom components:\n    st.bar_chart(np.random.randn(50, 3))\n\nst.write("This is outside the container")\n
\n

Example 2: Inserting elements out of order

\n

When you create a container, its position in the app remains fixed and\nyou can add elements to it at any time. This allows you to insert\nelements out of order in your app. You can also write to the container\nby calling commands directly on the container object.

\n
\nimport streamlit as st\n\ncontainer = st.container(border=True)\ncontainer.write("This is inside the container")\nst.write("This is outside the container")\n\ncontainer.write("This is inside too")\n
\n

Example 3: Grid layout with columns and containers

\n

You can create a grid with a fixed number of elements per row by using\ncolumns and containers.

\n
\nimport streamlit as st\n\nrow1 = st.columns(3)\nrow2 = st.columns(3)\n\nfor col in row1 + row2:\n    tile = col.container(height=120)\n    tile.title(":balloon:")\n
\n

Example 4: Vertically scrolling container

\n

You can create a vertically scrolling container by setting a fixed\nheight.

\n
\nimport streamlit as st\n\nlong_text = "Lorem ipsum. " * 1000\n\nwith st.container(height=300):\n    st.markdown(long_text)\n
\n

Example 5: Horizontal container

\n

You can create a row of widgets using a horizontal container. Use\nhorizontal_alignment to specify the alignment of the elements.

\n
\nimport streamlit as st\n\nflex = st.container(horizontal=True, horizontal_alignment="right")\n\nfor card in range(3):\n    flex.button(f"Button {card + 1}")\n
\n", + "description": "

Insert a multi-element container.

\n

Inserts an invisible container into your app that can be used to hold\nmultiple elements. This allows you to, for example, insert multiple\nelements into your app out of order.

\n

To add elements to the returned container, you can use the with\nnotation (preferred) or just call commands directly on the returned\nobject. See examples below.

\n", "args": [ - { - "name": "height", - "type_name": "int or None", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Desired height of the container expressed in pixels. If None (default)\nthe container grows to fit its content. If a fixed height, scrolling is\nenabled for large content and a grey border is shown around the container\nto visually separate its scroll surface from the rest of the app.

\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", - "default": null - }, { "name": "border", "type_name": "bool or None", @@ -217382,15 +228901,63 @@ "is_kwarg_only": true, "description": "

An optional string to give this container a stable identity.

\n

Additionally, if key is provided, it will be used as CSS\nclass name prefixed with st-key-.

\n", "default": null + }, + { + "name": "width", + "type_name": "\"stretch\" or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the container. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the container matches the\nwidth of the parent container.
  • \n
  • An integer specifying the width in pixels: The container has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the container matches the width\nof the parent container.
  • \n
\n", + "default": null + }, + { + "name": "height", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The height of the container. This can be one of the following:

\n
    \n
  • "content" (default): The height of the container matches the\nheight of its content.
  • \n
  • "stretch": The height of the container matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the container is not in a parent container, the height\nof the container matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The container has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n
\n

Note

\n

Use scrolling containers sparingly. If you use scrolling\ncontainers, avoid heights that exceed 500 pixels. Otherwise,\nthe scroll surface of the container might cover the majority of\nthe screen on mobile devices, which makes it hard to scroll the\nrest of the app.

\n
\n", + "default": null + }, + { + "name": "horizontal", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether to use horizontal flexbox layout. If this is False\n(default), the container's elements are laid out vertically. If\nthis is True, the container's elements are laid out\nhorizontally and will overflow to the next line if they don't fit\nwithin the container's width.

\n", + "default": null + }, + { + "name": "horizontal_alignment", + "type_name": "\"left\", \"center\", \"right\", or \"distribute\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The horizontal alignment of the elements inside the container. This\ncan be one of the following:

\n
    \n
  • "left" (default): Elements are aligned to the left side of\nthe container.

    \n
  • \n
  • "center": Elements are horizontally centered inside the\ncontainer.

    \n
  • \n
  • "right": Elements are aligned to the right side of the\ncontainer.

    \n
  • \n
  • "distribute": Elements are distributed evenly in the\ncontainer. This increases the horizontal gap between elements to\nfill the width of the container. A standalone element is aligned\nto the left.

    \n

    When horizontal is False, "distribute" aligns the\nelements the same as "left".

    \n
  • \n
\n", + "default": null + }, + { + "name": "vertical_alignment", + "type_name": "\"top\", \"center\", \"bottom\", or \"distribute\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The vertical alignment of the elements inside the container. This\ncan be one of the following:

\n
    \n
  • "top" (default): Elements are aligned to the top of the\ncontainer.

    \n
  • \n
  • "center": Elements are vertically centered inside the\ncontainer.

    \n
  • \n
  • "bottom": Elements are aligned to the bottom of the\ncontainer.

    \n
  • \n
  • "distribute": Elements are distributed evenly in the\ncontainer. This increases the vertical gap between elements to\nfill the height of the container. A standalone element is aligned\nto the top.

    \n

    When horizontal is True, "distribute" aligns the\nelements the same as "top".

    \n
  • \n
\n", + "default": null + }, + { + "name": "gap", + "type_name": "\"small\", \"medium\", \"large\", or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The minimum gap size between the elements inside the container.\nThis can be one of the following:

\n
    \n
  • "small" (default): 1rem gap between the elements.
  • \n
  • "medium": 2rem gap between the elements.
  • \n
  • "large": 4rem gap between the elements.
  • \n
  • None: No gap between the elements.
  • \n
\n

The rem unit is relative to the theme.baseFontSize\nconfiguration option.

\n

The minimum gap applies to both the vertical and horizontal gaps\nbetween the elements. Elements may have larger gaps in one\ndirection if you use a distributed horizontal alignment or fixed\nheight.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L50" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L61" }, "streamlit.data_editor": { "name": "data_editor", "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=None, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None, row_height=None)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

You can also allow the user to add and delete rows by setting num_rows to "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n       {"command": "st.selectbox", "rating": 4, "is_widget": True},\n       {"command": "st.balloons", "rating": 5, "is_widget": False},\n       {"command": "st.time_input", "rating": 3, "is_widget": True},\n   ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Or you can customize the data editor via column_config, hide_index,\ncolumn_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n", + "examples": "

Example 1: Basic usage

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Example 2: Allowing users to add and delete rows

\n

You can allow your users to add and delete rows by setting num_rows\nto "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Example 3: Data editor configuration

\n

You can customize the data editor via column_config, hide_index,\ncolumn_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n", "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n", "args": [ { @@ -217483,10 +229050,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -217514,12 +229081,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/data_editor.py#L618" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/data_editor.py#L618" }, "streamlit.dataframe": { "name": "dataframe", "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=None, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\", row_height=None)", - "examples": "

Example 1: Display a dataframe

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(50, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df)  # Same as st.write(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(np.random.randn(10, 20), columns=("col %d" % i for i in range(20)))\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport random\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],\n        "stars": [random.randint(0, 1000) for _ in range(3)],\n        "views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],\n    }\n)\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nimport streamlit as st\nimport pandas as pd\nfrom datetime import date\n\ndf = pd.DataFrame(\n    {\n        "Date": [date(2024, 1, 1), date(2024, 2, 1), date(2024, 3, 1)],\n        "Total": [13429, 23564, 23452],\n    }\n)\ndf.set_index("Date", inplace=True)\n\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n", + "examples": "

Example 1: Display a dataframe

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((50, 20)), columns=("col %d" % i for i in range(20))\n)\n\nst.dataframe(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((10, 20)), columns=("col %d" % i for i in range(20))\n)\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n        ],\n        "stars": rng(0).integers(0, 1000, size=3),\n        "views_history": rng(0).integers(0, 5000, size=(3, 30)).tolist(),\n    }\n)\n\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nfrom datetime import datetime, date\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n@st.cache_data\ndef load_data():\n    year = datetime.now().year\n    df = pd.DataFrame(\n        {\n            "Date": [date(year, month, 1) for month in range(1, 4)],\n            "Total": np.random.randint(1000, 5000, size=3),\n        }\n    )\n    df.set_index("Date", inplace=True)\n    return df\n\ndf = load_data()\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n", "description": "

Display a dataframe as an interactive table.

\n

This command works with a wide variety of collection-like and\ndataframe-like object types.

\n", "args": [ { @@ -217619,7 +229186,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L260" }, "streamlit.date_input": { "name": "date_input", @@ -217685,10 +229252,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -217740,13 +229307,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/time_widgets.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/time_widgets.py#L653" }, "streamlit.dialog": { "name": "dialog", - "signature": "st.dialog(title, *, width=\"small\")", + "signature": "st.dialog(title, *, width=\"small\", dismissible=True, on_dismiss=\"ignore\")", "examples": "

The following example demonstrates the basic usage of @st.dialog.\nIn this app, clicking "A" or "B" will open a modal dialog and prompt you\nto enter a reason for your vote. In the modal dialog, click "Submit" to record\nyour vote into Session State and rerun the app. This will close the modal dialog\nsince the dialog function is not called during the full-script rerun.

\n
\nimport streamlit as st\n\n@st.dialog("Cast your vote")\ndef vote(item):\n    st.write(f"Why is {item} your favorite?")\n    reason = st.text_input("Because...")\n    if st.button("Submit"):\n        st.session_state.vote = {"item": item, "reason": reason}\n        st.rerun()\n\nif "vote" not in st.session_state:\n    st.write("Vote for your favorite")\n    if st.button("A"):\n        vote("A")\n    if st.button("B"):\n        vote("B")\nelse:\n    f"You voted for {st.session_state.vote['item']} because {st.session_state.vote['reason']}"\n
\n", - "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

A user can dismiss a modal dialog by clicking outside of it, clicking the\n"X" in its upper-right corner, or pressing ESC on their keyboard.\nDismissing a modal dialog does not trigger an app rerun. To close the modal\ndialog programmatically, call st.rerun() explicitly inside of the\ndialog function.

\n

st.dialog inherits behavior from st.fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time.

\n
\n", + "description": "

Function decorator to create a modal dialog.

\n

A function decorated with @st.dialog becomes a dialog\nfunction. When you call a dialog function, Streamlit inserts a modal dialog\ninto your app. Streamlit element commands called within the dialog function\nrender inside the modal dialog.

\n

The dialog function can accept arguments that can be passed when it is\ncalled. Any values from the dialog that need to be accessed from the wider\napp should generally be stored in Session State.

\n

If a dialog is dismissible, a user can dismiss it by clicking outside of\nit, clicking the "X" in its upper-right corner, or pressing ESC on\ntheir keyboard. You can configure whether this triggers a rerun of the app\nby setting the on_dismiss parameter.

\n

If a dialog is not dismissible, it must be closed programmatically by\ncalling st.rerun() inside the dialog function. This is useful when you\nwant to ensure that the dialog is always closed programmatically, such as\nwhen the dialog contains a form that must be submitted before closing.

\n

st.dialog inherits behavior from st.fragment.\nWhen a user interacts with an input widget created inside a dialog function,\nStreamlit only reruns the dialog function instead of the full script.

\n

Calling st.sidebar in a dialog function is not supported.

\n

Dialog code can interact with Session State, imported modules, and other\nStreamlit elements created outside the dialog. Note that these interactions\nare additive across multiple dialog reruns. You are responsible for\nhandling any side effects of that behavior.

\n
\n

Warning

\n

Only one dialog function may be called in a script run, which means\nthat only one dialog can be open at any given time.

\n
\n", "args": [ { "name": "title", @@ -217763,10 +229330,26 @@ "is_kwarg_only": true, "description": "

The width of the modal dialog. If width is "small (default), the\nmodal dialog will be 500 pixels wide. If width is "large", the\nmodal dialog will be about 750 pixels wide.

\n", "default": null + }, + { + "name": "dismissible", + "type_name": "bool", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether the modal dialog can be dismissed by the user. If this is\nTrue (default), the user can dismiss the dialog by clicking\noutside of it, clicking the "X" in its upper-right corner, or\npressing ESC on their keyboard. If this is False, the "X"\nin the upper-right corner is hidden and the dialog must be closed\nprogrammatically by calling st.rerun() inside the dialog function.

\n
\n

Note

\n

Setting dismissible to False does not guarantee that all\ninteractions in the main app are blocked. Don't rely on\ndismissible for security-critical checks.

\n
\n", + "default": null + }, + { + "name": "on_dismiss", + "type_name": "\"ignore\", \"rerun\", or callable", + "is_optional": false, + "is_kwarg_only": true, + "description": "

How the dialog should respond to dismissal events.\nThis can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not rerun the app when the\nuser dismisses the dialog.
  • \n
  • "rerun": Streamlit will rerun the app when the user dismisses\nthe dialog.
  • \n
  • A callable: Streamlit will rerun the app when the user dismisses\nthe dialog and execute the callable as a callback function\nbefore the rest of the app.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/dialog_decorator.py#L133" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/dialog_decorator.py#L147" }, "streamlit.divider": { "name": "divider", @@ -217784,11 +229367,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L318" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L318" }, "streamlit.download_button": { "name": "download_button", - "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=\"rerun\", args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "signature": "st.download_button(label, data, file_name=None, mime=None, key=None, help=None, on_click=\"rerun\", args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", "examples": "

Example 1: Download a dataframe as a CSV file

\n

When working with a large dataframe, it's recommended to fetch your\ndata with a cached function. When working with a download button, it's\nsimilarly recommended to convert your data into a downloadable format\nwith a cached function. Caching ensures that the app reruns\nefficiently.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\n@st.cache_data\ndef get_data():\n    df = pd.DataFrame(\n        np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n    )\n    return df\n\n@st.cache_data\ndef convert_for_download(df):\n    return df.to_csv().encode("utf-8")\n\ndf = get_data()\ncsv = convert_for_download(df)\n\nst.download_button(\n    label="Download CSV",\n    data=csv,\n    file_name="data.csv",\n    mime="text/csv",\n    icon=":material/download:",\n)\n
\n

Example 2: Download a string as a text file

\n

If you pass a string to the data argument, Streamlit will\nautomatically use the "text/plain" MIME type.

\n

When you have a widget (like a text area) affecting the value of your\ndownload, it's recommended to use another button to prepare the\ndownload. In this case, use on_click="ignore" in your download\nbutton to prevent the download button from rerunning your app. This\nturns the download button into a frontend-only element that can be\nnested in another button.

\n

Without a preparation button, a user can type something into the text\narea and immediately click the download button. Because a download is\ninitiated concurrently with the app rerun, this can create a race-like\ncondition where the user doesn't see the updated data in their\ndownload.

\n
\n

Important

\n

Even when you prevent your download button from triggering a rerun,\nanother widget with a pending change can still trigger a rerun. For\nexample, if a text area has a pending change when a user clicks a\ndownload button, the text area will trigger a rerun.

\n
\n
\nimport streamlit as st\n\nmessage = st.text_area("Message", value="Lorem ipsum.\\nStreamlit is cool.")\n\nif st.button("Prepare download"):\n    st.download_button(\n        label="Download text",\n        data=message,\n        file_name="message.txt",\n        on_click="ignore",\n        type="primary",\n        icon=":material/download:",\n    )\n
\n

Example 3: Download a file

\n

Use a context manager to open and read a local file on your Streamlit\nserver. Pass the io.BufferedReader object directly to data.\nRemember to specify the MIME type if you don't want the default\ntype of "application/octet-stream" for generic binary data. In the\nexample below, the MIME type is set to "image/png" for a PNG file.

\n
\nimport streamlit as st\n\nwith open("flower.png", "rb") as file:\n    st.download_button(\n        label="Download image",\n        data=file,\n        file_name="flower.png",\n        mime="image/png",\n    )\n
\n", "description": "

Display a download button widget.

\n

This is useful when you would like to provide a way for your users\nto download a file directly from your app.

\n

Note that the data to be downloaded is stored in-memory while the\nuser is connected, so it's a good idea to keep file sizes under a\ncouple hundred megabytes to conserve memory.

\n

If you want to prevent your app from rerunning when a user clicks the\ndownload button, wrap the download button in a fragment.

\n", "args": [ @@ -217850,10 +229433,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -217869,7 +229452,7 @@ "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtlety.
  • \n
\n", "default": null }, { @@ -217894,6 +229477,18 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the download button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n", "default": null } ], @@ -217905,7 +229500,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L258" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L283" }, "streamlit.echo": { "name": "echo", @@ -217923,7 +229518,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -217932,7 +229527,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -217966,7 +229561,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L32" }, "streamlit.exception": { "name": "exception", @@ -217992,7 +229587,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -218034,7 +229629,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L545" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L681" }, "streamlit.experimental_dialog": { "name": "experimental_dialog", @@ -218042,7 +229637,7 @@ "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/dialog_decorator.py#L259" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/dialog_decorator.py#L315" }, "streamlit.experimental_fragment": { "name": "experimental_fragment", @@ -218050,7 +229645,7 @@ "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/fragment.py#L471" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/fragment.py#L472" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -218066,7 +229661,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -218084,7 +229679,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -218126,10 +229721,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -218157,7 +229752,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L298" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L297" }, "streamlit.file_uploader": { "name": "file_uploader", @@ -218178,7 +229773,7 @@ "type_name": "str or list of str or None", "is_optional": false, "is_kwarg_only": false, - "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n", + "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n
\n

Note

\n

This is a best-effort check, but doesn't provide a\nsecurity guarantee against users uploading files of other types\nor type extensions. The correct handling of uploaded files is\npart of the app developer's responsibility.

\n
\n", "default": null }, { @@ -218215,10 +229810,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -218262,7 +229857,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/file_uploader.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/file_uploader.py#L240" }, "streamlit.form": { "name": "form", @@ -218320,11 +229915,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/form.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/form.py#L70" }, "streamlit.form_submit_button": { "name": "form_submit_button", - "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", "description": "

Display a form submit button.

\n

When this button is clicked, all widget values inside the form will be\nsent from the user's browser to your Streamlit server in a batch.

\n

Every form must have at least one st.form_submit_button. An\nst.form_submit_button cannot exist outside of a form.

\n

For more information about forms, check out our docs.

\n", "args": [ { @@ -218353,10 +229948,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -218372,7 +229967,7 @@ "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtlety.
  • \n
\n", "default": null }, { @@ -218397,6 +229992,18 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n", "default": null } ], @@ -218408,7 +230015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/form.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/form.py#L237" }, "streamlit.fragment": { "name": "fragment", @@ -218434,7 +230041,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/fragment.py#L306" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/fragment.py#L307" }, "streamlit.get_option": { "name": "get_option", @@ -218452,13 +230059,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/config.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/config.py#L177" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", "example": "
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge("run", "intr")\ngraph.edge("intr", "runbl")\ngraph.edge("runbl", "run")\ngraph.edge("run", "kernel")\ngraph.edge("kernel", "zombie")\ngraph.edge("kernel", "sleep")\ngraph.edge("kernel", "runmem")\ngraph.edge("sleep", "swap")\ngraph.edge("swap", "runswap")\ngraph.edge("runswap", "new")\ngraph.edge("runswap", "runmem")\ngraph.edge("new", "runmem")\ngraph.edge("sleep", "runmem")\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n", - "description": "

Display a graph using the dagre-d3 library.

\n", + "description": "

Display a graph using the dagre-d3 library.

\n
\n

Important

\n

You must install graphviz>=0.19.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "figure_or_dot", @@ -218478,7 +230085,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/graphviz_chart.py#L40" }, "streamlit.header": { "name": "header", @@ -218528,11 +230135,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L45" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L45" }, "streamlit.help": { "name": "help", - "signature": "st.help(obj=, *, width=\"stretch\")", + "signature": "st.help(obj=, *, width=\"stretch\")", "example": "

Don't remember how to initialize a dataframe? Try this:

\n
\nimport streamlit as st\nimport pandas\n\nst.help(pandas.DataFrame)\n
\n

Want to quickly check what data type is output by a certain function?\nTry:

\n
\nimport streamlit as st\n\nx = my_poorly_documented_function()\nst.help(x)\n
\n

Want to quickly inspect an object? No sweat:

\n
\nclass Dog:\n  '''A typical dog.'''\n\n  def __init__(self, breed, color):\n    self.breed = breed\n    self.color = color\n\n  def bark(self):\n    return 'Woof!'\n\n\nfido = Dog("poodle", "white")\n\nst.help(fido)\n
\n

And if you're using Magic, you can get help for functions, classes,\nand modules without even typing st.help:

\n
\nimport streamlit as st\nimport pandas\n\n# Get help for Pandas read_csv:\npandas.read_csv\n\n# Get help for Streamlit itself:\nst\n
\n", "description": "

Display help and other information for a given object.

\n

Depending on the type of object that is passed in, this displays the\nobject's name, type, value, signature, docstring, and member variables,\nmethods \u2014 as well as the values/docstring of members and methods.

\n", "args": [ @@ -218554,7 +230161,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/doc_string.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/doc_string.py#L47" }, "streamlit.html": { "name": "html", @@ -218580,7 +230187,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/html.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/html.py#L39" }, "streamlit.image": { "name": "image", @@ -218658,7 +230265,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/image.py#L47" }, "streamlit.info": { "name": "info", @@ -218692,7 +230299,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L177" }, "streamlit.json": { "name": "json", @@ -218726,7 +230333,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/json.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/json.py#L48" }, "streamlit.latex": { "name": "latex", @@ -218760,12 +230367,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L248" }, "streamlit.line_chart": { "name": "line_chart", "signature": "st.line_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, width=None, height=None, use_container_width=True)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.line_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    {\n        "col1": np.random.randn(20),\n        "col2": np.random.randn(20),\n        "col3": np.random.choice(["A", "B", "C"], 20),\n    }\n)\n\nst.line_chart(chart_data, x="col1", y="col2", color="col3")\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple lines with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\n\nst.line_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n", + "examples": "

Example 1: Basic line chart from a dataframe

\n

If you don't use any of the optional parameters, Streamlit plots each\ncolumn as a separate line, uses the index as the x values, and labels\neach series with the column name:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nst.line_chart(df)\n
\n

Example 2: Line chart from specific dataframe columns

\n

You can choose different columns to use for the x and y values. If your\ndataframe is in long format (all y-values in one column), you can set\nthe line colors from another column.

\n

If the column contains color strings, the colors will be applied\ndirectly and the series will be unlabeled. If the column contains other\nvalues, those values will label each line, and the line colors will be\nselected from the default color palette. You can configure this color\npalette in the theme.chartCategoryColors configuration option.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": list(range(20)) * 3,\n        "col2": rng(0).standard_normal(60),\n        "col3": ["a"] * 20 + ["b"] * 20 + ["c"] * 20,\n    }\n)\n\nst.line_chart(df, x="col1", y="col2", color="col3")\n
\n

Example 3: Line chart from wide-format dataframe

\n

If your dataframe is in wide format (y-values are in multiple columns),\nyou can pass a list of columns to the y parameter. Each column\nname becomes a series label. To override the default colors, pass a\nlist of colors to the color parameter, one for each series:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nst.line_chart(\n    df,\n    x="a",\n    y=["b", "c"],\n    color=["#FF0000", "#0000FF"],\n)\n
\n", "description": "

Display a line chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.line_chart does not guess the data specification\ncorrectly, try specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -218813,7 +230420,7 @@ "type_name": "str, tuple, Sequence of str, Sequence of tuple, or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The color to use for different lines in this chart.

\n

For a line chart with just one line, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto lines of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three lines whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into three lines, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe lines in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n", + "description": "

The color to use for different lines in this chart.

\n

For a line chart with just one line, this can be:

\n
    \n
  • None, to use the default color.
  • \n
  • A hex string like "#ffaa00" or "#ffaa0088".
  • \n
  • An RGB or RGBA tuple with the red, green, blue, and alpha\ncomponents specified as ints from 0 to 255 or floats from 0.0 to\n1.0.
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nlong format (that is, y is None or just one column), this can be:

\n
    \n
  • None, to use the default colors.

    \n
  • \n
  • The name of a column in the dataset. Data points will be grouped\ninto lines of the same color based on the value of this column.\nIn addition, if the values in this column match one of the color\nformats above (hex string or color tuple), then that color will\nbe used.

    \n

    For example: if the dataset has 1000 rows, but this column only\ncontains the values "adult", "child", and "baby", then those 1000\ndatapoints will be grouped into three lines whose colors will be\nautomatically selected from the default palette.

    \n

    But, if for the same 1000-row dataset, this column contained\nthe values "#ffaa00", "#f0f", "#0000ff", then then those 1000\ndatapoints would still be grouped into three lines, but their\ncolors would be "#ffaa00", "#f0f", "#0000ff" this time around.

    \n
  • \n
\n

For a line chart with multiple lines, where the dataframe is in\nwide format (that is, y is a Sequence of columns), this can be:

\n
    \n
  • None, to use the default colors.
  • \n
  • A list of string colors or color tuples to be used for each of\nthe lines in the chart. This list should have the same length\nas the number of y values (e.g. color=["#fd0", "#f0f", "#04f"]\nfor three lines).
  • \n
\n

You can set the default colors in the theme.chartCategoryColors\nconfiguration option.

\n", "default": "color" }, { @@ -218842,11 +230449,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L593" }, "streamlit.link_button": { "name": "link_button", - "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", icon=None, disabled=False, use_container_width=False)", + "signature": "st.link_button(label, url, *, help=None, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", "example": "
\nimport streamlit as st\n\nst.link_button("Go to gallery", "https://streamlit.io/gallery")\n
\n", "description": "

Display a link button element.

\n

When clicked, a new tab will be opened to the specified URL. This will\ncreate a new session for the user if directed within the app.

\n", "args": [ @@ -218879,7 +230486,7 @@ "type_name": "\"primary\", \"secondary\", or \"tertiary\"", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtly.
  • \n
\n", + "description": "

An optional string that specifies the button type. This can be one\nof the following:

\n
    \n
  • "primary": The button's background is the app's primary color\nfor additional emphasis.
  • \n
  • "secondary" (default): The button's background coordinates\nwith the app's background color for normal emphasis.
  • \n
  • "tertiary": The button is plain text without a border or\nbackground for subtlety.
  • \n
\n", "default": null }, { @@ -218904,17 +230511,29 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the link button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L545" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L593" }, "streamlit.login": { "name": "login", "signature": "st.login(provider=None)", - "examples": "

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"  # fmt: skip\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\nif st.button("Log in"):\n    st.login("auth0")\nif st.user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!)\n
\n", - "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command.
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.
  • \n
  • For security reasons, authentication is not supported for embedded\napps.
  • \n
\n
\n", + "examples": "

Example 1: Use an unnamed default identity provider

\n

If you do not specify a name for your provider, specify all settings within\nthe [auth] dictionary of your secrets.toml file. The following\nexample configures Google as the default provider. For information about\nusing OIDC with Google, see Google Identity.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 2: Use a named identity provider

\n

If you specify a name for your provider, save the shared settings in the\n[auth] dictionary of your secrets.toml file, and save the other\nsettings in an [auth.{provider}] dictionary, where {provider} is\nthe name of your provider. The following example configures Microsoft as\nthe provider. The example uses provider="microsoft", but you can use\nany name. This name is internal to Streamlit and is used to match the login\ncommand to its configuration. For information about using OIDC with\nMicrosoft, see Microsoft Entra ID.\nTo configure your {tenant} value in server_metadata_url, see\nMicrosoft identity platform.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.login("microsoft")\nelse:\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 3: Use multiple, named providers

\n

If you want to give your users a choice of authentication methods,\nconfigure multiple providers and give them each a unique name. The\nfollowing example lets users choose between Okta and Microsoft to log in.\nAlways check with your identity provider to understand the structure of\ntheir identity tokens because the returned fields may differ. Remember to\nset {tenant} and {subdomain} in server_metadata_url for\nMicrosoft and Okta, respectively.

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.microsoft]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration"\n\n[auth.okta]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{subdomain}.okta.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    st.header("Log in:")\n    if st.button("Microsoft"):\n        st.login("microsoft")\n    if st.button("Okta"):\n        st.login("okta")\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n

Example 4: Change the default connection settings

\n

prompt="select_account" may be treated differently by some\nproviders when a user is already logged into their account. If a user is\nlogged into their Google or Microsoft account from a previous session, the\nprovider will prompt them to select the account they want to use, even if\nit's the only one. However, if the user is logged into their Okta or Auth0\naccount from a previous session, the account will automatically be\nselected. st.logout() does not clear a user's related cookies. To force\nusers to log in every time, use prompt="login" as described in Auth0's\nCustomize Signup and Login Prompts.

\n

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\n\n[auth.auth0]\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://{account}.{region}.auth0.com/.well-known/openid-configuration"  # fmt: skip\nclient_kwargs = { "prompt" = "login" }\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif st.button("Log in"):\n    st.login("auth0")\nif st.user.is_logged_in:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!)\n
\n", + "description": "

Initiate the login flow for the given provider.

\n

This command redirects the user to an OpenID Connect (OIDC) provider. After\nthe user authenticates their identity, they are redirected back to the\nhome page of your app. Streamlit stores a cookie with the user's identity\ninformation in the user's browser . You can access the identity information\nthrough st.user. Call st.logout() to remove the cookie\nand start a new session.

\n

You can use any OIDC provider, including Google, Microsoft, Okta, and more.\nYou must configure the provider through secrets management. Although OIDC\nis an extension of OAuth 2.0, you can't use generic OAuth providers.\nStreamlit parses the user's identity token and surfaces its attributes in\nst.user. If the provider returns an access token, that\ntoken is ignored. Therefore, this command will not allow your app to act on\nbehalf of a user in a secure system.

\n

For all providers, there are two shared settings, redirect_uri and\ncookie_secret, which you must specify in an [auth] dictionary\nin secrets.toml. Other settings must be defined as described in the\nprovider parameter.

\n
    \n
  • redirect_uri is your app's absolute URL with the pathname\noauth2callback. For local development using the default port, this is\nhttp://localhost:8501/oauth2callback.
  • \n
  • cookie_secret should be a strong, randomly generated secret.
  • \n
\n

In addition to the shared settings, the following settings are required:

\n
    \n
  • client_id
  • \n
  • client_secret
  • \n
  • server_metadata_url
  • \n
\n

For a complete list of OIDC parameters, see OpenID Connect Core and\nyour provider's documentation. By default, Streamlit sets\nscope="openid profile email" and prompt="select_account". You can\nchange these and other OIDC parameters by passing a dictionary of settings\nto client_kwargs. state and nonce, which are used for\nsecurity, are handled automatically and don't need to be specified. For\nmore information, see Example 4.

\n
\n

Important

\n
    \n
  • You must install Authlib>=1.3.2 to use this command. You can\ninstall it as an extra with Streamlit:

    \n
    \npip install streamlit[auth]\n
    \n
  • \n
  • Your authentication configuration is dependent on your host location.\nWhen you deploy your app, remember to update your redirect_uri\nwithin your app and your provider.

    \n
  • \n
  • All URLs declared in the settings must be absolute (i.e., begin with\nhttp:// or https://).

    \n
  • \n
  • Streamlit automatically enables CORS and XSRF protection when you\nconfigure authentication in secrets.toml. This takes precedence\nover configuration options in config.toml.

    \n
  • \n
  • If a user is logged into your app and opens a new tab in the same\nbrowser, they will automatically be logged in to the new session with\nthe same account.

    \n
  • \n
  • If a user closes your app without logging out, the identity cookie\nwill expire after 30 days.

    \n
  • \n
  • For security reasons, authentication is not supported for embedded\napps.

    \n
  • \n
\n
\n", "args": [ { "name": "provider", @@ -218926,7 +230545,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L55" }, "streamlit.logo": { "name": "logo", @@ -218968,21 +230587,21 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/logo.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/logo.py#L37" }, "streamlit.logout": { "name": "logout", "signature": "st.logout()", "example": "

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n", - "description": "

Logout the current user.

\n

This command removes the user's information from st.user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.user will not be cleared in any other session.\nst.user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", + "description": "

Logout the current user.

\n

This command removes the user's information from st.user and deletes\ntheir Streamlit identity cookie. If the OpenID Connect (OIDC) provider's\nserver metadata includes end_session_endpoint, this command also\nredirects the user to perform a logout from the identity provider before\nreturning to your app. Otherwise, it only performs a local logout from your\napp. This creates a new session.

\n

If the user has multiple sessions open in the same browser, st.user\nwill not be cleared in any other session. st.user only reads from the\nidentity cookie at the start of a session. After a session is running, you\nmust call st.login() or st.logout() within that session to update\nst.user.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L293" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L298" }, "streamlit.map": { "name": "map", "signature": "st.map(data=None, *, latitude=None, longitude=None, color=None, size=None, zoom=None, use_container_width=True, width=None, height=None)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        "col1": np.random.randn(1000) / 50 + 37.76,\n        "col2": np.random.randn(1000) / 50 + -122.4,\n        "col3": np.random.randn(1000) * 100,\n        "col4": np.random.rand(1000, 4).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n", + "examples": "
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((1000, 2)) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.map(df)\n
\n

You can also customize the size and color of the datapoints:

\n
\nst.map(df, size=20, color="#0044ff")\n
\n

And finally, you can choose different columns to use for the latitude\nand longitude components, as well as set size and color of each\ndatapoint dynamically based on other columns:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "col1": rng(0).standard_normal(1000) / 50 + 37.76,\n        "col2": rng(1).standard_normal(1000) / 50 + -122.4,\n        "col3": rng(2).standard_normal(1000) * 100,\n        "col4": rng(3).standard_normal((1000, 4)).tolist(),\n    }\n)\n\nst.map(df, latitude="col1", longitude="col2", size="col3", color="col4")\n
\n", "description": "

Display a map with a scatterplot overlaid onto it.

\n

This is a wrapper around st.pydeck_chart to quickly create\nscatterplot charts on top of a map, with auto-centering and auto-zoom.

\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n", "args": [ { @@ -219059,7 +230678,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", @@ -219101,7 +230720,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/markdown.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L39" }, "streamlit.metric": { "name": "metric", @@ -219183,7 +230802,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/metric.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/metric.py#L58" }, "streamlit.multiselect": { "name": "multiselect", @@ -219249,10 +230868,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -219320,7 +230939,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/multiselect.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/multiselect.py#L233" }, "streamlit.navigation": { "name": "navigation", @@ -219361,7 +230980,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/navigation.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/navigation.py#L82" }, "streamlit.number_input": { "name": "number_input", @@ -219443,10 +231062,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -219506,11 +231125,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/number_input.py#L216" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/number_input.py#L216" }, "streamlit.page_link": { "name": "page_link", - "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None)", + "signature": "st.page_link(page, *, label=None, icon=None, help=None, disabled=False, use_container_width=None, width=\"content\")", "example": "

Consider the following example given this file structure:

\n
\nyour-repository/\n\u251c\u2500\u2500 pages/\n\u2502   \u251c\u2500\u2500 page_1.py\n\u2502   \u2514\u2500\u2500 page_2.py\n\u2514\u2500\u2500 your_app.py\n
\n
\nimport streamlit as st\n\nst.page_link("your_app.py", label="Home", icon="\ud83c\udfe0")\nst.page_link("pages/page_1.py", label="Page 1", icon="1\ufe0f\u20e3")\nst.page_link("pages/page_2.py", label="Page 2", icon="2\ufe0f\u20e3", disabled=True)\nst.page_link("http://www.google.com", label="Google", icon="\ud83c\udf0e")\n
\n

The default navigation is shown here for comparison, but you can hide\nthe default navigation using the client.showSidebarNavigation\nconfiguration option. This allows you to create custom, dynamic\nnavigation menus for your apps!

\n", "description": "

Display a link to another page in a multipage app or to an external page.

\n

If another page in a multipage app is specified, clicking st.page_link\nstops the current page execution and runs the specified page as if the\nuser clicked on it in the sidebar navigation.

\n

If an external page is specified, clicking st.page_link opens a new\ntab to the specified page. The current script run will continue if not\ncomplete.

\n", "args": [ @@ -219560,11 +231179,23 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to expand the link's width to fill its parent container.\nThe default is True for page links in the sidebar and False\nfor those in the main app.

\n", - "default": "is" + "default": "is", + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the page-link button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button.py#L662" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L733" }, "streamlit.pills": { "name": "pills", @@ -219638,10 +231269,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -219685,13 +231316,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L471" }, "streamlit.plotly_chart": { "name": "plotly_chart", "signature": "st.plotly_chart(figure_or_data, use_container_width=True, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", - "examples": "

Example 1: Basic Plotly Chart

\n

The example below comes from the examples at https://plot.ly/python.\nNote that plotly.figure_factory requires scipy to run.

\n
\nimport streamlit as st\nimport numpy as np\nimport plotly.figure_factory as ff\n\n# Add histogram data\nx1 = np.random.randn(200) - 2\nx2 = np.random.randn(200)\nx3 = np.random.randn(200) + 2\n\n# Group data together\nhist_data = [x1, x2, x3]\n\ngroup_labels = ['Group 1', 'Group 2', 'Group 3']\n\n# Create distplot with custom bin_size\nfig = ff.create_distplot(\n        hist_data, group_labels, bin_size=[.1, .25, .5])\n\n# Plot!\nst.plotly_chart(fig)\n
\n

Example 2: Plotly Chart with configuration

\n

By default, Plotly charts have scroll zoom enabled. If you have a\nlonger page and want to avoid conflicts between page scrolling and\nzooming, you can use Plotly's configuration options to disable scroll\nzoom. In the following example, scroll zoom is disabled, but the zoom\nbuttons are still enabled in the modebar.

\n
\nimport streamlit as st\nimport plotly.graph_objects as go\n\nfig = go.Figure()\nfig.add_trace(\n    go.Scatter(\n        x=[1, 2, 3, 4, 5],\n        y=[1, 3, 2, 5, 4]\n    )\n)\n\nst.plotly_chart(fig, config = {'scrollZoom': False})\n
\n", - "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly to use this command. Your app's\nperformance may be enhanced by installing orjson as well.

\n
\n", + "examples": "

Example 1: Basic Plotly chart

\n

The example below comes from the examples at https://plot.ly/python.\nNote that plotly.figure_factory requires scipy to run.

\n
\nimport plotly.figure_factory as ff\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\nhist_data = [\n    rng(0).standard_normal(200) - 2,\n    rng(1).standard_normal(200),\n    rng(2).standard_normal(200) + 2,\n]\ngroup_labels = ["Group 1", "Group 2", "Group 3"]\n\nfig = ff.create_distplot(\n    hist_data, group_labels, bin_size=[0.1, 0.25, 0.5]\n)\n\nst.plotly_chart(fig)\n
\n

Example 2: Plotly Chart with configuration

\n

By default, Plotly charts have scroll zoom enabled. If you have a\nlonger page and want to avoid conflicts between page scrolling and\nzooming, you can use Plotly's configuration options to disable scroll\nzoom. In the following example, scroll zoom is disabled, but the zoom\nbuttons are still enabled in the modebar.

\n
\nimport plotly.graph_objects as go\nimport streamlit as st\n\nfig = go.Figure()\nfig.add_trace(\n    go.Scatter(\n        x=[1, 2, 3, 4, 5],\n        y=[1, 3, 2, 5, 4]\n    )\n)\n\nst.plotly_chart(fig, config = {'scrollZoom': False})\n
\n", + "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly>=4.0.0 to use this command. Your app's\nperformance may be enhanced by installing orjson as well. You\ncan install all charting dependencies (except Bokeh) as an extra\nwith Streamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "figure_or_data", @@ -219758,11 +231389,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", - "signature": "st.popover(label, *, help=None, icon=None, disabled=False, use_container_width=False)", + "signature": "st.popover(label, *, help=None, icon=None, disabled=False, use_container_width=None, width=\"content\")", "examples": "

You can use the with notation to insert any element into a popover:

\n
\nimport streamlit as st\n\nwith st.popover("Open popover"):\n    st.markdown("Hello World \ud83d\udc4b")\n    name = st.text_input("What's your name?")\n\nst.write("Your name:", name)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\n\npopover = st.popover("Filter items")\nred = popover.checkbox("Show red items.", True)\nblue = popover.checkbox("Show blue items.", True)\n\nif red:\n    st.write(":red[This is a red item.]")\nif blue:\n    st.write(":blue[This is a blue item.]")\n
\n", "description": "

Insert a popover container.

\n

Inserts a multi-element container as a popover. It consists of a button-like\nelement and a container that opens when the button is clicked.

\n

Opening and closing the popover will not trigger a rerun. Interacting\nwith widgets inside of an open popover will rerun the app while keeping\nthe popover open. Clicking outside of the popover will close it.

\n

To add elements to the returned container, you can use the "with"\nnotation (preferred) or just call methods directly on the returned object.\nSee examples below.

\n
\n

Note

\n

To follow best design practices, don't nest popovers.

\n
\n", "args": [ @@ -219803,12 +231434,24 @@ "type_name": "bool", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its contents. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the contents of the button are wider than the\nparent container, the contents will line wrap.

\n

The popover containter's minimimun width matches the width of its\nbutton. The popover container may be wider than its button to fit\nthe container's contents.

\n", + "description": "

Whether to expand the button's width to fill its parent container.\nIf use_container_width is False (default), Streamlit sizes\nthe button to fit its content. If use_container_width is\nTrue, the width of the button matches its parent container.

\n

In both cases, if the content of the button is wider than the\nparent container, the content will line wrap.

\n

The popover container's minimum width matches the width of its\nbutton. The popover container may be wider than its button to fit\nthe container's content.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "int, \"stretch\", or \"content\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the button. This can be one of the following:

\n
    \n
  • "content" (default): The width of the button matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the button matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The button has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the button matches the width\nof the parent container.
  • \n
\n

The popover container's minimum width matches the width of its\nbutton. The popover container may be wider than its button to fit\nthe container's contents.

\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L677" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L813" }, "streamlit.progress": { "name": "progress", @@ -219842,12 +231485,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/progress.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/progress.py#L94" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", "signature": "st.pydeck_chart(pydeck_obj=None, *, use_container_width=True, width=None, height=None, selection_mode=\"single-object\", on_select=\"ignore\", key=None)", - "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport pydeck as pdk\n\nchart_data = pd.DataFrame(\n    np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,  # Use Streamlit theme to pick map style\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=chart_data,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", + "example": "

Here's a chart using a HexagonLayer and a ScatterplotLayer. It uses either the\nlight or dark map style, based on which Streamlit theme is currently active:

\n
\nimport pandas as pd\nimport pydeck as pdk\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((1000, 2)) / [50, 50] + [37.76, -122.4],\n    columns=["lat", "lon"],\n)\n\nst.pydeck_chart(\n    pdk.Deck(\n        map_style=None,  # Use Streamlit theme to pick map style\n        initial_view_state=pdk.ViewState(\n            latitude=37.76,\n            longitude=-122.4,\n            zoom=11,\n            pitch=50,\n        ),\n        layers=[\n            pdk.Layer(\n                "HexagonLayer",\n                data=df,\n                get_position="[lon, lat]",\n                radius=200,\n                elevation_scale=4,\n                elevation_range=[0, 1000],\n                pickable=True,\n                extruded=True,\n            ),\n            pdk.Layer(\n                "ScatterplotLayer",\n                data=df,\n                get_position="[lon, lat]",\n                get_color="[200, 30, 0, 160]",\n                get_radius=200,\n            ),\n        ],\n    )\n)\n
\n
\n

Note

\n

To make the PyDeck chart's style consistent with Streamlit's theme,\nyou can set map_style=None in the pydeck.Deck object.

\n
\n", "description": "

Draw a chart using the PyDeck library.

\n

This supports 3D maps, point clouds, and more! More info about PyDeck\nat https://deckgl.readthedocs.io/en/latest/.

\n

These docs are also quite useful:

\n\n

When using this command, a service called Carto provides the map tiles to render\nmap content. If you're using advanced PyDeck features you may need to obtain\nan API key from Carto first. You can do that as\npydeck.Deck(api_keys={"carto": YOUR_KEY}) or by setting the CARTO_API_KEY\nenvironment variable. See PyDeck's documentation for more information.

\n

Another common provider for map tiles is Mapbox. If you prefer to use that,\nyou'll need to create an account at https://mapbox.com and specify your Mapbox\nkey when creating the pydeck.Deck object. You can do that as\npydeck.Deck(api_keys={"mapbox": YOUR_KEY}) or by setting the MAPBOX_API_KEY\nenvironment variable.

\n

Carto and Mapbox are third-party products and Streamlit accepts no responsibility\nor liability of any kind for Carto or Mapbox, or for any content or information\nmade available by Carto or Mapbox. The use of Carto or Mapbox is governed by\ntheir respective Terms of Use.

\n
\n

Note

\n

Pydeck uses two WebGL contexts per chart, and different browsers\nhave different limits on the number of WebGL contexts per page.\nIf you exceed this limit, the oldest contexts will be dropped to\nmake room for the new ones. To avoid this limitation in most\nbrowsers, don't display more than eight Pydeck charts on a single\npage.

\n
\n", "args": [ { @@ -219915,13 +231558,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", - "example": "
\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport numpy as np\n\narr = np.random.normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n", - "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib to use this command.

\n
\n", + "example": "
\nimport matplotlib.pyplot as plt\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\narr = rng(0).normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n", + "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib>=3.0.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "fig", @@ -219957,7 +231600,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/pyplot.py#L34" }, "streamlit.radio": { "name": "radio", @@ -220023,10 +231666,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -220086,7 +231729,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/radio.py#L149" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/radio.py#L150" }, "streamlit.rerun": { "name": "rerun", @@ -220103,12 +231746,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L102" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", "signature": "st.scatter_chart(data=None, *, x=None, y=None, x_label=None, y_label=None, color=None, size=None, width=None, height=None, use_container_width=True)", - "examples": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])\n\nst.scatter_chart(chart_data)\n
\n

You can also choose different columns to use for x and y, as well as set\nthe color dynamically based on a 3rd column (assuming your dataframe is in\nlong format):

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 3), columns=["col1", "col2", "col3"]\n)\nchart_data["col4"] = np.random.choice(["A", "B", "C"], 20)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y="col2",\n    color="col4",\n    size="col3",\n)\n
\n

Finally, if your dataframe is in wide format, you can group multiple\ncolumns under the y argument to show multiple series with different\ncolors:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(\n    np.random.randn(20, 4), columns=["col1", "col2", "col3", "col4"]\n)\n\nst.scatter_chart(\n    chart_data,\n    x="col1",\n    y=["col2", "col3"],\n    size="col4",\n    color=["#FF0000", "#0000FF"],  # Optional\n)\n
\n", + "examples": "

Example 1: Basic scatter chart from a dataframe

\n

If you don't use any of the optional parameters, Streamlit plots each\ncolumn as a color-coded group of points, uses the index as the x\nvalues, and labels each group with the column name:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nst.scatter_chart(df)\n
\n

Example 2: Scatter chart from specific dataframe columns

\n

You can choose different columns to use for the x and y values. If your\ndataframe is in long format (all y-values in one column), you can set\nthe scatter point colors from another column.

\n

If the column contains color strings, the colors will be applied\ndirectly and each color group will be unlabeled. If the column contains\nother values, those values will label each group, and the scatter point\ncolors will be selected from the default color palette. You can\nconfigure this color palette in the theme.chartCategoryColors\nconfiguration option.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((20, 3)), columns=["col1", "col2", "col3"]\n)\ndf["col4"] = rng(0).choice(["a", "b", "c"], 20)\n\nst.scatter_chart(\n    df,\n    x="col1",\n    y="col2",\n    color="col4",\n    size="col3",\n)\n
\n

Example 3: Scatter chart from wide-format dataframe

\n

If your dataframe is in wide format (y-values are in multiple columns),\nyou can pass a list of columns to the y parameter. Each column\nname becomes a group label. To override the default colors, pass a\nlist of colors to the color parameter, one for each group:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((20, 4)),\n    columns=["col1", "col2", "col3", "col4"],\n)\n\nst.scatter_chart(\n    df,\n    x="col1",\n    y=["col2", "col3"],\n    size="col4",\n    color=["#FF0000", "#0000FF"],\n)\n
\n", "description": "

Display a scatterplot chart.

\n

This is syntax-sugar around st.altair_chart. The main difference\nis this command uses the data's own column and indices to figure out\nthe chart's Altair spec. As a result this is easier to use for many\n"just plot this" scenarios, while being less customizable.

\n

If st.scatter_chart does not guess the data specification correctly,\ntry specifying your desired chart using st.altair_chart.

\n", "args": [ { @@ -220193,7 +231836,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1300" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1375" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -220267,10 +231910,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": true, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -220314,7 +231957,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/button_group.py#L699" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L698" }, "streamlit.select_slider": { "name": "select_slider", @@ -220380,10 +232023,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -220427,7 +232070,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/select_slider.py#L144" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/select_slider.py#L147" }, "streamlit.selectbox": { "name": "selectbox", @@ -220493,10 +232136,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -220556,7 +232199,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/selectbox.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/selectbox.py#L270" }, "streamlit.set_option": { "name": "set_option", @@ -220582,7 +232225,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/config.py#L128" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/config.py#L128" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -220627,12 +232270,12 @@ "type_name": "dict", "is_optional": false, "is_kwarg_only": false, - "description": "

Configure the menu that appears on the top-right side of this app.\nThe keys in this dict denote the menu item you'd like to configure:

\n
    \n
  • \n
    "Get help": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "Report a Bug": str or None
    \n
    The URL this menu item should point to.\nIf None, hides this menu item.
    \n
    \n
  • \n
  • \n
    "About": str or None
    \n
    A markdown string to show in the About dialog.\nIf None, only shows Streamlit's default About text.
    \n
    \n
  • \n
\n

The URL may also refer to an email address e.g. mailto:john@example.com.\nTo remove an item that was specified in a previous call to\nst.set_page_config, set its value to None in the dictionary.

\n", - "default": "About" + "description": "

Configure the menu that appears on the top-right side of this app.\nThe keys in this dict denote the menu item to configure. The following\nkeys can have string or None values:

\n
    \n
  • "Get help": The URL this menu item should point to.
  • \n
  • "Report a Bug": The URL this menu item should point to.
  • \n
  • "About": A markdown string to show in the About dialog.
  • \n
\n

A URL may also refer to an email address e.g. mailto:john@example.com.

\n

If you do not include a key, its menu item will be hidden (unless it\nwas set by a previous call to st.set_page_config). To remove an\nitem that was specified in a previous call to st.set_page_config,\nset its value to None in the dictionary.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/page_config.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/page_config.py#L109" }, "streamlit.slider": { "name": "slider", @@ -220714,10 +232357,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -220761,7 +232404,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/slider.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/slider.py#L430" }, "streamlit.snow": { "name": "snow", @@ -220770,7 +232413,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -220804,7 +232447,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/spinner.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/spinner.py#L37" }, "streamlit.status": { "name": "status", @@ -220853,7 +232496,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L982" }, "streamlit.stop": { "name": "stop", @@ -220862,7 +232505,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -220912,7 +232555,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L134" }, "streamlit.success": { "name": "success", @@ -220946,7 +232589,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L250" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L250" }, "streamlit.switch_page": { "name": "switch_page", @@ -220964,12 +232607,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/commands/execution_control.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L157" }, "streamlit.table": { "name": "table", "signature": "st.table(data=None)", - "examples": "

Example 1: Display a simple dataframe as a static table

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    np.random.randn(10, 5), columns=("col %d" % i for i in range(5))\n)\n\nst.table(df)\n
\n

Example 2: Display a table of Markdown strings

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        "Command": ["**st.table**", "*st.dataframe*"],\n        "Type": ["`static`", "`interactive`"],\n        "Docs": [\n            "[:rainbow[docs]](https://docs.streamlit.io/develop/api-reference/data/st.dataframe)",\n            "[:book:](https://docs.streamlit.io/develop/api-reference/data/st.table)",\n        ],\n    }\n)\nst.table(df)\n
\n", + "examples": "

Example 1: Display a simple dataframe as a static table

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal(size=(10, 5)),\n    columns=("col %d" % i for i in range(5)),\n)\n\nst.table(df)\n
\n

Example 2: Display a table of Markdown strings

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    {\n        "Command": ["**st.table**", "*st.dataframe*"],\n        "Type": ["`static`", "`interactive`"],\n        "Docs": [\n            "[:rainbow[docs]](https://docs.streamlit.io"\n            "/develop/api-reference/data/st.dataframe)",\n            "[:open_book:](https://docs.streamlit.io"\n            "/develop/api-reference/data/st.table)",\n        ],\n    }\n)\n\nst.table(df)\n
\n", "description": "

Display a static table.

\n

While st.dataframe is geared towards large datasets and interactive\ndata exploration, st.table is useful for displaying small, styled\ntables without sorting or scrolling. For example, st.table may be\nthe preferred way to display a confusion matrix or leaderboard.\nAdditionally, st.table supports Markdown.

\n", "args": [ { @@ -220982,12 +232625,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L651" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L668" }, "streamlit.tabs": { "name": "tabs", "signature": "st.tabs(tabs, *, width=\"stretch\")", - "examples": "

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nimport numpy as np\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\ndata = np.random.randn(10, 1)\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(data)\n\ntab2.subheader("A tab with the data")\ntab2.write(data)\n
\n", + "examples": "

You can use the with notation to insert any element into a tab:

\n
\nimport streamlit as st\n\ntab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])\n\nwith tab1:\n    st.header("A cat")\n    st.image("https://static.streamlit.io/examples/cat.jpg", width=200)\nwith tab2:\n    st.header("A dog")\n    st.image("https://static.streamlit.io/examples/dog.jpg", width=200)\nwith tab3:\n    st.header("An owl")\n    st.image("https://static.streamlit.io/examples/owl.jpg", width=200)\n
\n

Or you can just call methods directly on the returned objects:

\n
\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = rng(0).standard_normal((10, 1))\n\ntab1, tab2 = st.tabs(["\ud83d\udcc8 Chart", "\ud83d\uddc3 Data"])\n\ntab1.subheader("A tab with a chart")\ntab1.line_chart(df)\n\ntab2.subheader("A tab with the data")\ntab2.write(df)\n
\n", "description": "

Insert containers separated into tabs.

\n

Inserts a number of multi-element containers as tabs.\nTabs are a navigational element that allows users to easily\nmove between groups of related content.

\n

To add elements to the returned containers, you can use the with notation\n(preferred) or just call methods directly on the returned object. See\nexamples below.

\n
\n

Note

\n

All content within every tab is computed and sent to the frontend,\nregardless of which tab is selected. Tabs do not currently support\nconditional rendering. If you have a slow-loading tab, consider\nusing a widget like st.segmented_control to conditionally\nrender content instead.

\n
\n", "args": [ { @@ -221015,7 +232658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/layouts.py#L420" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L556" }, "streamlit.text": { "name": "text", @@ -221049,7 +232692,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/text.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/text.py#L31" }, "streamlit.text_area": { "name": "text_area", @@ -221115,10 +232758,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -221170,7 +232813,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/text_widgets.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/text_widgets.py#L450" }, "streamlit.text_input": { "name": "text_input", @@ -221244,10 +232887,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -221307,7 +232950,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/text_widgets.py#L127" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/text_widgets.py#L127" }, "streamlit.time_input": { "name": "time_input", @@ -221357,10 +233000,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -221412,7 +233055,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/time_widgets.py#L351" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/time_widgets.py#L351" }, "streamlit.title": { "name": "title", @@ -221454,12 +233097,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/heading.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L223" }, "streamlit.toast": { "name": "toast", "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", + "example": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's top-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -221480,7 +233123,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/toast.py#L38" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/toast.py#L38" }, "streamlit.toggle": { "name": "toggle", @@ -221530,10 +233173,10 @@ }, { "name": "args", - "type_name": "tuple", + "type_name": "list or tuple", "is_optional": false, "is_kwarg_only": false, - "description": "

An optional tuple of args to pass to the callback.

\n", + "description": "

An optional list or tuple of args to pass to the callback.

\n", "default": null }, { @@ -221577,12 +233220,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/widgets/checkbox.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/checkbox.py#L190" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", "signature": "st.vega_lite_chart(data=None, spec=None, *, use_container_width=None, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=None, **kwargs)", - "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nchart_data = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n   chart_data,\n   {\n       "mark": {"type": "circle", "tooltip": True},\n       "encoding": {\n           "x": {"field": "a", "type": "quantitative"},\n           "y": {"field": "b", "type": "quantitative"},\n           "size": {"field": "c", "type": "quantitative"},\n           "color": {"field": "c", "type": "quantitative"},\n       },\n   },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n", + "example": "
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((60, 3)), columns=["a", "b", "c"])\n\nst.vega_lite_chart(\n    df,\n    {\n        "mark": {"type": "circle", "tooltip": True},\n        "encoding": {\n            "x": {"field": "a", "type": "quantitative"},\n            "y": {"field": "b", "type": "quantitative"},\n            "size": {"field": "c", "type": "quantitative"},\n            "color": {"field": "c", "type": "quantitative"},\n        },\n    },\n)\n
\n

Examples of Vega-Lite usage without Streamlit can be found at\nhttps://vega.github.io/vega-lite/examples/. Most of those can be easily\ntranslated to the syntax shown above.

\n", "description": "

Display a chart using the Vega-Lite library.

\n

Vega-Lite is a high-level\ngrammar for defining interactive graphics.

\n", "args": [ { @@ -221658,7 +233301,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L1704" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1798" }, "streamlit.video": { "name": "video", @@ -221740,7 +233383,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/media.py#L227" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/media.py#L227" }, "streamlit.warning": { "name": "warning", @@ -221774,12 +233417,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/alert.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L105" }, "streamlit.write": { "name": "write", "signature": "st.write(*args, unsafe_allow_html=False, **kwargs)", - "examples": "

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\ndf = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])\nc = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(c)\n
\n", + "examples": "

Its basic use case is to draw Markdown-formatted text, whenever the\ninput is a string:

\n
\nimport streamlit as st\n\nst.write("Hello, *World!* :sunglasses:")\n
\n

As mentioned earlier, st.write() also accepts other data formats, such as\nnumbers, data frames, styled data frames, and assorted objects:

\n
\nimport streamlit as st\nimport pandas as pd\n\nst.write(1234)\nst.write(\n    pd.DataFrame(\n        {\n            "first column": [1, 2, 3, 4],\n            "second column": [10, 20, 30, 40],\n        }\n    )\n)\n
\n

Finally, you can pass in multiple arguments to do things like:

\n
\nimport streamlit as st\n\nst.write("1 + 1 = ", 2)\nst.write("Below is a DataFrame:", data_frame, "Above is a dataframe.")\n
\n

Oh, one more thing: st.write accepts chart objects too! For example:

\n
\nimport altair as alt\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((200, 3)), columns=["a", "b", "c"])\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(x="a", y="b", size="c", color="c", tooltip=["a", "b", "c"])\n)\n\nst.write(chart)\n
\n", "description": "

Displays arguments in the app.

\n

This is the Swiss Army knife of Streamlit commands: it does different\nthings depending on what you throw at it. Unlike other Streamlit\ncommands, st.write() has some unique properties:

\n
    \n
  • You can pass in multiple arguments, all of which will be displayed.
  • \n
  • Its behavior depends on the input type(s).
  • \n
\n", "args": [ { @@ -221819,7 +233462,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/write.py#L255" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/write.py#L256" }, "streamlit.write_stream": { "name": "write_stream", @@ -221832,7 +233475,7 @@ "type_name": "Callable, Generator, Iterable, OpenAI Stream, or LangChain Stream", "is_optional": false, "is_kwarg_only": false, - "description": "

The generator or iterable to stream.

\n

If you pass an async generator, Streamlit will internally convert\nit to a sync generator.

\n
\n

Note

\n

To use additional LLM libraries, you can create a wrapper to\nmanually define a generator function and include custom output\nparsing.

\n
\n", + "description": "

The generator or iterable to stream.

\n

If you pass an async generator, Streamlit will internally convert\nit to a sync generator. If the generator depends on a cached object\nwith async references, this can raise an error.

\n
\n

Note

\n

To use additional LLM libraries, you can create a wrapper to\nmanually define a generator function and include custom output\nparsing.

\n
\n", "default": null } ], @@ -221844,7 +233487,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -221852,7 +233495,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_data_api.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_data_api.py#L624" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -221860,7 +233503,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_resource_api.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_resource_api.py#L487" }, "streamlit.query_params.clear": { "name": "clear", @@ -221875,7 +233518,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -221893,7 +233536,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -221917,7 +233560,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.missing_attr_error_message": { "name": "missing_attr_error_message", @@ -221925,7 +233568,7 @@ "description": "

Returns a formatted error message for missing attributes.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" }, "streamlit.query_params.missing_key_error_message": { "name": "missing_key_error_message", @@ -221933,7 +233576,7 @@ "description": "

Returns a formatted error message for missing keys.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -221948,7 +233591,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -221972,7 +233615,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -221993,11 +233636,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -222021,11 +233664,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -222048,7 +233691,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L356" }, { "name": "query", @@ -222121,7 +233764,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L223" }, { "name": "reset", @@ -222137,7 +233780,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -222154,7 +233797,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L385" }, { "name": "engine", @@ -222169,7 +233812,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L372" }, { "name": "session", @@ -222185,10 +233828,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L398" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -222213,7 +233856,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L457" }, { "name": "query", @@ -222262,7 +233905,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L282" }, { "name": "reset", @@ -222278,7 +233921,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -222294,7 +233937,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L529" }, { "name": "write_pandas", @@ -222359,7 +234002,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L375" } ], "properties": [ @@ -222377,12 +234020,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L490" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L49", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L49", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", - "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Tip

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall Snowflake extras along with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", + "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Important

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall it as an extra with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], "returns": [] }, @@ -222422,7 +234065,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -222438,7 +234081,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -222447,7 +234090,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -222458,10 +234101,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -222479,7 +234122,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L356" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -222494,7 +234137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L384" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L385" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -222509,7 +234152,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L371" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L372" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -222582,7 +234225,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L222" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L223" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -222598,7 +234241,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -222614,7 +234257,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/sql_connection.py#L397" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L398" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -222647,7 +234290,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -222663,7 +234306,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -222672,7 +234315,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -222681,7 +234324,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -222697,7 +234340,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L457" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -222746,7 +234389,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L282" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -222762,7 +234405,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L490" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -222778,7 +234421,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -222794,7 +234437,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L529" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -222859,7 +234502,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L375" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -222875,7 +234518,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -222933,7 +234576,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1234" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1234" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -222991,7 +234634,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1039" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -223057,7 +234700,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L805" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L805" }, "streamlit.column_config.Column": { "name": "Column", @@ -223115,7 +234758,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L252" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -223213,7 +234856,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1827" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1827" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -223319,7 +234962,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1508" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1508" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -223361,7 +235004,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1332" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1332" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -223403,7 +235046,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L2116" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L2116" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -223461,7 +235104,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1136" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1136" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -223551,7 +235194,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L642" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L642" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", @@ -223593,7 +235236,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1423" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1423" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -223691,7 +235334,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L356" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -223765,7 +235408,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1982" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1982" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", @@ -223839,7 +235482,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L913" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L913" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -223921,7 +235564,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L521" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -224019,7 +235662,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/column_types.py#L1673" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1673" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -224059,7 +235702,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/components/v1/component_registry.py#L53" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/components/v1/component_registry.py#L53" }, "streamlit.components.v1.html": { "name": "html", @@ -224109,7 +235752,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/iframe.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/iframe.py#L105" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -224159,12 +235802,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/iframe.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/iframe.py#L28" }, "DeltaGenerator.add_rows": { "name": "add_rows", "signature": "element.add_rows(data=None, **kwargs)", - "example": "
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table = st.table(df1)\n\ndf2 = pd.DataFrame(\n    np.random.randn(50, 20), columns=("col %d" % i for i in range(20))\n)\n\nmy_table.add_rows(df2)\n# Now the table shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\nmy_chart.add_rows(df2)\n# Now the chart shown in the Streamlit app contains the data for\n# df1 followed by the data for df2.\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart(\n    {\n        "mark": "line",\n        "encoding": {"x": "a", "y": "b"},\n        "datasets": {\n            "some_fancy_name": df1,  # <-- named dataset\n        },\n        "data": {"name": "some_fancy_name"},\n    }\n)\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n", + "example": "
\nimport time\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf1 = pd.DataFrame(\n    rng(0).standard_normal(size=(50, 20)), columns=("col %d" % i for i in range(20))\n)\n\ndf2 = pd.DataFrame(\n    rng(1).standard_normal(size=(50, 20)), columns=("col %d" % i for i in range(20))\n)\n\nmy_table = st.table(df1)\ntime.sleep(1)\nmy_table.add_rows(df2)\n
\n

You can do the same thing with plots. For example, if you want to add\nmore data to a line chart:

\n
\n# Assuming df1 and df2 from the example above still exist...\nmy_chart = st.line_chart(df1)\ntime.sleep(1)\nmy_chart.add_rows(df2)\n
\n

And for plots whose datasets are named, you can pass the data with a\nkeyword argument where the key is the name:

\n
\nmy_chart = st.vega_lite_chart(\n    {\n        "mark": "line",\n        "encoding": {"x": "a", "y": "b"},\n        "datasets": {\n            "some_fancy_name": df1,  # <-- named dataset\n        },\n        "data": {"name": "some_fancy_name"},\n    }\n)\nmy_chart.add_rows(some_fancy_name=df2)  # <-- name used as keyword\n
\n", "description": "

Concatenate a dataframe to the bottom of the current one.

\n", "args": [ { @@ -224185,7 +235828,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L735" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L763" }, "StatusContainer.update": { "name": "update", @@ -224218,7 +235861,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -224247,7 +235890,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1032" }, { "name": "run", @@ -224271,7 +235914,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L375" }, { "name": "switch_page", @@ -224295,7 +235938,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L398" } ], "properties": [ @@ -224312,7 +235955,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L453" }, { "name": "button_group", @@ -224327,7 +235970,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L468" }, { "name": "caption", @@ -224342,7 +235985,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L479" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L482" }, { "name": "chat_input", @@ -224357,7 +236000,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L496" }, { "name": "chat_message", @@ -224372,7 +236015,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L507" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L510" }, { "name": "checkbox", @@ -224387,7 +236030,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L524" }, { "name": "code", @@ -224402,7 +236045,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L538" }, { "name": "color_picker", @@ -224417,7 +236060,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L552" }, { "name": "columns", @@ -224432,7 +236075,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L563" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L566" }, { "name": "dataframe", @@ -224447,7 +236090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L583" }, { "name": "date_input", @@ -224462,7 +236105,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L594" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L597" }, { "name": "divider", @@ -224477,7 +236120,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L608" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L611" }, { "name": "error", @@ -224492,7 +236135,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L622" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L625" }, { "name": "exception", @@ -224507,7 +236150,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L636" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L639" }, { "name": "expander", @@ -224522,7 +236165,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L650" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L653" }, { "name": "header", @@ -224537,7 +236180,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L664" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L667" }, { "name": "info", @@ -224552,7 +236195,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L678" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L681" }, { "name": "json", @@ -224567,7 +236210,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L692" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L695" }, { "name": "latex", @@ -224582,7 +236225,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L706" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L709" }, { "name": "main", @@ -224597,7 +236240,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L427" }, { "name": "markdown", @@ -224612,7 +236255,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L720" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L723" }, { "name": "metric", @@ -224627,7 +236270,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L734" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L737" }, { "name": "multiselect", @@ -224642,7 +236285,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L751" }, { "name": "number_input", @@ -224657,7 +236300,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L762" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L765" }, { "name": "radio", @@ -224672,7 +236315,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L776" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L779" }, { "name": "select_slider", @@ -224687,7 +236330,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L790" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L793" }, { "name": "selectbox", @@ -224702,7 +236345,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L804" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L807" }, { "name": "sidebar", @@ -224717,7 +236360,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L437" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L440" }, { "name": "slider", @@ -224732,7 +236375,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L818" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L821" }, { "name": "status", @@ -224747,7 +236390,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L860" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L863" }, { "name": "subheader", @@ -224762,7 +236405,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L835" }, { "name": "success", @@ -224777,7 +236420,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L846" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L849" }, { "name": "table", @@ -224792,7 +236435,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L874" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L877" }, { "name": "tabs", @@ -224807,7 +236450,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L891" }, { "name": "text", @@ -224822,7 +236465,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L911" }, { "name": "text_area", @@ -224837,7 +236480,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L922" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L925" }, { "name": "text_input", @@ -224852,7 +236495,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L936" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L939" }, { "name": "time_input", @@ -224867,7 +236510,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L950" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L953" }, { "name": "title", @@ -224882,7 +236525,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L964" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L967" }, { "name": "toast", @@ -224897,7 +236540,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L978" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L981" }, { "name": "toggle", @@ -224912,7 +236555,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L992" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L995" }, { "name": "warning", @@ -224927,10 +236570,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1006" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1009" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -224970,7 +236613,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L453" }, "AppTest.button_group": { "name": "button_group", @@ -224985,7 +236628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L468" }, "AppTest.caption": { "name": "caption", @@ -225000,7 +236643,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L479" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L482" }, "AppTest.chat_input": { "name": "chat_input", @@ -225015,7 +236658,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L493" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L496" }, "AppTest.chat_message": { "name": "chat_message", @@ -225030,7 +236673,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L507" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L510" }, "AppTest.checkbox": { "name": "checkbox", @@ -225045,7 +236688,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L524" }, "AppTest.code": { "name": "code", @@ -225060,7 +236703,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L535" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L538" }, "AppTest.color_picker": { "name": "color_picker", @@ -225075,7 +236718,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L549" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L552" }, "AppTest.columns": { "name": "columns", @@ -225090,7 +236733,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L563" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L566" }, "AppTest.dataframe": { "name": "dataframe", @@ -225105,7 +236748,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L580" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L583" }, "AppTest.date_input": { "name": "date_input", @@ -225120,7 +236763,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L594" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L597" }, "AppTest.divider": { "name": "divider", @@ -225135,7 +236778,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L608" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L611" }, "AppTest.error": { "name": "error", @@ -225150,7 +236793,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L622" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L625" }, "AppTest.exception": { "name": "exception", @@ -225165,7 +236808,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L636" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L639" }, "AppTest.expander": { "name": "expander", @@ -225180,7 +236823,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L650" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L653" }, "AppTest.from_file": { "name": "from_file", @@ -225212,7 +236855,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L275" }, "AppTest.from_function": { "name": "from_function", @@ -225260,7 +236903,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L225" }, "AppTest.from_string": { "name": "from_string", @@ -225292,7 +236935,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -225316,7 +236959,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1029" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1032" }, "AppTest.header": { "name": "header", @@ -225331,7 +236974,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L664" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L667" }, "AppTest.info": { "name": "info", @@ -225346,7 +236989,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L678" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L681" }, "AppTest.json": { "name": "json", @@ -225361,7 +237004,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L692" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L695" }, "AppTest.latex": { "name": "latex", @@ -225376,7 +237019,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L706" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L709" }, "AppTest.main": { "name": "main", @@ -225391,7 +237034,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L424" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L427" }, "AppTest.markdown": { "name": "markdown", @@ -225406,7 +237049,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L720" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L723" }, "AppTest.metric": { "name": "metric", @@ -225421,7 +237064,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L734" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L737" }, "AppTest.multiselect": { "name": "multiselect", @@ -225436,7 +237079,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L751" }, "AppTest.number_input": { "name": "number_input", @@ -225451,7 +237094,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L762" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L765" }, "AppTest.radio": { "name": "radio", @@ -225466,7 +237109,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L776" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L779" }, "AppTest.run": { "name": "run", @@ -225490,7 +237133,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L375" }, "AppTest.select_slider": { "name": "select_slider", @@ -225505,7 +237148,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L790" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L793" }, "AppTest.selectbox": { "name": "selectbox", @@ -225520,7 +237163,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L804" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L807" }, "AppTest.sidebar": { "name": "sidebar", @@ -225535,7 +237178,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L437" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L440" }, "AppTest.slider": { "name": "slider", @@ -225550,7 +237193,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L818" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L821" }, "AppTest.status": { "name": "status", @@ -225565,7 +237208,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L860" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L863" }, "AppTest.subheader": { "name": "subheader", @@ -225580,7 +237223,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L835" }, "AppTest.success": { "name": "success", @@ -225595,7 +237238,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L846" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L849" }, "AppTest.switch_page": { "name": "switch_page", @@ -225619,7 +237262,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L395" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L398" }, "AppTest.table": { "name": "table", @@ -225634,7 +237277,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L874" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L877" }, "AppTest.tabs": { "name": "tabs", @@ -225649,7 +237292,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L888" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L891" }, "AppTest.text": { "name": "text", @@ -225664,7 +237307,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L908" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L911" }, "AppTest.text_area": { "name": "text_area", @@ -225679,7 +237322,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L922" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L925" }, "AppTest.text_input": { "name": "text_input", @@ -225694,7 +237337,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L936" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L939" }, "AppTest.time_input": { "name": "time_input", @@ -225709,7 +237352,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L950" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L953" }, "AppTest.title": { "name": "title", @@ -225724,7 +237367,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L964" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L967" }, "AppTest.toast": { "name": "toast", @@ -225739,7 +237382,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L978" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L981" }, "AppTest.toggle": { "name": "toggle", @@ -225754,7 +237397,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L992" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L995" }, "AppTest.warning": { "name": "warning", @@ -225769,7 +237412,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/app_test.py#L1006" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1009" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -225782,7 +237425,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L343" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L339" }, { "name": "run", @@ -225799,7 +237442,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -225807,7 +237450,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L338" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L334" } ], "properties": [ @@ -225817,10 +237460,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L329" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L306", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -225845,7 +237488,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -225853,7 +237496,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L748" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "set_value", @@ -225861,7 +237504,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L742" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "unselect", @@ -225869,7 +237512,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L762" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L758" } ], "properties": [ @@ -225879,7 +237522,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L736" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L732" }, { "name": "indices", @@ -225887,7 +237530,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L731" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L727" }, { "name": "value", @@ -225895,10 +237538,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L722" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L718" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L696", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L692", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -225923,7 +237566,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -225931,7 +237574,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L360" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L356" } ], "properties": [ @@ -225941,10 +237584,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L373" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L369" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L348", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L344", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -225960,7 +237603,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L415" }, { "name": "run", @@ -225977,7 +237620,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -225985,7 +237628,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L414" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L410" }, { "name": "uncheck", @@ -225993,7 +237636,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L423" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L419" } ], "properties": [ @@ -226003,10 +237646,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L405" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L401" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L383", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L379", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -226022,7 +237665,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L486" }, { "name": "run", @@ -226039,7 +237682,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226047,7 +237690,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L485" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L481" } ], "properties": [ @@ -226057,10 +237700,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L465" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L461" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L450", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L446", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -226085,7 +237728,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226093,7 +237736,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L536" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L532" } ], "properties": [ @@ -226103,10 +237746,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L550" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L546" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L516", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L512", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -226131,7 +237774,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -226141,10 +237784,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L107", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -226169,7 +237812,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -226177,7 +237820,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L838" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L834" }, { "name": "set_value", @@ -226185,7 +237828,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L832" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L828" }, { "name": "unselect", @@ -226193,7 +237836,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L852" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L848" } ], "properties": [ @@ -226203,7 +237846,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L826" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L822" }, { "name": "indices", @@ -226211,7 +237854,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L816" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L812" }, { "name": "value", @@ -226219,7 +237862,7 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L807" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L803" }, { "name": "values", @@ -226227,10 +237870,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L817" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L778", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L774", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -226246,7 +237889,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L923" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L919" }, { "name": "increment", @@ -226254,7 +237897,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L915" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L911" }, { "name": "run", @@ -226271,7 +237914,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226279,7 +237922,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L891" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L887" } ], "properties": [ @@ -226289,10 +237932,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L904" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L900" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L871", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L867", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -226317,7 +237960,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226325,7 +237968,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L973" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L969" } ], "properties": [ @@ -226335,7 +237978,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "index", @@ -226343,7 +237986,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L951" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L947" }, { "name": "value", @@ -226351,10 +237994,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L958" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L954" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L932", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L928", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -226379,7 +238022,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -226387,7 +238030,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1117" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1113" }, { "name": "set_value", @@ -226395,7 +238038,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1080" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1076" } ], "properties": [ @@ -226405,7 +238048,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1111" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1107" }, { "name": "value", @@ -226413,10 +238056,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1101" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1097" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1062", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1058", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -226441,7 +238084,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -226449,7 +238092,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1035" }, { "name": "select_index", @@ -226457,7 +238100,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1043" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1039" }, { "name": "set_value", @@ -226465,7 +238108,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1034" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1030" } ], "properties": [ @@ -226475,7 +238118,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1028" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1024" }, { "name": "index", @@ -226483,7 +238126,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1005" }, { "name": "value", @@ -226491,10 +238134,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1019" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1015" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L991", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L987", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -226519,7 +238162,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -226527,7 +238170,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1169" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1168" }, { "name": "set_value", @@ -226535,7 +238178,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1141" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1140" } ], "properties": [ @@ -226545,10 +238188,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1159" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1158" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1122", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1121", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -226564,7 +238207,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1249" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1248" }, { "name": "run", @@ -226581,7 +238224,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226589,7 +238232,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1226" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1225" } ], "properties": [ @@ -226599,10 +238242,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1239" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1238" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1208", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1207", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -226618,7 +238261,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1301" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1300" }, { "name": "run", @@ -226635,7 +238278,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226643,7 +238286,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1278" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1277" } ], "properties": [ @@ -226653,10 +238296,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1291" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1290" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1260", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1259", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -226672,7 +238315,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1364" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1363" }, { "name": "increment", @@ -226680,7 +238323,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1357" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1356" }, { "name": "run", @@ -226697,7 +238340,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226705,7 +238348,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1331" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1330" } ], "properties": [ @@ -226715,10 +238358,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1347" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1346" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1315", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1314", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -226743,7 +238386,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226751,7 +238394,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1420" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1419" } ], "properties": [ @@ -226761,10 +238404,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1411" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1410" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L1388", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1387", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -226789,7 +238432,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L146" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -226797,7 +238440,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L197" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -226807,10 +238450,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L136" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/testing/v1/element_tree.py#L182", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -226828,7 +238471,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L514" }, "context.cookies": { "name": "cookies", @@ -226837,7 +238480,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L205" }, "context.headers": { "name": "headers", @@ -226846,7 +238489,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L159" }, "context.ip_address": { "name": "ip_address", @@ -226855,7 +238498,7 @@ "description": "

The read-only IP address of the user's connection.

\n

This should not be used for security measures because it can easily be\nspoofed. When a user accesses the app through localhost, the IP\naddress is None. Otherwise, the IP address is determined from the\nremote_ip attribute of the Tornado request object and may be an\nIPv4 or IPv6 address.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L394" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L394" }, "context.is_embedded": { "name": "is_embedded", @@ -226864,7 +238507,7 @@ "description": "

Whether the app is embedded.

\n

This property returns a boolean value indicating whether the app is\nrunning in an embedded context. This is determined by the presence of\nembed=true as a query parameter in the URL. This is the only way to\ndetermine if the app is currently configured for embedding because\nembedding settings are not accessible through st.query_params or\nst.context.url.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L432" }, "context.locale": { "name": "locale", @@ -226873,7 +238516,7 @@ "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L335" }, "context.theme": { "name": "theme", @@ -226890,7 +238533,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L239" }, "context.timezone": { "name": "timezone", @@ -226899,7 +238542,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L279" }, "context.timezone_offset": { "name": "timezone_offset", @@ -226908,7 +238551,7 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L308" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L308" }, "context.url": { "name": "url", @@ -226917,7 +238560,7 @@ "description": "

The read-only URL of the app in the user's browser.

\n

st.context.url returns the URL through which the user is accessing\nthe app. This includes the scheme, domain name, port, and path. If\nquery parameters or anchors are present in the URL, they are removed\nand not included in this value.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L364" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L364" }, "CachedFunc.clear": { "name": "clear", @@ -226943,7 +238586,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/caching/cache_utils.py#L364" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_utils.py#L366" }, "StreamlitPage": { "name": "StreamlitPage", @@ -226956,7 +238599,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L272" } ], "properties": [ @@ -226966,7 +238609,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L249" }, { "name": "title", @@ -226974,7 +238617,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L238" }, { "name": "url_path", @@ -226982,10 +238625,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L257" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L128", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -227018,7 +238661,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L249" }, "StreamlitPage.run": { "name": "run", @@ -227026,7 +238669,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L272" }, "StreamlitPage.title": { "name": "title", @@ -227034,7 +238677,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L238" }, "StreamlitPage.url_path": { "name": "url_path", @@ -227042,7 +238685,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L257" }, "streamlit.user": { "name": "user", @@ -227062,11 +238705,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L514" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/user_info.py#L375", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L379", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.user is dependent on the host platform running your\nStreamlit app. If your host platform has not configured the object,\nst.user will behave as it does in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.user["email"] or st.user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -227093,7 +238736,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L205" }, { "name": "headers", @@ -227102,7 +238745,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L159" }, { "name": "ip_address", @@ -227111,7 +238754,7 @@ "description": "

The read-only IP address of the user's connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L394" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L394" }, { "name": "is_embedded", @@ -227120,7 +238763,7 @@ "description": "

Whether the app is embedded.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L432" }, { "name": "locale", @@ -227129,7 +238772,7 @@ "description": "

The read-only locale of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L335" }, { "name": "theme", @@ -227146,7 +238789,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L239" }, { "name": "timezone", @@ -227155,7 +238798,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L279" }, { "name": "timezone_offset", @@ -227164,7 +238807,7 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L308" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L308" }, { "name": "url", @@ -227173,10 +238816,10 @@ "description": "

The read-only URL of the app in the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L364" + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L364" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/runtime/context.py#L148", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L148", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -227186,8 +238829,8 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L168", - "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()  # iris is a pandas DataFrame\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L168", + "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport plotly.express as px\nimport streamlit as st\n\ndf = px.data.iris()\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -227206,8 +238849,8 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/plotly_chart.py#L80", - "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport streamlit as st\nimport plotly.express as px\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L80", + "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport plotly.express as px\nimport streamlit as st\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ { @@ -227247,8 +238890,8 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/vega_charts.py#L108", - "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

The follow example uses st.altair_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\ndf = st.session_state.data\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

The following example uses st.vega_lite_chart:

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "data" not in st.session_state:\n    st.session_state.data = pd.DataFrame(\n        np.random.randn(20, 3), columns=["a", "b", "c"]\n    )\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(\n    st.session_state.data, spec, key="vega_chart", on_select="rerun"\n)\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L108", + "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

Example 1: Chart selections with ``st.altair_chart``

\n
\nimport altair as alt\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

Example 2: Chart selections with ``st.vega_lite_chart``

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(df, spec, key="vega_chart", on_select="rerun")\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -227267,7 +238910,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L135", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L137", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -227286,8 +238929,8 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/arrow.py#L77", - "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport streamlit as st\nimport pandas as pd\nimport numpy as np\n\nif "df" not in st.session_state:\n    st.session_state.df = pd.DataFrame(\n        np.random.randn(12, 5), columns=["a", "b", "c", "d", "e"]\n    )\n\nevent = st.dataframe(\n    st.session_state.df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L80", + "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((12, 5)), columns=["a", "b", "c", "d", "e"]\n)\n\nevent = st.dataframe(\n    df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ { @@ -227313,7 +238956,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -227332,7 +238975,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.47.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ @@ -227355,7 +238998,7 @@ "is_attribute_dict": true } }, - "1.48.0": { + "1.49.0": { "streamlit.Page": { "name": "Page", "signature": "st.Page(page, *, title=None, icon=None, url_path=None, default=False)", @@ -227411,7 +239054,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L29" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L29" }, "streamlit.altair_chart": { "name": "altair_chart", @@ -227476,7 +239119,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1631" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L1627" }, "streamlit.area_chart": { "name": "area_chart", @@ -227566,7 +239209,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L808" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L804" }, "streamlit.audio": { "name": "audio", @@ -227640,7 +239283,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/media.py#L73" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/media.py#L72" }, "streamlit.audio_input": { "name": "audio_input", @@ -227729,7 +239372,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/audio_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/audio_input.py#L88" }, "streamlit.badge": { "name": "badge", @@ -227758,7 +239401,7 @@ "type_name": "str", "is_optional": false, "is_kwarg_only": true, - "description": "

The color to use for the badge. This defaults to "blue".

\n

This can be one of the following supported colors: blue, green,\norange, red, violet, gray/grey, or primary. If you use\n"primary", Streamlit will use the default primary accent color\nunless you set the theme.primaryColor configuration option.

\n", + "description": "

The color to use for the badge. This defaults to "blue".

\n

This can be one of the following supported colors: red, orange,\nyellow, blue, green, violet, gray/grey, or primary. If you use\n"primary", Streamlit will use the default primary accent color\nunless you set the theme.primaryColor configuration option.

\n", "default": "s" }, { @@ -227771,7 +239414,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L355" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/markdown.py#L355" }, "streamlit.balloons": { "name": "balloons", @@ -227780,7 +239423,7 @@ "description": "

Draw celebratory balloons.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/balloons.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/balloons.py#L27" }, "streamlit.bar_chart": { "name": "bar_chart", @@ -227878,13 +239521,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1078" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L1074" }, "streamlit.bokeh_chart": { "name": "bokeh_chart", "signature": "st.bokeh_chart(figure, use_container_width=True)", "example": "
\nimport streamlit as st\nfrom bokeh.plotting import figure\n\nx = [1, 2, 3, 4, 5]\ny = [6, 7, 2, 4, 5]\n\np = figure(title="simple line example", x_axis_label="x", y_axis_label="y")\np.line(x, y, legend_label="Trend", line_width=2)\n\nst.bokeh_chart(p)\n
\n", - "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand.

\n

If you need a newer version of Bokeh, use our streamlit-bokeh\ncustom component instead.

\n
\n", + "description": "

Display an interactive Bokeh chart.

\n

Bokeh is a charting library for Python. The arguments to this function\nclosely follow the ones for Bokeh's show function. You can find\nmore about Bokeh at https://bokeh.pydata.org.

\n

To show Bokeh charts in Streamlit, call st.bokeh_chart\nwherever you would call Bokeh's show.

\n
\n

Important

\n

You must install bokeh==2.4.3 and numpy<2 to use this\ncommand, which is deprecated and will be removed in a future\nversion.

\n

For more current updates, use the streamlit-bokeh custom\ncomponent instead.

\n
\n", "args": [ { "name": "figure", @@ -227904,7 +239547,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/bokeh_chart.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/bokeh_chart.py#L39" }, "streamlit.button": { "name": "button", @@ -228013,7 +239656,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button.py#L90" }, "streamlit.cache": { "name": "cache", @@ -228087,11 +239730,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/legacy_cache_api.py#L33" }, "streamlit.cache_data": { "name": "cache_data", - "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, show_time=False, persist, experimental_allow_widgets, hash_funcs=None)", + "signature": "st.cache_data(func=None, *, ttl, max_entries, show_spinner, show_time=False, persist, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n\nd1 = fetch_and_clean_data(DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nd2 = fetch_and_clean_data(DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the data in d1 is the same as in d2.\n\nd3 = fetch_and_clean_data(DATA_URL_2)\n# This is a different URL, so the function executes.\n
\n

To set the persist parameter, use this command as follows:

\n
\nimport streamlit as st\n\n@st.cache_data(persist="disk")\ndef fetch_and_clean_data(url):\n    # Fetch data from URL here, and then clean it up.\n    return data\n
\n

By default, all parameters to a cached function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nconnection = make_database_connection()\nd1 = fetch_and_clean_data(connection, num_rows=10)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\nanother_connection = make_database_connection()\nd2 = fetch_and_clean_data(another_connection, num_rows=10)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _database_connection parameter was different\n# in both calls.\n
\n

A cached function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_data\ndef fetch_and_clean_data(_db_connection, num_rows):\n    # Fetch data from _db_connection here, and then clean it up.\n    return data\n\nfetch_and_clean_data.clear(_db_connection, 50)\n# Clear the cached entry for the arguments provided.\n\nfetch_and_clean_data.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. datetime.datetime) to a hash\nfunction (lambda dt: dt.isoformat()) like this:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "datetime.datetime") to the hash function instead:

\n
\nimport streamlit as st\nimport datetime\n\n@st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})\ndef convert_to_utc(dt: datetime.datetime):\n    return dt.astimezone(datetime.timezone.utc)\n
\n", "description": "

Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

\n

Cached objects are stored in "pickled" form, which means that the return\nvalue of a cached function must be pickleable. Each caller of the cached\nfunction gets its own copy of the cached data.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_data.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

Cached values are available to all users of your app. If you need to\nsave results that should only be accessible within a session, use\nSession State\ninstead. Within each user session, an @st.cache_data-decorated\nfunction returns a copy of the cached return value (if the value is\nalready cached). To cache shared global resources (singletons), use\nst.cache_resource instead. To learn more about caching, see\nCaching overview.

\n
\n

Note

\n

Caching async functions is not supported. To upvote this feature,\nsee GitHub issue #8308.

\n
\n", "args": [ @@ -228143,18 +239786,6 @@ "description": "

Optional location to persist cached data to. Passing "disk" (or True)\nwill persist the cached data to the local disk. None (or False) will disable\npersistence. The default is None.

\n", "default": "None" }, - { - "name": "experimental_allow_widgets", - "type_name": "bool", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.

\n", - "default": "False", - "deprecated": { - "deprecated": true, - "deprecatedText": "

The cached widget replay functionality was removed in 1.38. Please\nremove the experimental_allow_widgets parameter from your\ncaching decorators. This parameter will be removed in a future\nversion.

\n" - } - }, { "name": "hash_funcs", "type_name": "dict or None", @@ -228165,11 +239796,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_data_api.py#L388" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/cache_data_api.py#L384" }, "streamlit.cache_resource": { "name": "cache_resource", - "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, show_time=False, validate, experimental_allow_widgets, hash_funcs=None)", + "signature": "st.cache_resource(func, *, ttl, max_entries, show_spinner, show_time=False, validate, hash_funcs=None)", "example": "
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(url):\n    # Create a database session object that points to the URL.\n    return session\n\ns1 = get_database_session(SESSION_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(SESSION_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value. This means that now the connection object in s1 is the same as in s2.\n\ns3 = get_database_session(SESSION_URL_2)\n# This is a different URL, so the function executes.\n
\n

By default, all parameters to a cache_resource function must be hashable.\nAny parameter whose name begins with _ will not be hashed. You can use\nthis as an "escape hatch" for parameters that are not hashable:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\ns1 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Actually executes the function, since this is the first time it was\n# encountered.\n\ns2 = get_database_session(create_sessionmaker(), DATA_URL_1)\n# Does not execute the function. Instead, returns its previously computed\n# value - even though the _sessionmaker parameter was different\n# in both calls.\n
\n

A cache_resource function's cache can be procedurally cleared:

\n
\nimport streamlit as st\n\n@st.cache_resource\ndef get_database_session(_sessionmaker, url):\n    # Create a database connection object that points to the URL.\n    return connection\n\nfetch_and_clean_data.clear(_sessionmaker, "https://streamlit.io/")\n# Clear the cached entry for the arguments provided.\n\nget_database_session.clear()\n# Clear all cached entries for this function.\n
\n

To override the default hashing behavior, pass a custom hash function.\nYou can do that by mapping a type (e.g. Person) to a hash\nfunction (str) like this:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={Person: str})\ndef get_person_name(person: Person):\n    return person.name\n
\n

Alternatively, you can map the type's fully-qualified name\n(e.g. "__main__.Person") to the hash function instead:

\n
\nimport streamlit as st\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n\n@st.cache_resource(hash_funcs={"__main__.Person": str})\ndef get_person_name(person: Person):\n    return person.name\n
\n", "description": "

Decorator to cache functions that return global resources (e.g. database connections, ML models).

\n

Cached objects are shared across all users, sessions, and reruns. They\nmust be thread-safe because they can be accessed from multiple threads\nconcurrently. If thread safety is an issue, consider using st.session_state\nto store resources per session instead.

\n

You can clear a function's cache with func.clear() or clear the entire\ncache with st.cache_resource.clear().

\n

A function's arguments must be hashable to cache it. If you have an\nunhashable argument (like a database connection) or an argument you\nwant to exclude from caching, use an underscore prefix in the argument\nname. In this case, Streamlit will return a cached value when all other\narguments match a previous function call. Alternatively, you can\ndeclare custom hashing functions with hash_funcs.

\n

Cached values are available to all users of your app. If you need to\nsave results that should only be accessible within a session, use\nSession State\ninstead. Within each user session, an @st.cache_resource-decorated\nfunction returns the cached instance of the return value (if the value\nis already cached). Therefore, objects cached by st.cache_resource\nact like singletons and can mutate. To cache data and return copies,\nuse st.cache_data instead. To learn more about caching, see\nCaching overview.

\n
\n

Warning

\n

Async objects are not officially supported in Streamlit. Caching\nasync objects or objects that reference async objects may have\nunintended consequences. For example, Streamlit may close event\nloops in its normal operation and make the cached object raise an\nEvent loop closed error.

\n

To upvote official asyncio support, see GitHub issue #8488. To upvote\nsupport for caching async functions, see GitHub issue #8308.

\n
\n", "args": [ @@ -228221,18 +239852,6 @@ "description": "

An optional validation function for cached data. validate is called\neach time the cached value is accessed. It receives the cached value as\nits only parameter and it must return a boolean. If validate returns\nFalse, the current cached value is discarded, and the decorated function\nis called to compute a new value. This is useful e.g. to check the\nhealth of database connections.

\n", "default": null }, - { - "name": "experimental_allow_widgets", - "type_name": "bool", - "is_optional": false, - "is_kwarg_only": true, - "description": "

Allow widgets to be used in the cached function. Defaults to False.

\n", - "default": "False", - "deprecated": { - "deprecated": true, - "deprecatedText": "

The cached widget replay functionality was removed in 1.38. Please\nremove the experimental_allow_widgets parameter from your\ncaching decorators. This parameter will be removed in a future\nversion.

\n" - } - }, { "name": "hash_funcs", "type_name": "dict or None", @@ -228243,7 +239862,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_resource_api.py#L263" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/cache_resource_api.py#L259" }, "streamlit.camera_input": { "name": "camera_input", @@ -228332,7 +239951,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/camera_input.py#L88" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/camera_input.py#L88" }, "streamlit.caption": { "name": "caption", @@ -228374,7 +239993,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L168" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/markdown.py#L168" }, "streamlit.chat_input": { "name": "chat_input", @@ -228408,10 +240027,10 @@ }, { "name": "accept_file", - "type_name": "bool or str", + "type_name": "bool, \"multiple\", or \"directory\"", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether the chat input should accept files. This can be one of the\nfollowing values:

\n
    \n
  • False (default): No files are accepted and the user can only\nsubmit a message.
  • \n
  • True: The user can add a single file to their submission.
  • \n
  • "multiple": The user can add multiple files to their\nsubmission.
  • \n
\n

When the widget is configured to accept files, the accepted file\ntypes can be configured with the file_type parameter.

\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option.\nFor more information on how to set config options, see\nconfig.toml.

\n", + "description": "

Whether the chat input should accept files. This can be one of the\nfollowing values:

\n
    \n
  • False (default): No files are accepted and the user can only\nsubmit a message.
  • \n
  • True: The user can add a single file to their submission.
  • \n
  • "multiple": The user can add multiple files to their\nsubmission.
  • \n
  • "directory": The user can add multiple files to their\nsubmission by selecting a directory. If file_type is set,\nonly files matching those type(s) will be uploaded.
  • \n
\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option.\nFor more information on how to set config options, see\nconfig.toml.

\n", "default": null }, { @@ -228471,7 +240090,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/chat.py#L403" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/chat.py#L403" }, "streamlit.chat_message": { "name": "chat_message", @@ -228512,7 +240131,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/chat.py#L227" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/chat.py#L227" }, "streamlit.checkbox": { "name": "checkbox", @@ -228609,7 +240228,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/checkbox.py#L64" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/checkbox.py#L64" }, "streamlit.code": { "name": "code", @@ -228667,7 +240286,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/code.py#L36" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/code.py#L36" }, "streamlit.color_picker": { "name": "color_picker", @@ -228764,7 +240383,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/color_picker.py#L66" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/color_picker.py#L66" }, "streamlit.columns": { "name": "columns", @@ -228821,7 +240440,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L331" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L331" }, "streamlit.connection": { "name": "connection", @@ -228878,7 +240497,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/connection_factory.py#L206" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/connection_factory.py#L206" }, "streamlit.container": { "name": "container", @@ -228952,11 +240571,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L61" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L61" }, "streamlit.data_editor": { "name": "data_editor", - "signature": "st.data_editor(data, *, width=None, height=None, use_container_width=None, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None, row_height=None)", + "signature": "st.data_editor(data, *, width=\"stretch\", height=\"auto\", use_container_width=None, hide_index=None, column_order=None, column_config=None, num_rows=\"fixed\", disabled=False, key=None, on_change=None, args=None, kwargs=None, row_height=None)", "examples": "

Example 1: Basic usage

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(df)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Example 2: Allowing users to add and delete rows

\n

You can allow your users to add and delete rows by setting num_rows\nto "dynamic":

\n
\nimport streamlit as st\nimport pandas as pd\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(df, num_rows="dynamic")\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n

Example 3: Data editor configuration

\n

You can customize the data editor via column_config, hide_index,\ncolumn_order, or disabled:

\n
\nimport pandas as pd\nimport streamlit as st\n\ndf = pd.DataFrame(\n    [\n        {"command": "st.selectbox", "rating": 4, "is_widget": True},\n        {"command": "st.balloons", "rating": 5, "is_widget": False},\n        {"command": "st.time_input", "rating": 3, "is_widget": True},\n    ]\n)\nedited_df = st.data_editor(\n    df,\n    column_config={\n        "command": "Streamlit Command",\n        "rating": st.column_config.NumberColumn(\n            "Your rating",\n            help="How much do you like this command (1-5)?",\n            min_value=1,\n            max_value=5,\n            step=1,\n            format="%d \u2b50",\n        ),\n        "is_widget": "Widget ?",\n    },\n    disabled=["command", "is_widget"],\n    hide_index=True,\n)\n\nfavorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]\nst.markdown(f"Your favorite command is **{favorite_command}** \ud83c\udf88")\n
\n", "description": "

Display a data editor widget.

\n

The data editor widget allows you to edit dataframes and many other data structures in a table-like UI.

\n", "args": [ @@ -228965,23 +240584,23 @@ "type_name": "Anything supported by st.dataframe", "is_optional": false, "is_kwarg_only": false, - "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Text and number formatting from column_config always takes\nprecedence over text and number formatting from pandas.Styler.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, list, tuple, bytes, bytearray,\nmemoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and\npandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing\ndatetime.timedelta and pandas.Timedelta values will\ndefault to uneditable, but this can be changed through column\nconfiguration.
  • \n
\n
\n", + "description": "

The data to edit in the data editor.

\n
\n

Note

\n
    \n
  • Styles from pandas.Styler will only be applied to non-editable columns.
  • \n
  • Text and number formatting from column_config always takes\nprecedence over text and number formatting from pandas.Styler.
  • \n
  • Mixing data types within a column can make the column uneditable.
  • \n
  • Additionally, the following data types are not yet supported for editing:\ncomplex, tuple, bytes, bytearray,\nmemoryview, dict, set, frozenset,\nfractions.Fraction, pandas.Interval, and\npandas.Period.
  • \n
  • To prevent overflow in JavaScript, columns containing\ndatetime.timedelta and pandas.Timedelta values will\ndefault to uneditable, but this can be changed through column\nconfiguration.
  • \n
\n
\n", "default": "to" }, { "name": "width", - "type_name": "int or None", + "type_name": "\"stretch\", \"content\", or int", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired width of the data editor expressed in pixels. If width\nis None (default), Streamlit sets the data editor width to fit\nits contents up to the width of the parent container. If width\nis greater than the width of the parent container, Streamlit sets\nthe data editor width to match the width of the parent container.

\n", + "description": "

The width of the data editor. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the editor matches the\nwidth of the parent container.
  • \n
  • "content": The width of the editor matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The editor has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the editor matches the width\nof the parent container.
  • \n
\n", "default": null }, { "name": "height", - "type_name": "int or None", + "type_name": "int or \"auto\"", "is_optional": false, "is_kwarg_only": true, - "description": "

Desired height of the data editor expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the data editor element is\nenabled when the height does not accommodate all rows.

\n", + "description": "

The height of the data editor. This can be one of the following:

\n
    \n
  • "auto" (default): Streamlit sets the height to show at most\nten rows.
  • \n
  • An integer specifying the height in pixels: The editor has a\nfixed height.
  • \n
\n

Vertical scrolling within the data editor is enabled when the\nheight does not accommodate all rows.

\n", "default": null }, { @@ -228990,7 +240609,11 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to override width with the width of the parent\ncontainer. If this is True (default), Streamlit sets the width\nof the data editor to match the width of the parent container. If\nthis is False, Streamlit sets the data editor's width according\nto width.

\n", - "default": null + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch".

\n" + } }, { "name": "hide_index", @@ -229002,10 +240625,10 @@ }, { "name": "column_order", - "type_name": "Iterable of str or None", + "type_name": "Iterable[str] or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Specifies the display order of columns. This also affects which columns are\nvisible. For example, column_order=("col2", "col1") will display 'col2'\nfirst, followed by 'col1', and will hide all other non-index columns. If\nNone (default), the order is inherited from the original data structure.

\n", + "description": "

The ordered list of columns to display. If this is None\n(default), Streamlit displays all columns in the order inherited\nfrom the underlying data structure. If this is a list, the\nindicated columns will display in the order they appear within the\nlist. Columns may be omitted or repeated within the list.

\n

For example, column_order=("col2", "col1") will display\n"col2" first, followed by "col1", and will hide all other\nnon-index columns.

\n

column_order does not accept positional column indices and\ncan't move the index column(s).

\n", "default": null }, { @@ -229013,7 +240636,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configures how columns are displayed, e.g. their title, visibility, type, or\nformat, as well as editing properties such as min/max value or step.\nThis needs to be a dictionary where each key is a column name and the value\nis one of:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config, e.g.\nst.column_config.NumberColumn("Dollar values", format="$ %d") to show\na column as dollar amounts. See more info on the available column types\nand config options here.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configuration to customize how columns are displayed. If this is\nNone (default), columns are styled based on the underlying data\ntype of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, format, editing properties like min/max, and more. If this\nis a dictionary, the keys are column names (strings) and/or\npositional column indices (integers), and the values are one of the\nfollowing:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config. For\nexample, to show a column as dollar amounts, use\nst.column_config.NumberColumn("Dollar values", format="$ %d").\nSee more info on the available column types and config options\nhere.
  • \n
\n

To configure the index column(s), use "_index" as the column\nname, or use a positional column index where 0 refers to the\nfirst index column.

\n", "default": null }, { @@ -229026,10 +240649,10 @@ }, { "name": "disabled", - "type_name": "bool or Iterable of str", + "type_name": "bool or Iterable[str | int]", "is_optional": false, "is_kwarg_only": true, - "description": "

Controls the editing of columns. If True, editing is disabled for all columns.\nIf an Iterable of column names is provided (e.g., disabled=("col1", "col2")),\nonly the specified columns will be disabled for editing. If False (default),\nall columns that support editing are editable.

\n", + "description": "

Controls the editing of columns. This can be one of the following:

\n
    \n
  • False (default): All columns that support editing are editable.
  • \n
  • True: All columns are disabled for editing.
  • \n
  • An Iterable of column names and/or positional indices: The\nspecified columns are disabled for editing while the remaining\ncolumns are editable where supported. For example,\ndisabled=["col1", "col2"] will disable editing for the\ncolumns named "col1" and "col2".
  • \n
\n

To disable editing for the index column(s), use "_index" as the\ncolumn name, or use a positional column index where 0 refers to\nthe first index column.

\n", "default": null }, { @@ -229081,11 +240704,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/data_editor.py#L618" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/data_editor.py#L641" }, "streamlit.dataframe": { "name": "dataframe", - "signature": "st.dataframe(data=None, width=None, height=None, *, use_container_width=None, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\", row_height=None)", + "signature": "st.dataframe(data=None, width=\"stretch\", height=\"auto\", *, use_container_width=None, hide_index=None, column_order=None, column_config=None, key=None, on_select=\"ignore\", selection_mode=\"multi-row\", row_height=None)", "examples": "

Example 1: Display a dataframe

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((50, 20)), columns=("col %d" % i for i in range(20))\n)\n\nst.dataframe(df)\n
\n

Example 2: Use Pandas Styler

\n

You can also pass a Pandas Styler object to change the style of\nthe rendered DataFrame:

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((10, 20)), columns=("col %d" % i for i in range(20))\n)\n\nst.dataframe(df.style.highlight_max(axis=0))\n
\n

Example 3: Use column configuration

\n

You can customize a dataframe via column_config, hide_index, or column_order.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    {\n        "name": ["Roadmap", "Extras", "Issues"],\n        "url": [\n            "https://roadmap.streamlit.app",\n            "https://extras.streamlit.app",\n            "https://issues.streamlit.app",\n        ],\n        "stars": rng(0).integers(0, 1000, size=3),\n        "views_history": rng(0).integers(0, 5000, size=(3, 30)).tolist(),\n    }\n)\n\nst.dataframe(\n    df,\n    column_config={\n        "name": "App name",\n        "stars": st.column_config.NumberColumn(\n            "Github Stars",\n            help="Number of stars on GitHub",\n            format="%d \u2b50",\n        ),\n        "url": st.column_config.LinkColumn("App URL"),\n        "views_history": st.column_config.LineChartColumn(\n            "Views (past 30 days)", y_min=0, y_max=5000\n        ),\n    },\n    hide_index=True,\n)\n
\n

Example 4: Customize your index

\n

You can use column configuration to format your index.

\n
\nfrom datetime import datetime, date\nimport numpy as np\nimport pandas as pd\nimport streamlit as st\n\n@st.cache_data\ndef load_data():\n    year = datetime.now().year\n    df = pd.DataFrame(\n        {\n            "Date": [date(year, month, 1) for month in range(1, 4)],\n            "Total": np.random.randint(1000, 5000, size=3),\n        }\n    )\n    df.set_index("Date", inplace=True)\n    return df\n\ndf = load_data()\nconfig = {\n    "_index": st.column_config.DateColumn("Month", format="MMM YYYY"),\n    "Total": st.column_config.NumberColumn("Total ($)"),\n}\n\nst.dataframe(df, column_config=config)\n
\n", "description": "

Display a dataframe as an interactive table.

\n

This command works with a wide variety of collection-like and\ndataframe-like object types.

\n", "args": [ @@ -229099,18 +240722,18 @@ }, { "name": "width", - "type_name": "int or None", + "type_name": "\"stretch\", \"content\", or int", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired width of the dataframe expressed in pixels. If width is\nNone (default), Streamlit sets the dataframe width to fit its\ncontents up to the width of the parent container. If width is\ngreater than the width of the parent container, Streamlit sets the\ndataframe width to match the width of the parent container.

\n", + "description": "

The width of the dataframe element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null }, { "name": "height", - "type_name": "int or None", + "type_name": "int or \"auto\"", "is_optional": false, "is_kwarg_only": false, - "description": "

Desired height of the dataframe expressed in pixels. If height\nis None (default), Streamlit sets the height to show at most\nten rows. Vertical scrolling within the dataframe element is\nenabled when the height does not accommodate all rows.

\n", + "description": "

The height of the dataframe element. This can be one of the following:

\n
    \n
  • "auto" (default): Streamlit sets the height to show at most\nten rows.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height.
  • \n
\n

Vertical scrolling within the dataframe element is enabled when the\nheight does not accommodate all rows.

\n", "default": null }, { @@ -229119,7 +240742,11 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to override width with the width of the parent\ncontainer. If this is True (default), Streamlit sets the width\nof the dataframe to match the width of the parent container. If\nthis is False, Streamlit sets the dataframe's width according\nto width.

\n", - "default": null + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch".

\n" + } }, { "name": "hide_index", @@ -229131,10 +240758,10 @@ }, { "name": "column_order", - "type_name": "Iterable of str or None", + "type_name": "Iterable[str] or None", "is_optional": false, "is_kwarg_only": true, - "description": "

The ordered list of columns to display. If column_order is\nNone (default), Streamlit displays all columns in the order\ninherited from the underlying data structure. If column_order\nis a list, the indicated columns will display in the order they\nappear within the list. Columns may be omitted or repeated within\nthe list.

\n

For example, column_order=("col2", "col1") will display\n"col2" first, followed by "col1", and will hide all other\nnon-index columns.

\n", + "description": "

The ordered list of columns to display. If this is None\n(default), Streamlit displays all columns in the order inherited\nfrom the underlying data structure. If this is a list, the\nindicated columns will display in the order they appear within the\nlist. Columns may be omitted or repeated within the list.

\n

For example, column_order=("col2", "col1") will display\n"col2" first, followed by "col1", and will hide all other\nnon-index columns.

\n

column_order does not accept positional column indices and\ncan't move the index column(s).

\n", "default": null }, { @@ -229142,7 +240769,7 @@ "type_name": "dict or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Configuration to customize how columns display. If column_config\nis None (default), columns are styled based on the underlying\ndata type of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, or format, among other things. column_config must be a\ndictionary where each key is a column name and the associated value\nis one of the following:

\n
    \n
  • None: Streamlit hides the column.
  • \n
  • A string: Streamlit changes the display label of the column to\nthe given string.
  • \n
  • A column type within st.column_config: Streamlit applies the\ndefined configuration to the column. For example, use\nst.column_config.NumberColumn("Dollar values", format="$ %d")\nto change the displayed name of the column to "Dollar values"\nand add a "$" prefix in each cell. For more info on the\navailable column types and config options, see\nColumn configuration.
  • \n
\n

To configure the index column(s), use _index as the column name.

\n", + "description": "

Configuration to customize how columns are displayed. If this is\nNone (default), columns are styled based on the underlying data\ntype of each column.

\n

Column configuration can modify column names, visibility, type,\nwidth, format, and more. If this is a dictionary, the keys are\ncolumn names (strings) and/or positional column indices (integers),\nand the values are one of the following:

\n
    \n
  • None to hide the column.
  • \n
  • A string to set the display label of the column.
  • \n
  • One of the column types defined under st.column_config. For\nexample, to show a column as dollar amounts, use\nst.column_config.NumberColumn("Dollar values", format="$ %d").\nSee more info on the available column types and config options\nhere.
  • \n
\n

To configure the index column(s), use "_index" as the column\nname, or use a positional column index where 0 refers to the\nfirst index column.

\n", "default": null }, { @@ -229158,15 +240785,15 @@ "type_name": "\"ignore\" or \"rerun\" or callable", "is_optional": false, "is_kwarg_only": true, - "description": "

How the dataframe should respond to user selection events. This\ncontrols whether or not the dataframe behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the dataframe. The dataframe will not behave like an\ninput widget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\nrows or columns in the dataframe. In this case, st.dataframe\nwill return the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.dataframe will return the selection data\nas a dictionary.
  • \n
\n", + "description": "

How the dataframe should respond to user selection events. This\ncontrols whether or not the dataframe behaves like an input widget.\non_select can be one of the following:

\n
    \n
  • "ignore" (default): Streamlit will not react to any selection\nevents in the dataframe. The dataframe will not behave like an\ninput widget.
  • \n
  • "rerun": Streamlit will rerun the app when the user selects\nrows, columns, or cells in the dataframe. In this case,\nst.dataframe will return the selection data as a dictionary.
  • \n
  • A callable: Streamlit will rerun the app and execute the\ncallable as a callback function before the rest of the app.\nIn this case, st.dataframe will return the selection data\nas a dictionary.
  • \n
\n", "default": null }, { "name": "selection_mode", - "type_name": "\"single-row\", \"multi-row\", \"single-column\", \"multi-column\", or Iterable of these", + "type_name": "\"single-row\", \"multi-row\", \"single-column\", \"multi-column\", \"single-cell\", \"multi-cell\", or Iterable of these", "is_optional": false, "is_kwarg_only": true, - "description": "

The types of selections Streamlit should allow when selections are\nenabled with on_select. This can be one of the following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified.
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", + "description": "

The types of selections Streamlit should allow when selections are\nenabled with on_select. This can be one of the following:

\n
    \n
  • "multi-row" (default): Multiple rows can be selected at a time.
  • \n
  • "single-row": Only one row can be selected at a time.
  • \n
  • "multi-column": Multiple columns can be selected at a time.
  • \n
  • "single-column": Only one column can be selected at a time.
  • \n
  • "multi-cell": A rectangular range of cells can be selected.
  • \n
  • "single-cell": Only one cell can be selected at a time.
  • \n
  • An Iterable of the above options: The table will allow\nselection based on the modes specified. For example, to allow the\nuser to select multiple rows and multiple cells, use\n["multi-row", "multi-cell"].
  • \n
\n

When column selections are enabled, column sorting is disabled.

\n", "default": null }, { @@ -229186,7 +240813,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L260" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/arrow.py#L308" }, "streamlit.date_input": { "name": "date_input", @@ -229307,7 +240934,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/time_widgets.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/time_widgets.py#L652" }, "streamlit.dialog": { "name": "dialog", @@ -229325,10 +240952,10 @@ }, { "name": "width", - "type_name": "\"small\", \"large\"", + "type_name": "\"small\", \"medium\", \"large\"", "is_optional": false, "is_kwarg_only": true, - "description": "

The width of the modal dialog. If width is "small (default), the\nmodal dialog will be 500 pixels wide. If width is "large", the\nmodal dialog will be about 750 pixels wide.

\n", + "description": "

The width of the modal dialog. This can be one of the following:

\n
    \n
  • "small" (default): The modal dialog will be a maximum of 500\npixels wide.
  • \n
  • "medium": The modal dialog will be up to 750 pixels wide.
  • \n
  • "large": The modal dialog will be up to 1280 pixels wide.
  • \n
\n", "default": null }, { @@ -229349,7 +240976,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/dialog_decorator.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/dialog_decorator.py#L133" }, "streamlit.divider": { "name": "divider", @@ -229367,7 +240994,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L318" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/markdown.py#L318" }, "streamlit.download_button": { "name": "download_button", @@ -229500,7 +241127,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L283" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button.py#L283" }, "streamlit.echo": { "name": "echo", @@ -229518,7 +241145,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/echo.py#L33" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/echo.py#L33" }, "streamlit.empty": { "name": "empty", @@ -229527,7 +241154,7 @@ "description": "

Insert a single-element container.

\n

Inserts a container into your app that can be used to hold a single element.\nThis allows you to, for example, remove elements at any point, or replace\nseveral elements at once (using a child multi-element container).

\n

To insert/replace/clear an element on the returned container, you can\nuse with notation or just call methods directly on the returned object.\nSee examples below.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/empty.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/empty.py#L28" }, "streamlit.error": { "name": "error", @@ -229561,7 +241188,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L32" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/alert.py#L32" }, "streamlit.exception": { "name": "exception", @@ -229587,7 +241214,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/exception.py#L49" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/exception.py#L49" }, "streamlit.expander": { "name": "expander", @@ -229629,23 +241256,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L681" - }, - "streamlit.experimental_dialog": { - "name": "experimental_dialog", - "signature": "st.experimental_dialog(title, *, width=\"small\")", - "description": "

Deprecated alias for @st.dialog.

\n

See the docstring for the decorator's new name.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/dialog_decorator.py#L315" - }, - "streamlit.experimental_fragment": { - "name": "experimental_fragment", - "signature": "st.experimental_fragment(func=None, *, run_every=None)", - "description": "

Deprecated alias for @st.fragment. See the docstring for the decorator's new name.

\n", - "args": [], - "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/fragment.py#L472" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L681" }, "streamlit.experimental_get_query_params": { "name": "experimental_get_query_params", @@ -229661,7 +241272,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/experimental_query_params.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/experimental_query_params.py#L31" }, "streamlit.experimental_set_query_params": { "name": "experimental_set_query_params", @@ -229679,7 +241290,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/experimental_query_params.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/experimental_query_params.py#L69" }, "streamlit.feedback": { "name": "feedback", @@ -229752,12 +241363,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L297" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button_group.py#L297" }, "streamlit.file_uploader": { "name": "file_uploader", "signature": "st.file_uploader(label, type=None, accept_multiple_files=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False, label_visibility=\"visible\", width=\"stretch\")", - "examples": "

Insert a file uploader that accepts a single file at a time:

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Insert a file uploader that accepts multiple files at a time:

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Choose a CSV file", accept_multiple_files=True\n)\nfor uploaded_file in uploaded_files:\n    bytes_data = uploaded_file.read()\n    st.write("filename:", uploaded_file.name)\n    st.write(bytes_data)\n
\n", + "examples": "

Example 1: Accept a single file at a time

\n
\nimport streamlit as st\nimport pandas as pd\nfrom io import StringIO\n\nuploaded_file = st.file_uploader("Choose a file")\nif uploaded_file is not None:\n    # To read file as bytes:\n    bytes_data = uploaded_file.getvalue()\n    st.write(bytes_data)\n\n    # To convert to a string based IO:\n    stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))\n    st.write(stringio)\n\n    # To read file as string:\n    string_data = stringio.read()\n    st.write(string_data)\n\n    # Can be used wherever a "file-like" object is accepted:\n    dataframe = pd.read_csv(uploaded_file)\n    st.write(dataframe)\n
\n

Example 2: Accept multiple files at a time

\n
\nimport pandas as pd\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Upload data", accept_multiple_files=True, type="csv"\n)\nfor uploaded_file in uploaded_files:\n    df = pd.read_csv(uploaded_file)\n    st.write(df)\n
\n

Example 3: Accept an entire directory

\n
\nimport streamlit as st\n\nuploaded_files = st.file_uploader(\n    "Upload images", accept_multiple_files="directory", type=["jpg", "png"]\n)\nfor uploaded_file in uploaded_files:\n    st.image(uploaded_file)\n
\n", "description": "

Display a file uploader widget.

\n

By default, uploaded files are limited to 200 MB each. You can\nconfigure this using the server.maxUploadSize config option. For\nmore information on how to set config options, see config.toml.

\n", "args": [ { @@ -229770,7 +241381,7 @@ }, { "name": "type", - "type_name": "str or list of str or None", + "type_name": "str, list of str, or None", "is_optional": false, "is_kwarg_only": false, "description": "

The allowed file extension(s) for uploaded files. This can be one\nof the following types:

\n
    \n
  • None (default): All file extensions are allowed.
  • \n
  • A string: A single file extension is allowed. For example, to\nonly accept CSV files, use "csv".
  • \n
  • A sequence of strings: Multiple file extensions are allowed. For\nexample, to only accept JPG/JPEG and PNG files, use\n["jpg", "jpeg", "png"].
  • \n
\n
\n

Note

\n

This is a best-effort check, but doesn't provide a\nsecurity guarantee against users uploading files of other types\nor type extensions. The correct handling of uploaded files is\npart of the app developer's responsibility.

\n
\n", @@ -229778,10 +241389,10 @@ }, { "name": "accept_multiple_files", - "type_name": "bool", + "type_name": "bool or \"directory\"", "is_optional": false, "is_kwarg_only": false, - "description": "

Whether to accept more than one file in a submission. If this is\nFalse (default), the user can only submit one file at a time.\nIf this is True, the user can upload multiple files at the same\ntime, in which case the return value will be a list of files.

\n", + "description": "

Whether to accept more than one file in a submission. This can be one\nof the following values:

\n
    \n
  • False (default): The user can only submit one file at a time.
  • \n
  • True: The user can upload multiple files at the same time.
  • \n
  • "directory": The user can select a directory to upload all\nfiles in the directory and its subdirectories. If type is\nset, only files matching those type(s) will be uploaded.
  • \n
\n

When this is True or "directory", the return value will be\na list and a user can additively select files if they click the\nbrowse button on the widget multiple times.

\n", "default": null }, { @@ -229853,11 +241464,11 @@ { "type_name": "None, UploadedFile, or list of UploadedFile", "is_generator": false, - "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True, returns a list with the\nuploaded files as UploadedFile objects. If no files were\nuploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and therefore is\n"file-like". This means you can pass an instance of it anywhere a\nfile is expected.

\n", + "description": "
    \n
  • If accept_multiple_files is False, returns either None or\nan UploadedFile object.
  • \n
  • If accept_multiple_files is True or "directory", returns\na list with the uploaded files as UploadedFile objects. If no\nfiles were uploaded, returns an empty list.
  • \n
\n

The UploadedFile class is a subclass of BytesIO, and\ntherefore is "file-like". This means you can pass an instance of it\nanywhere a file is expected.

\n", "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/file_uploader.py#L240" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/file_uploader.py#L251" }, "streamlit.form": { "name": "form", @@ -229915,11 +241526,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/form.py#L70" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/form.py#L71" }, "streamlit.form_submit_button": { "name": "form_submit_button", - "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", + "signature": "st.form_submit_button(label=\"Submit\", help=None, on_click=None, args=None, kwargs=None, *, key=None, type=\"secondary\", icon=None, disabled=False, use_container_width=None, width=\"content\")", "description": "

Display a form submit button.

\n

When this button is clicked, all widget values inside the form will be\nsent from the user's browser to your Streamlit server in a batch.

\n

Every form must have at least one st.form_submit_button. An\nst.form_submit_button cannot exist outside of a form.

\n

For more information about forms, check out our docs.

\n", "args": [ { @@ -229962,6 +241573,14 @@ "description": "

An optional dict of kwargs to pass to the callback.

\n", "default": null }, + { + "name": "key", + "type_name": "str or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

An optional string or integer to use as the unique key for the widget.\nIf this is omitted, a key will be generated for the widget\nbased on its content. No two widgets may have the same key.

\n", + "default": null + }, { "name": "type", "type_name": "\"primary\", \"secondary\", or \"tertiary\"", @@ -230015,7 +241634,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/form.py#L237" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/form.py#L238" }, "streamlit.fragment": { "name": "fragment", @@ -230041,7 +241660,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/fragment.py#L307" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/fragment.py#L293" }, "streamlit.get_option": { "name": "get_option", @@ -230059,13 +241678,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/config.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/config.py#L178" }, "streamlit.graphviz_chart": { "name": "graphviz_chart", - "signature": "st.graphviz_chart(figure_or_dot, use_container_width=False)", + "signature": "st.graphviz_chart(figure_or_dot, use_container_width=None, *, width=\"content\")", "example": "
\nimport streamlit as st\nimport graphviz\n\n# Create a graphlib graph object\ngraph = graphviz.Digraph()\ngraph.edge("run", "intr")\ngraph.edge("intr", "runbl")\ngraph.edge("runbl", "run")\ngraph.edge("run", "kernel")\ngraph.edge("kernel", "zombie")\ngraph.edge("kernel", "sleep")\ngraph.edge("kernel", "runmem")\ngraph.edge("sleep", "swap")\ngraph.edge("swap", "runswap")\ngraph.edge("runswap", "new")\ngraph.edge("runswap", "runmem")\ngraph.edge("new", "runmem")\ngraph.edge("sleep", "runmem")\n\nst.graphviz_chart(graph)\n
\n

Or you can render the chart from the graph using GraphViz's Dot\nlanguage:

\n
\nst.graphviz_chart('''\n    digraph {\n        run -> intr\n        intr -> runbl\n        runbl -> run\n        run -> kernel\n        kernel -> zombie\n        kernel -> sleep\n        kernel -> runmem\n        sleep -> swap\n        swap -> runswap\n        runswap -> new\n        runswap -> runmem\n        new -> runmem\n        sleep -> runmem\n    }\n''')\n
\n", - "description": "

Display a graph using the dagre-d3 library.

\n
\n

Important

\n

You must install graphviz>=0.19.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", + "description": "

Display a graph using the dagre-d3 library.

\n
\n

Important

\n

You must install graphviz>=0.19.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "figure_or_dot", @@ -230081,11 +241700,23 @@ "is_optional": false, "is_kwarg_only": false, "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is False\n(default), Streamlit sets the width of the chart to fit its contents\naccording to the plotting library, up to the width of the parent\ncontainer. If use_container_width is True, Streamlit sets\nthe width of the figure to match the width of the parent container.

\n", + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } + }, + { + "name": "width", + "type_name": "\"content\", \"stretch\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the chart element. This can be one of the following:

\n
    \n
  • "content" (default): The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the element matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/graphviz_chart.py#L40" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/graphviz_chart.py#L49" }, "streamlit.header": { "name": "header", @@ -230119,10 +241750,10 @@ }, { "name": "divider", - "type_name": "bool, \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", + "type_name": "bool, \"blue\", \"green\", \"orange\", \"red\", \"violet\", \"yellow\", \"gray\"/\"grey\", or \"rainbow\"", "is_optional": false, "is_kwarg_only": true, - "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", + "description": "

Shows a colored divider below the header. If this is True,\nsuccessive headers will cycle through divider colors, except gray\nand rainbow. That is, the first header will have a blue line, the\nsecond header will have a green line, and so on. If this is a\nstring, the color can be set to one of the following: blue, green,\norange, red, violet, yellow, gray/grey, or rainbow.

\n", "default": null }, { @@ -230135,7 +241766,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L45" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/heading.py#L45" }, "streamlit.help": { "name": "help", @@ -230161,7 +241792,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/doc_string.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/doc_string.py#L47" }, "streamlit.html": { "name": "html", @@ -230187,11 +241818,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/html.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/html.py#L39" }, "streamlit.image": { "name": "image", - "signature": "st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\", *, use_container_width=False)", + "signature": "st.image(image, caption=None, width=\"content\", use_column_width=None, clamp=False, channels=\"RGB\", output_format=\"auto\", *, use_container_width=None)", "example": "
\nimport streamlit as st\nst.image("sunrise.jpg", caption="Sunrise by the mountains")\n
\n", "description": "

Display an image or list of images.

\n", "args": [ @@ -230213,10 +241844,10 @@ }, { "name": "width", - "type_name": "int or None", + "type_name": "\"content\", \"stretch\", or int", "is_optional": false, "is_kwarg_only": false, - "description": "

Image width. If this is None (default), Streamlit will use the\nimage's native width, up to the width of the parent container.\nWhen using an SVG image without a default width, you should declare\nwidth or use use_container_width=True.

\n", + "description": "

The width of the image element. This can be one of the following:

\n
    \n
  • "content" (default): The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • "stretch": The width of the element matches the width of the\nparent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n

When using an SVG image without a default width, use "stretch"\nor an integer.

\n", "default": "width" }, { @@ -230225,11 +241856,7 @@ "is_optional": false, "is_kwarg_only": false, "description": "

If "auto", set the image's width to its natural size,\nbut do not exceed the width of the column.\nIf "always" or True, set the image's width to the column width.\nIf "never" or False, set the image's width to its natural size.\nNote: if set, use_column_width takes precedence over the width parameter.

\n", - "default": null, - "deprecated": { - "deprecated": true, - "deprecatedText": "

use_column_width is deprecated and will be removed in a future\nrelease. Please use the use_container_width parameter instead.

\n" - } + "default": null }, { "name": "clamp", @@ -230261,11 +241888,15 @@ "is_optional": false, "is_kwarg_only": true, "description": "

Whether to override width with the width of the parent\ncontainer. If use_container_width is False (default),\nStreamlit sets the image's width according to width. If\nuse_container_width is True, Streamlit sets the width of\nthe image to match the width of the parent container.

\n", - "default": null + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/image.py#L47" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/image.py#L50" }, "streamlit.info": { "name": "info", @@ -230299,7 +241930,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L177" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/alert.py#L177" }, "streamlit.json": { "name": "json", @@ -230333,7 +241964,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/json.py#L48" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/json.py#L48" }, "streamlit.latex": { "name": "latex", @@ -230367,7 +241998,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L248" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/markdown.py#L248" }, "streamlit.line_chart": { "name": "line_chart", @@ -230449,7 +242080,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L589" }, "streamlit.link_button": { "name": "link_button", @@ -230527,7 +242158,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L593" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button.py#L593" }, "streamlit.login": { "name": "login", @@ -230545,7 +242176,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L55" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/user_info.py#L55" }, "streamlit.logo": { "name": "logo", @@ -230587,16 +242218,16 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/logo.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/logo.py#L38" }, "streamlit.logout": { "name": "logout", "signature": "st.logout()", "example": "

.streamlit/secrets.toml:

\n
\n[auth]\nredirect_uri = "http://localhost:8501/oauth2callback"\ncookie_secret = "xxx"\nclient_id = "xxx"\nclient_secret = "xxx"\nserver_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"  # fmt: skip\n
\n

Your app code:

\n
\nimport streamlit as st\n\nif not st.user.is_logged_in:\n    if st.button("Log in"):\n        st.login()\nelse:\n    if st.button("Log out"):\n        st.logout()\n    st.write(f"Hello, {st.user.name}!")\n
\n", - "description": "

Logout the current user.

\n

This command removes the user's information from st.user and deletes\ntheir Streamlit identity cookie. If the OpenID Connect (OIDC) provider's\nserver metadata includes end_session_endpoint, this command also\nredirects the user to perform a logout from the identity provider before\nreturning to your app. Otherwise, it only performs a local logout from your\napp. This creates a new session.

\n

If the user has multiple sessions open in the same browser, st.user\nwill not be cleared in any other session. st.user only reads from the\nidentity cookie at the start of a session. After a session is running, you\nmust call st.login() or st.logout() within that session to update\nst.user.

\n", + "description": "

Logout the current user.

\n

This command removes the user's information from st.user,\ndeletes their identity cookie, and redirects them back to your app's home\npage. This creates a new session.

\n

If the user has multiple sessions open in the same browser,\nst.user will not be cleared in any other session.\nst.user only reads from the identity cookie at the start\nof a session. After a session is running, you must call st.login() or\nst.logout() within that session to update st.user.

\n
\n

Note

\n

This does not log the user out of their underlying account from the\nidentity provider.

\n
\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L298" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/user_info.py#L300" }, "streamlit.map": { "name": "map", @@ -230678,7 +242309,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/map.py#L78" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/map.py#L78" }, "streamlit.markdown": { "name": "markdown", @@ -230691,7 +242322,7 @@ "type_name": "any", "is_optional": false, "is_kwarg_only": false, - "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: blue, green, orange, red, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
  • Colored badges, using the syntax :color-badge[text in the badge].\ncolor must be replaced with any of the following supported\ncolors: blue, green, orange, red, violet, gray/grey, or primary.\nFor example, you can use :orange-badge[your text here] or\n:blue-badge[your text here].
  • \n
  • Small text, using the syntax :small[text to show small].
  • \n
\n", + "description": "

The text to display as GitHub-flavored Markdown. Syntax\ninformation can be found at: https://github.github.com/gfm.\nIf anything other than a string is passed, it will be converted\ninto a string behind the scenes using str(body).

\n

This also supports:

\n
    \n
  • Emoji shortcodes, such as :+1: and :sunglasses:.\nFor a list of all supported codes,\nsee https://share.streamlit.io/streamlit/emoji-shortcodes.
  • \n
  • Streamlit logo shortcode. Use :streamlit: to add a little\nStreamlit flair to your text.
  • \n
  • A limited set of typographical symbols. "<- -> <-> -- >= <= ~="\nbecomes "\u2190 \u2192 \u2194 \u2014 \u2265 \u2264 \u2248" when parsed as Markdown.
  • \n
  • Google Material Symbols (rounded style), using the syntax\n:material/icon_name:, where "icon_name" is the name of the\nicon in snake case. For a complete list of icons, see Google's\nMaterial Symbols\nfont library.
  • \n
  • LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"\nmust be on their own lines). Supported LaTeX functions are listed\nat https://katex.org/docs/supported.html.
  • \n
  • Colored text and background colors for text, using the syntax\n:color[text to be colored] and :color-background[text to be colored],\nrespectively. color must be replaced with any of the following\nsupported colors: red, orange, yellow, green, blue, violet, gray/grey,\nrainbow, or primary. For example, you can use\n:orange[your text here] or :blue-background[your text here].\nIf you use "primary" for color, Streamlit will use the default\nprimary accent color unless you set the theme.primaryColor\nconfiguration option.
  • \n
  • Colored badges, using the syntax :color-badge[text in the badge].\ncolor must be replaced with any of the following supported\ncolors: red, orange, yellow, green, blue, violet, gray/grey, or primary.\nFor example, you can use :orange-badge[your text here] or\n:blue-badge[your text here].
  • \n
  • Small text, using the syntax :small[text to show small].
  • \n
\n", "default": "primary" }, { @@ -230720,12 +242351,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/markdown.py#L39" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/markdown.py#L39" }, "streamlit.metric": { "name": "metric", - "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", help=None, label_visibility=\"visible\", border=False, width=\"stretch\", height=\"content\")", - "examples": "

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers", value=123, delta=123, delta_color="off"\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n", + "signature": "st.metric(label, value, delta=None, delta_color=\"normal\", *, help=None, label_visibility=\"visible\", border=False, width=\"stretch\", height=\"content\", chart_data=None, chart_type=\"line\")", + "examples": "

Example 1: Show a metric

\n
\nimport streamlit as st\n\nst.metric(label="Temperature", value="70 \u00b0F", delta="1.2 \u00b0F")\n
\n

Example 2: Create a row of metrics

\n

st.metric looks especially nice in combination with st.columns.

\n
\nimport streamlit as st\n\ncol1, col2, col3 = st.columns(3)\ncol1.metric("Temperature", "70 \u00b0F", "1.2 \u00b0F")\ncol2.metric("Wind", "9 mph", "-8%")\ncol3.metric("Humidity", "86%", "4%")\n
\n

Example 3: Modify the delta indicator

\n

The delta indicator color can also be inverted or turned off.

\n
\nimport streamlit as st\n\nst.metric(label="Gas price", value=4, delta=-0.5, delta_color="inverse")\n\nst.metric(\n    label="Active developers",\n    value=123,\n    delta=123,\n    delta_color="off",\n)\n
\n

Example 4: Create a grid of metric cards

\n

Add borders to your metrics to create a dashboard look.

\n
\nimport streamlit as st\n\na, b = st.columns(2)\nc, d = st.columns(2)\n\na.metric("Temperature", "30\u00b0F", "-9\u00b0F", border=True)\nb.metric("Wind", "4 mph", "2 mph", border=True)\n\nc.metric("Humidity", "77%", "5%", border=True)\nd.metric("Pressure", "30.34 inHg", "-2 inHg", border=True)\n
\n

Example 5: Show sparklines

\n

To show trends over time, add sparklines.

\n
\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\nchanges = list(rng(4).standard_normal(20))\ndata = [sum(changes[:i]) for i in range(20)]\ndelta = round(data[-1], 2)\n\nrow = st.container(horizontal=True)\nwith row:\n    st.metric(\n        "Line", 10, delta, chart_data=data, chart_type="line", border=True\n    )\n    st.metric(\n        "Area", 10, delta, chart_data=data, chart_type="area", border=True\n    )\n    st.metric(\n        "Bar", 10, delta, chart_data=data, chart_type="bar", border=True\n    )\n
\n", "description": "

Display a metric in big bold font, with an optional indicator of how the metric changed.

\n

Tip: If you want to display a large number, it may be a good idea to\nshorten it using packages like millify\nor numerize. E.g. 1234 can be\ndisplayed as 1.2k using st.metric("Short number", millify(1234)).

\n", "args": [ { @@ -230764,7 +242395,7 @@ "name": "help", "type_name": "str or None", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

A tooltip that gets displayed next to the metric label. Streamlit\nonly displays the tooltip when label_visibility="visible". If\nthis is None (default), no tooltip is displayed.

\n

The tooltip can optionally contain GitHub-flavored Markdown,\nincluding the Markdown directives described in the body\nparameter of st.markdown.

\n", "default": null }, @@ -230772,7 +242403,7 @@ "name": "label_visibility", "type_name": "\"visible\", \"hidden\", or \"collapsed\"", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

The visibility of the label. The default is "visible". If this\nis "hidden", Streamlit displays an empty spacer instead of the\nlabel, which can help keep the widget aligned with other widgets.\nIf this is "collapsed", Streamlit displays no label or spacer.

\n", "default": "is" }, @@ -230780,7 +242411,7 @@ "name": "border", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

Whether to show a border around the metric container. If this is\nFalse (default), no border is shown. If this is True, a\nborder is shown.

\n", "default": null }, @@ -230788,7 +242419,7 @@ "name": "height", "type_name": "\"content\", \"stretch\", or int", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

The height of the metric element. This can be one of the following:

\n
    \n
  • "content" (default): The height of the element matches the\nheight of its content.
  • \n
  • "stretch": The height of the element matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the element is not in a parent container, the height\nof the element matches the height of its content.
  • \n
  • An integer specifying the height in pixels: The element has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled.
  • \n
\n", "default": null }, @@ -230796,13 +242427,29 @@ "name": "width", "type_name": "\"stretch\", \"content\", or int", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

The width of the metric element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the width of its\ncontent, but doesn't exceed the width of the parent container.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", "default": null + }, + { + "name": "chart_data", + "type_name": "Iterable or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

A sequence of numeric values to display as a sparkline chart. If\nthis is None (default), no chart is displayed. The sequence can\nbe anything supported by st.dataframe, including a list or\nset. If the sequence is dataframe-like, the first column will\nbe used. Each value will be cast to float internally by\ndefault.

\n", + "default": null + }, + { + "name": "chart_type", + "type_name": "\"line\", \"bar\", or \"area\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The type of sparkline chart to display. This can be one of the\nfollowing:

\n
    \n
  • "line" (default): A simple sparkline.
  • \n
  • "area": A sparkline with area shading.
  • \n
  • "bar": A bar chart.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/metric.py#L58" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/metric.py#L59" }, "streamlit.multiselect": { "name": "multiselect", @@ -230939,7 +242586,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/multiselect.py#L233" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/multiselect.py#L233" }, "streamlit.navigation": { "name": "navigation", @@ -230980,7 +242627,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/navigation.py#L82" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/navigation.py#L82" }, "streamlit.number_input": { "name": "number_input", @@ -231125,7 +242772,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/number_input.py#L216" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/number_input.py#L216" }, "streamlit.page_link": { "name": "page_link", @@ -231195,7 +242842,33 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button.py#L733" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button.py#L733" + }, + "streamlit.pdf": { + "name": "pdf", + "signature": "st.pdf(data, *, height=500, key=None)", + "example": "
\nst.pdf("https://example.com/sample.pdf")\nst.pdf("https://example.com/sample.pdf", height=600)\n
\n", + "description": "

Display a PDF viewer.

\n
\n

Important

\n

You must install streamlit-pdf to use this command. You can\ninstall it as an extra with Streamlit:

\n
\npip install streamlit[pdf]\n
\n
\n", + "args": [ + { + "name": "data", + "type_name": "str, Path, BytesIO, or bytes", + "is_optional": false, + "is_kwarg_only": false, + "description": "

The PDF file to show. This can be one of the following:

\n
    \n
  • A URL (string) for a hosted PDF file.
  • \n
  • A path to a local PDF file. If you use a relative path, it must\nbe relative to the current working directory.
  • \n
  • A file-like object. For example, this can be an UploadedFile\nfrom st.file_uploader, or this can be a local file opened\nwith open().
  • \n
  • Raw bytes data.
  • \n
\n", + "default": null + }, + { + "name": "height", + "type_name": "int or \"stretch\"", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The height of the PDF viewer. This can be one of the following:

\n
    \n
  • An integer specifying the height in pixels: The viewer has a\nfixed height. If the content is larger than the specified\nheight, scrolling is enabled. This is 500 by default.
  • \n
  • "stretch": The height of the viewer matches the height of\nits content or the height of the parent container, whichever is\nlarger. If the viewer is not in a parent container, the height\nof the viewer matches the height of its content.
  • \n
\n", + "default": null + } + ], + "returns": [], + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/pdf.py#L53" }, "streamlit.pills": { "name": "pills", @@ -231316,13 +242989,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L471" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button_group.py#L471" }, "streamlit.plotly_chart": { "name": "plotly_chart", "signature": "st.plotly_chart(figure_or_data, use_container_width=True, *, theme=\"streamlit\", key=None, on_select=\"ignore\", selection_mode=('points', 'box', 'lasso'), **kwargs)", "examples": "

Example 1: Basic Plotly chart

\n

The example below comes from the examples at https://plot.ly/python.\nNote that plotly.figure_factory requires scipy to run.

\n
\nimport plotly.figure_factory as ff\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\nhist_data = [\n    rng(0).standard_normal(200) - 2,\n    rng(1).standard_normal(200),\n    rng(2).standard_normal(200) + 2,\n]\ngroup_labels = ["Group 1", "Group 2", "Group 3"]\n\nfig = ff.create_distplot(\n    hist_data, group_labels, bin_size=[0.1, 0.25, 0.5]\n)\n\nst.plotly_chart(fig)\n
\n

Example 2: Plotly Chart with configuration

\n

By default, Plotly charts have scroll zoom enabled. If you have a\nlonger page and want to avoid conflicts between page scrolling and\nzooming, you can use Plotly's configuration options to disable scroll\nzoom. In the following example, scroll zoom is disabled, but the zoom\nbuttons are still enabled in the modebar.

\n
\nimport plotly.graph_objects as go\nimport streamlit as st\n\nfig = go.Figure()\nfig.add_trace(\n    go.Scatter(\n        x=[1, 2, 3, 4, 5],\n        y=[1, 3, 2, 5, 4]\n    )\n)\n\nst.plotly_chart(fig, config = {'scrollZoom': False})\n
\n", - "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly>=4.0.0 to use this command. Your app's\nperformance may be enhanced by installing orjson as well. You\ncan install all charting dependencies (except Bokeh) as an extra\nwith Streamlit:

\n
\npip install streamlit[charts]\n
\n
\n", + "description": "

Display an interactive Plotly chart.

\n

Plotly is a charting library for Python.\nThe arguments to this function closely follow the ones for Plotly's\nplot() function.

\n

To show Plotly charts in Streamlit, call st.plotly_chart wherever\nyou would call Plotly's py.plot or py.iplot.

\n
\n

Important

\n

You must install plotly>=4.0.0 to use this command. Your app's\nperformance may be enhanced by installing orjson as well. You\ncan install all charting dependencies (except Bokeh) as an extra\nwith Streamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "figure_or_data", @@ -231389,7 +243062,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L305" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/plotly_chart.py#L305" }, "streamlit.popover": { "name": "popover", @@ -231451,7 +243124,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L813" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L813" }, "streamlit.progress": { "name": "progress", @@ -231485,7 +243158,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/progress.py#L94" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/progress.py#L94" }, "streamlit.pydeck_chart": { "name": "pydeck_chart", @@ -231558,13 +243231,13 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/deck_gl_json_chart.py#L290" }, "streamlit.pyplot": { "name": "pyplot", - "signature": "st.pyplot(fig=None, clear_figure=None, use_container_width=True, **kwargs)", + "signature": "st.pyplot(fig=None, clear_figure=None, *, width=\"stretch\", use_container_width=None, **kwargs)", "example": "
\nimport matplotlib.pyplot as plt\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\narr = rng(0).normal(1, 1, size=100)\nfig, ax = plt.subplots()\nax.hist(arr, bins=20)\n\nst.pyplot(fig)\n
\n

Matplotlib supports several types of "backends". If you're getting an\nerror using Matplotlib with Streamlit, try setting your backend to "TkAgg":

\n
\necho "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n
\n

For more information, see https://matplotlib.org/faq/usage_faq.html.

\n", - "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib>=3.0.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", + "description": "

Display a matplotlib.pyplot figure.

\n
\n

Important

\n

You must install matplotlib>=3.0.0 to use this command. You can\ninstall all charting dependencies (except Bokeh) as an extra with\nStreamlit:

\n
\npip install streamlit[charts]\n
\n
\n", "args": [ { "name": "fig", @@ -231582,13 +243255,25 @@ "description": "

If True, the figure will be cleared after being rendered.\nIf False, the figure will not be cleared after being rendered.\nIf left unspecified, we pick a default based on the value of fig.

\n
    \n
  • If fig is set, defaults to False.
  • \n
  • If fig is not set, defaults to True. This simulates Jupyter's\napproach to matplotlib rendering.
  • \n
\n", "default": "based" }, + { + "name": "width", + "type_name": "\"stretch\", \"content\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The width of the chart element. This can be one of the following:

\n
    \n
  • "stretch" (default): The width of the element matches the\nwidth of the parent container.
  • \n
  • "content": The width of the element matches the\nwidth of its content, but doesn't exceed the width of the parent\ncontainer.
  • \n
  • An integer specifying the width in pixels: The element has a\nfixed width. If the specified width is greater than the width of\nthe parent container, the width of the element matches the width\nof the parent container.
  • \n
\n", + "default": null + }, { "name": "use_container_width", "type_name": "bool", "is_optional": false, - "is_kwarg_only": false, + "is_kwarg_only": true, "description": "

Whether to override the figure's native width with the width of\nthe parent container. If use_container_width is True\n(default), Streamlit sets the width of the figure to match the\nwidth of the parent container. If use_container_width is\nFalse, Streamlit sets the width of the chart to fit its\ncontents according to the plotting library, up to the width of the\nparent container.

\n", - "default": null + "default": null, + "deprecated": { + "deprecated": true, + "deprecatedText": "

use_container_width is deprecated and will be removed in a\nfuture release. For use_container_width=True, use\nwidth="stretch". For use_container_width=False, use\nwidth="content".

\n" + } }, { "name": "**kwargs", @@ -231600,7 +243285,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/pyplot.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/pyplot.py#L38" }, "streamlit.radio": { "name": "radio", @@ -231729,7 +243414,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/radio.py#L150" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/radio.py#L150" }, "streamlit.rerun": { "name": "rerun", @@ -231746,7 +243431,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L102" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/execution_control.py#L102" }, "streamlit.scatter_chart": { "name": "scatter_chart", @@ -231836,7 +243521,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1375" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L1371" }, "streamlit.segmented_control": { "name": "segmented_control", @@ -231957,7 +243642,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/button_group.py#L698" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/button_group.py#L698" }, "streamlit.select_slider": { "name": "select_slider", @@ -232070,7 +243755,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/select_slider.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/select_slider.py#L147" }, "streamlit.selectbox": { "name": "selectbox", @@ -232199,7 +243884,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/selectbox.py#L270" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/selectbox.py#L270" }, "streamlit.set_option": { "name": "set_option", @@ -232225,7 +243910,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/config.py#L128" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/config.py#L129" }, "streamlit.set_page_config": { "name": "set_page_config", @@ -232275,7 +243960,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/page_config.py#L109" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/page_config.py#L112" }, "streamlit.slider": { "name": "slider", @@ -232404,7 +244089,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/slider.py#L430" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/slider.py#L430" }, "streamlit.snow": { "name": "snow", @@ -232413,7 +244098,7 @@ "description": "

Draw celebratory snowfall.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/snow.py#L27" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/snow.py#L27" }, "streamlit.spinner": { "name": "spinner", @@ -232447,7 +244132,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/spinner.py#L37" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/spinner.py#L37" }, "streamlit.status": { "name": "status", @@ -232496,7 +244181,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L982" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L982" }, "streamlit.stop": { "name": "stop", @@ -232505,7 +244190,7 @@ "description": "

Stops execution immediately.

\n

Streamlit will not run any statements after st.stop().\nWe recommend rendering a message to explain why the script has stopped.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L34" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/execution_control.py#L34" }, "streamlit.subheader": { "name": "subheader", @@ -232539,10 +244224,10 @@ }, { "name": "divider", - "type_name": "bool or \u201cblue\u201d, \u201cgreen\u201d, \u201corange\u201d, \u201cred\u201d, \u201cviolet\u201d, \u201cgray\u201d/\"grey\", or \u201crainbow\u201d", + "type_name": "bool, \"blue\", \"green\", \"orange\", \"red\", \"violet\", \"yellow\", \"gray\"/\"grey\", or \"rainbow\"", "is_optional": false, "is_kwarg_only": true, - "description": "

Shows a colored divider below the header. If True, successive\nheaders will cycle through divider colors. That is, the first\nheader will have a blue line, the second header will have a\ngreen line, and so on. If a string, the color can be set to one of\nthe following: blue, green, orange, red, violet, gray/grey, or\nrainbow.

\n", + "description": "

Shows a colored divider below the header. If this is True,\nsuccessive headers will cycle through divider colors, except gray\nand rainbow. That is, the first header will have a blue line, the\nsecond header will have a green line, and so on. If this is a\nstring, the color can be set to one of the following: blue, green,\norange, red, violet, yellow, gray/grey, or rainbow.

\n", "default": null }, { @@ -232555,7 +244240,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L134" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/heading.py#L134" }, "streamlit.success": { "name": "success", @@ -232589,7 +244274,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L250" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/alert.py#L250" }, "streamlit.switch_page": { "name": "switch_page", @@ -232607,7 +244292,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/commands/execution_control.py#L157" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/commands/execution_control.py#L157" }, "streamlit.table": { "name": "table", @@ -232625,7 +244310,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L668" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/arrow.py#L753" }, "streamlit.tabs": { "name": "tabs", @@ -232658,7 +244343,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/layouts.py#L556" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/layouts.py#L556" }, "streamlit.text": { "name": "text", @@ -232692,7 +244377,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/text.py#L31" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/text.py#L31" }, "streamlit.text_area": { "name": "text_area", @@ -232813,7 +244498,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/text_widgets.py#L450" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/text_widgets.py#L449" }, "streamlit.text_input": { "name": "text_input", @@ -232950,7 +244635,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/text_widgets.py#L127" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/text_widgets.py#L127" }, "streamlit.time_input": { "name": "time_input", @@ -233055,7 +244740,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/time_widgets.py#L351" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/time_widgets.py#L351" }, "streamlit.title": { "name": "title", @@ -233097,12 +244782,12 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/heading.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/heading.py#L223" }, "streamlit.toast": { "name": "toast", - "signature": "st.toast(body, *, icon=None)", - "example": "
\nimport streamlit as st\n\nst.toast('Your edited image was saved!', icon='\ud83d\ude0d')\n
\n", + "signature": "st.toast(body, *, icon=None, duration=\"short\")", + "examples": "

Example 1: Show a toast message

\n
\nimport streamlit as st\n\nif st.button("Save"):\n    st.toast("Your edited image was saved!", icon="\ud83d\ude0d")\n
\n

Example 2: Show multiple toasts

\n

When multiple toasts are generated, they will stack. Hovering over a\ntoast will stop it from disappearing. When hovering ends, the toast\nwill disappear after time specified in duration.

\n
\nimport time\nimport streamlit as st\n\nif st.button("Three cheers"):\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hip!")\n    time.sleep(0.5)\n    st.toast("Hooray!", icon="\ud83c\udf89")\n
\n

Example 3: Update a toast message

\n

Toast messages can also be updated. Assign st.toast(my_message) to\na variable and use the .toast() method to update it. If a toast has\nalready disappeared or been dismissed, the update will not be seen.

\n
\nimport time\nimport streamlit as st\n\ndef cook_breakfast():\n    msg = st.toast("Gathering ingredients...")\n    time.sleep(1)\n    msg.toast("Cooking...")\n    time.sleep(1)\n    msg.toast("Ready!", icon="\ud83e\udd5e")\n\nif st.button("Cook breakfast"):\n    cook_breakfast()\n
\n", "description": "

Display a short message, known as a notification "toast".

\n

The toast appears in the app's top-right corner and disappears after four seconds.

\n
\n

Warning

\n

st.toast is not compatible with Streamlit's caching and\ncannot be called within a cached function.

\n
\n", "args": [ { @@ -233120,10 +244805,18 @@ "is_kwarg_only": true, "description": "

An optional emoji or icon to display next to the alert. If icon\nis None (default), no icon is displayed. If icon is a\nstring, the following options are valid:

\n
    \n
  • A single-character emoji. For example, you can set icon="\ud83d\udea8"\nor icon="\ud83d\udd25". Emoji short codes are not supported.

    \n
  • \n
  • An icon from the Material Symbols library (rounded style) in the\nformat ":material/icon_name:" where "icon_name" is the name\nof the icon in snake case.

    \n

    For example, icon=":material/thumb_up:" will display the\nThumb Up icon. Find additional icons in the Material Symbols\nfont library.

    \n
  • \n
\n", "default": null + }, + { + "name": "duration", + "type_name": "\"short\", \"long\", \"infinite\", or int", + "is_optional": false, + "is_kwarg_only": true, + "description": "

The time to display the toast message. This can be one of the\nfollowing:

\n
    \n
  • "short" (default): Displays for 4 seconds.
  • \n
  • "long": Displays for 10 seconds.
  • \n
  • "infinite": Shows the toast until the user dismisses it.
  • \n
  • An integer: Displays for the specified number of seconds.
  • \n
\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/toast.py#L38" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/toast.py#L38" }, "streamlit.toggle": { "name": "toggle", @@ -233220,7 +244913,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/widgets/checkbox.py#L190" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/widgets/checkbox.py#L190" }, "streamlit.vega_lite_chart": { "name": "vega_lite_chart", @@ -233301,7 +244994,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L1798" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L1794" }, "streamlit.video": { "name": "video", @@ -233383,7 +245076,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/media.py#L227" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/media.py#L226" }, "streamlit.warning": { "name": "warning", @@ -233417,7 +245110,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/alert.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/alert.py#L105" }, "streamlit.write": { "name": "write", @@ -233462,7 +245155,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/write.py#L256" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/write.py#L256" }, "streamlit.write_stream": { "name": "write_stream", @@ -233487,7 +245180,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/write.py#L69" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/write.py#L69" }, "streamlit.cache_data.clear": { "name": "cache_data.clear", @@ -233495,7 +245188,7 @@ "description": "

Clear all in-memory and on-disk data caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_data_api.py#L624" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/cache_data_api.py#L607" }, "streamlit.cache_resource.clear": { "name": "cache_resource.clear", @@ -233503,7 +245196,7 @@ "description": "

Clear all cache_resource caches.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_resource_api.py#L487" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/cache_resource_api.py#L471" }, "streamlit.query_params.clear": { "name": "clear", @@ -233518,7 +245211,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L135" }, "streamlit.query_params.from_dict": { "name": "from_dict", @@ -233536,7 +245229,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L175" }, "streamlit.query_params.get_all": { "name": "get_all", @@ -233560,7 +245253,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L112" }, "streamlit.query_params.missing_attr_error_message": { "name": "missing_attr_error_message", @@ -233568,7 +245261,7 @@ "description": "

Returns a formatted error message for missing attributes.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L219" }, "streamlit.query_params.missing_key_error_message": { "name": "missing_key_error_message", @@ -233576,7 +245269,7 @@ "description": "

Returns a formatted error message for missing keys.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L214" }, "streamlit.query_params.to_dict": { "name": "to_dict", @@ -233591,7 +245284,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L147" }, "streamlit.query_params.update": { "name": "update", @@ -233615,7 +245308,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/state/query_params_proxy.py#L90" }, "streamlit.connections.BaseConnection": { "name": "BaseConnection", @@ -233636,11 +245329,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -233664,11 +245357,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L27", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L27", "description": "

The abstract base class that all Streamlit Connections must inherit from.

\n

This base class provides connection authors with a standardized way to hook into the\nst.connection() factory function: connection authors are required to provide an\nimplementation for the abstract method _connect in their subclasses.

\n

Additionally, it also provides a few methods/properties designed to make\nimplementation of connections more convenient. See the docstrings for each of the\nmethods of this class for more information

\n
\n

Note

\n

While providing an implementation of _connect is technically all that's\nrequired to define a valid connection, connections should also provide the user\nwith context-specific ways of interacting with the underlying connection object.\nFor example, the first-party SQLConnection provides a query() method for\nreads and a session property for more complex operations.

\n
\n", "args": [], "returns": [] @@ -233691,7 +245384,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L356" }, { "name": "query", @@ -233764,7 +245457,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L223" }, { "name": "reset", @@ -233780,7 +245473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" } ], "properties": [ @@ -233797,7 +245490,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L385" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L385" }, { "name": "engine", @@ -233812,7 +245505,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L372" }, { "name": "session", @@ -233828,10 +245521,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L398" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L398" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L54", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L54", "examples": "

Example 1: Configuration with URL

\n

You can configure your SQL connection using Streamlit's\nSecrets management.\nThe following example specifies a SQL connection URL.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\nurl = "xxx+xxx://xxx:xxx@xxx:xxx/xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 2: Configuration with dialect, host, and username

\n

If you do not specify url, you must at least specify dialect,\nhost, and username instead. The following example also includes\npassword.

\n

.streamlit/secrets.toml:

\n
\n[connections.sql]\ndialect = "xxx"\nhost = "xxx"\nusername = "xxx"\npassword = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\n\nconn = st.connection("sql")\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n

Example 3: Configuration with keyword arguments

\n

You can configure your SQL connection with keyword arguments (with or\nwithout secrets.toml). For example, if you use Microsoft Entra ID with\na Microsoft Azure SQL server, you can quickly set up a local connection for\ndevelopment using interactive authentication.

\n

This example requires the Microsoft ODBC Driver for SQL Server\nfor Windows in addition to the sqlalchemy and pyodbc packages for\nPython.

\n
\nimport streamlit as st\n\nconn = st.connection(\n    "sql",\n    dialect="mssql",\n    driver="pyodbc",\n    host="xxx.database.windows.net",\n    database="xxx",\n    username="xxx",\n    query={\n        "driver": "ODBC Driver 18 for SQL Server",\n        "authentication": "ActiveDirectoryInteractive",\n        "encrypt": "yes",\n    },\n)\n\ndf = conn.query("SELECT * FROM pet_owners")\nst.dataframe(df)\n
\n", "description": "

A connection to a SQL database using a SQLAlchemy Engine.

\n

Initialize this connection object using st.connection("sql") or\nst.connection("<name>", type="sql"). Connection parameters for a\nSQLConnection can be specified using secrets.toml and/or **kwargs.\nPossible connection parameters include:

\n
    \n
  • url or keyword arguments for sqlalchemy.engine.URL.create(), except\ndrivername. Use dialect and driver instead of drivername.
  • \n
  • Keyword arguments for sqlalchemy.create_engine(), including custom\nconnect() arguments used by your specific dialect or driver.
  • \n
  • autocommit. If this is False (default), the connection operates\nin manual commit (transactional) mode. If this is True, the\nconnection operates in autocommit (non-transactional) mode.
  • \n
\n

If url exists as a connection parameter, Streamlit will pass it to\nsqlalchemy.engine.make_url(). Otherwise, Streamlit requires (at a\nminimum) dialect, username, and host. Streamlit will use\ndialect and driver (if defined) to derive drivername, then pass\nthe relevant connection parameters to sqlalchemy.engine.URL.create().

\n

In addition to the default keyword arguments for sqlalchemy.create_engine(),\nyour dialect may accept additional keyword arguments. For example, if you\nuse dialect="snowflake" with Snowflake SQLAlchemy,\nyou can pass a value for private_key to use key-pair authentication. If\nyou use dialect="bigquery" with Google BigQuery,\nyou can pass a value for location.

\n

SQLConnection provides the .query() convenience method, which can be\nused to run simple, read-only queries with both caching and simple error\nhandling/retries. More complex database interactions can be performed by\nusing the .session property to receive a regular SQLAlchemy Session.

\n
\n

Important

\n

SQLAlchemy must be installed\nin your environment to use this connection. You must also install your\ndriver, such as pyodbc or psycopg2.

\n
\n", "args": [], @@ -233856,7 +245549,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L459" }, { "name": "query", @@ -233905,7 +245598,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L284" }, { "name": "reset", @@ -233921,7 +245614,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "session", @@ -233937,7 +245630,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L531" }, { "name": "write_pandas", @@ -234002,7 +245695,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L377" } ], "properties": [ @@ -234020,12 +245713,12 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L492" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L49", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L49", "examples": "

Example 1: Configuration with Streamlit secrets

\n

You can configure your Snowflake connection using Streamlit's\nSecrets management.\nFor example, if you have MFA enabled on your account, you can connect using\nkey-pair authentication.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\naccount = "xxx-xxx"\nuser = "xxx"\nprivate_key_file = "/xxx/xxx/xxx.p8"\nrole = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 2: Configuration with keyword arguments and external authentication

\n

You can configure your Snowflake connection with keyword arguments. The\nkeyword arguments are merged with (and take precedence over) the values in\nsecrets.toml. However, if you name your connection "snowflake" and\ndon't have a [connections.snowflake] dictionary in your\nsecrets.toml file, Streamlit will ignore any keyword arguments and use\nthe default Snowflake connection as described in Example 5 and Example 6.\nTo configure your connection using only keyword arguments, declare a name\nfor the connection other than "snowflake".

\n

For example, if your Snowflake account supports SSO, you can set up a quick\nlocal connection for development using browser-based SSO.\nBecause there is nothing configured in secrets.toml, the name is an\nempty string and the type is set to "snowflake". This prevents\nStreamlit from ignoring the keyword arguments and using a default\nSnowflake connection.

\n
\nimport streamlit as st\nconn = st.connection(\n    "",\n    type="snowflake",\n    account="xxx-xxx",\n    user="xxx",\n    authenticator="externalbrowser",\n)\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 3: Named connection with Snowflake's connection configuration file

\n

Snowflake's Python Connector supports a connection configuration file,\nwhich is well integrated with Streamlit's SnowflakeConnection. If you\nalready have one or more connections configured, all you need to do is pass\nthe name of the connection to use.

\n

~/.snowflake/connections.toml:

\n
\n[my_connection]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("my_connection", type="snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 4: Named connection with Streamlit secrets and Snowflake's connection configuration file

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can pass the connection name through\nsecrets.toml.

\n

.streamlit/secrets.toml:

\n
\n[connections.snowflake]\nconnection_name = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 5: Default connection with an environment variable

\n

If you don't have a [connections.snowflake] dictionary in your\nsecrets.toml file and use st.connection("snowflake"), Streamlit\nwill use the default connection for the Snowflake Python Connector.

\n

If you have a Snowflake configuration file with a connection named\nmy_connection as in Example 3, you can set an environment variable to\ndeclare it as the default Snowflake connection.

\n
\nSNOWFLAKE_DEFAULT_CONNECTION_NAME = "my_connection"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n

Example 6: Default connection in Snowflake's connection configuration file

\n

If you have a Snowflake configuration file that defines your default\nconnection, Streamlit will automatically use it if no other connection is\ndeclared.

\n

~/.snowflake/connections.toml:

\n
\n[default]\naccount = "xxx-xxx"\nuser = "xxx"\npassword = "xxx"\nwarehouse = "xxx"\ndatabase = "xxx"\nschema = "xxx"\n
\n

Your app code:

\n
\nimport streamlit as st\nconn = st.connection("snowflake")\ndf = conn.query("SELECT * FROM my_table")\n
\n", - "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Important

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall it as an extra with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", + "description": "

A connection to Snowflake using the Snowflake Connector for Python.

\n

Initialize this connection object using st.connection("snowflake") or\nst.connection("<name>", type="snowflake"). Connection parameters for a\nSnowflakeConnection can be specified using secrets.toml and/or\n**kwargs. Connection parameters are passed to\nsnowflake.connector.connect().

\n

When an app is running in Streamlit in Snowflake,\nst.connection("snowflake") connects automatically using the app owner's\nrole without further configuration. **kwargs will be ignored in this\ncase. Use secrets.toml and **kwargs to configure your connection\nfor local development.

\n

SnowflakeConnection includes several convenience methods. For example, you\ncan directly execute a SQL query with .query() or access the underlying\nSnowflake Connector object with .raw_connection.

\n
\n

Important

\n

snowflake-snowpark-python\nmust be installed in your environment to use this connection. You can\ninstall it as an extra with Streamlit:

\n
\npip install streamlit[snowflake]\n
\n
\n
\n

Important

\n

Account identifiers must be of the form <orgname>-<account_name>\nwhere <orgname> is the name of your Snowflake organization and\n<account_name> is the unique name of your account within your\norganization. This is dash-separated, not dot-separated like when used\nin SQL queries. For more information, see Account identifiers.

\n
\n", "args": [], "returns": [] }, @@ -234065,7 +245758,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L96" }, { "name": "reset", @@ -234081,7 +245774,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, { "name": "safe_session", @@ -234090,7 +245783,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L189" } ], "properties": [ @@ -234101,10 +245794,10 @@ "description": "

Access the underlying Snowpark session.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L166" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L48", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L48", "description": "

A connection to Snowpark using snowflake.snowpark.session.Session. Initialize using

\n

st.connection("<name>", type="snowpark").

\n

In addition to providing access to the Snowpark Session, SnowparkConnection supports\ndirect SQL querying using query("...") and thread safe access using\nwith conn.safe_session():. See methods below for more information.\nSnowparkConnections should always be created using st.connection(), not\ninitialized directly.

\n
\n

Note

\n

We don't expect this iteration of SnowparkConnection to be able to scale\nwell in apps with many concurrent users due to the lock contention that will occur\nover the single underlying Session object under high load.

\n
\n", "args": [], "returns": [] @@ -234122,7 +245815,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L356" }, "streamlit.connections.SQLConnection.driver": { "name": "driver", @@ -234137,7 +245830,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L385" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L385" }, "streamlit.connections.SQLConnection.engine": { "name": "engine", @@ -234152,7 +245845,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L372" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L372" }, "streamlit.connections.SQLConnection.query": { "name": "query", @@ -234225,7 +245918,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L223" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L223" }, "streamlit.connections.SQLConnection.reset": { "name": "reset", @@ -234241,7 +245934,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SQLConnection.session": { "name": "session", @@ -234257,7 +245950,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/sql_connection.py#L398" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/sql_connection.py#L398" }, "streamlit.connections.SnowparkConnection.query": { "name": "query", @@ -234290,7 +245983,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L96" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L96" }, "streamlit.connections.SnowparkConnection.reset": { "name": "reset", @@ -234306,7 +245999,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowparkConnection.safe_session": { "name": "safe_session", @@ -234315,7 +246008,7 @@ "description": "

Grab the underlying Snowpark session in a thread-safe manner.

\n

As operations on a Snowpark session are not thread safe, we need to take care\nwhen using a session in the context of a Streamlit app where each script run\noccurs in its own thread. Using the contextmanager pattern to do this ensures\nthat access on this connection's underlying Session is done in a thread-safe\nmanner.

\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L189" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L189" }, "streamlit.connections.SnowparkConnection.session": { "name": "session", @@ -234324,7 +246017,7 @@ "description": "

Access the underlying Snowpark session.

\n
\n

Note

\n

Snowpark sessions are not thread safe. Users of this method are\nresponsible for ensuring that access to the session returned by this method is\ndone in a thread-safe manner. For most users, we recommend using the thread-safe\nsafe_session() method and a with block.

\n
\n

Information on how to use Snowpark sessions can be found in the Snowpark documentation.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowpark_connection.py#L166" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowpark_connection.py#L166" }, "streamlit.connections.SnowflakeConnection.cursor": { "name": "cursor", @@ -234340,7 +246033,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L457" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L459" }, "streamlit.connections.SnowflakeConnection.query": { "name": "query", @@ -234389,7 +246082,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L282" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L284" }, "streamlit.connections.SnowflakeConnection.raw_connection": { "name": "raw_connection", @@ -234405,7 +246098,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L490" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L492" }, "streamlit.connections.SnowflakeConnection.reset": { "name": "reset", @@ -234421,7 +246114,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.connections.SnowflakeConnection.session": { "name": "session", @@ -234437,7 +246130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L529" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L531" }, "streamlit.connections.SnowflakeConnection.write_pandas": { "name": "write_pandas", @@ -234502,7 +246195,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/snowflake_connection.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/snowflake_connection.py#L377" }, "streamlit.connections.BaseConnection.reset": { "name": "reset", @@ -234518,7 +246211,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/connections/base_connection.py#L121" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/connections/base_connection.py#L121" }, "streamlit.column_config.AreaChartColumn": { "name": "AreaChartColumn", @@ -234576,7 +246269,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1234" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1253" }, "streamlit.column_config.BarChartColumn": { "name": "BarChartColumn", @@ -234634,7 +246327,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1058" }, "streamlit.column_config.CheckboxColumn": { "name": "CheckboxColumn", @@ -234671,7 +246364,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -234700,7 +246393,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L805" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L808" }, "streamlit.column_config.Column": { "name": "Column", @@ -234737,7 +246430,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -234758,7 +246451,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L252" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L259" }, "streamlit.column_config.DateColumn": { "name": "DateColumn", @@ -234795,7 +246488,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -234856,7 +246549,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1827" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1873" }, "streamlit.column_config.DatetimeColumn": { "name": "DatetimeColumn", @@ -234893,7 +246586,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -234962,7 +246655,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1508" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1556" }, "streamlit.column_config.ImageColumn": { "name": "ImageColumn", @@ -235004,7 +246697,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1332" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1351" }, "streamlit.column_config.JsonColumn": { "name": "JsonColumn", @@ -235046,7 +246739,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L2116" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L2161" }, "streamlit.column_config.LineChartColumn": { "name": "LineChartColumn", @@ -235104,7 +246797,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1136" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1155" }, "streamlit.column_config.LinkColumn": { "name": "LinkColumn", @@ -235141,7 +246834,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -235194,13 +246887,13 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L642" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L646" }, "streamlit.column_config.ListColumn": { "name": "ListColumn", - "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None, pinned=None)", + "signature": "st.column_config.ListColumn(label=None, *, width=None, help=None, pinned=None, disabled=None, required=None, default=None)", "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "sales": [\n            [0, 4, 26, 80, 100, 40],\n            [80, 20, 80, 35, 40, 100],\n            [10, 20, 80, 80, 70, 0],\n            [10, 100, 20, 100, 30, 100],\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "sales": st.column_config.ListColumn(\n            "Sales (last 6 months)",\n            help="The sales volume in the last 6 months",\n            width="medium",\n        ),\n    },\n    hide_index=True,\n)\n
\n", - "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. List columns are not editable\nat the moment. This command needs to be used in the column_config parameter of\nst.dataframe or st.data_editor.

\n", + "description": "

Configure a list column in st.dataframe or st.data_editor.

\n

This is the default column type for list-like values. This command needs to\nbe used in the column_config parameter of st.dataframe or\nst.data_editor.

\n
\n

Note

\n

Editing for non-string or mixed type lists can cause issues with Arrow\nserialization. We recommend you disable editing for these columns or\nconvert all list values to strings.

\n
\n", "args": [ { "name": "label", @@ -235233,10 +246926,34 @@ "is_kwarg_only": true, "description": "

Whether the column is pinned. A pinned column will stay visible on the\nleft side no matter where the user scrolls. If this is None\n(default), Streamlit will decide: index columns are pinned, and data\ncolumns are not pinned.

\n", "default": null + }, + { + "name": "disabled", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "default": null + }, + { + "name": "required", + "type_name": "bool or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Whether edited cells in the column need to have a value. If this is\nFalse (default), the user can submit empty values for this column.\nIf this is True, an edited cell in this column can only be\nsubmitted if its value is not None, and a new row will only be\nsubmitted after the user fills in this column.

\n", + "default": null + }, + { + "name": "default", + "type_name": "Iterable of str or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Specifies the default value in this column when a new row is added by\nthe user. This defaults to None.

\n", + "default": "value" } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1423" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1442" }, "streamlit.column_config.NumberColumn": { "name": "NumberColumn", @@ -235273,7 +246990,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -235334,7 +247051,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L362" }, "streamlit.column_config.ProgressColumn": { "name": "ProgressColumn", @@ -235408,11 +247125,11 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1982" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L2027" }, "streamlit.column_config.SelectboxColumn": { "name": "SelectboxColumn", - "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, options=None)", + "signature": "st.column_config.SelectboxColumn(label=None, *, width=None, help=None, disabled=None, required=None, pinned=None, default=None, options=None, format_func=None)", "examples": "
\nimport pandas as pd\nimport streamlit as st\n\ndata_df = pd.DataFrame(\n    {\n        "category": [\n            "\ud83d\udcca Data Exploration",\n            "\ud83d\udcc8 Data Visualization",\n            "\ud83e\udd16 LLM",\n            "\ud83d\udcca Data Exploration",\n        ],\n    }\n)\n\nst.data_editor(\n    data_df,\n    column_config={\n        "category": st.column_config.SelectboxColumn(\n            "App Category",\n            help="The category of the app",\n            width="medium",\n            options=[\n                "\ud83d\udcca Data Exploration",\n                "\ud83d\udcc8 Data Visualization",\n                "\ud83e\udd16 LLM",\n            ],\n            required=True,\n        )\n    },\n    hide_index=True,\n)\n
\n", "description": "

Configure a selectbox column in st.dataframe or st.data_editor.

\n

This is the default column type for Pandas categorical values. This command needs to\nbe used in the column_config parameter of st.dataframe or st.data_editor.\nWhen used with st.data_editor, editing will be enabled with a selectbox widget.

\n", "args": [ @@ -235445,7 +247162,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -235474,15 +247191,23 @@ }, { "name": "options", - "type_name": "Iterable of str or None", + "type_name": "Iterable[str, int, float, bool] or None", "is_optional": false, "is_kwarg_only": true, "description": "

The options that can be selected during editing. If this is None\n(default), the options will be inferred from the underlying dataframe\ncolumn if its dtype is "category". For more information, see Pandas docs).

\n", "default": null + }, + { + "name": "format_func", + "type_name": "function or None", + "is_optional": false, + "is_kwarg_only": true, + "description": "

Function to modify the display of the options. It receives\nthe raw option defined in options as an argument and should output\nthe label to be shown for that option. If this is None (default),\nthe raw option is used as the label.

\n", + "default": null } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L913" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L915" }, "streamlit.column_config.TextColumn": { "name": "TextColumn", @@ -235519,7 +247244,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -235564,7 +247289,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L521" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L526" }, "streamlit.column_config.TimeColumn": { "name": "TimeColumn", @@ -235601,7 +247326,7 @@ "type_name": "bool or None", "is_optional": false, "is_kwarg_only": true, - "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will decide: indices are disabled and data columns\nare not.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", + "description": "

Whether editing should be disabled for this column. If this is None\n(default), Streamlit will enable editing wherever possible.

\n

If a column has mixed types, it may become uneditable regardless of\ndisabled.

\n", "default": null }, { @@ -235662,7 +247387,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/column_types.py#L1673" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/column_types.py#L1720" }, "streamlit.components.v1.declare_component": { "name": "declare_component", @@ -235702,7 +247427,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/components/v1/component_registry.py#L53" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/components/v1/component_registry.py#L53" }, "streamlit.components.v1.html": { "name": "html", @@ -235752,7 +247477,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/iframe.py#L105" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/iframe.py#L109" }, "streamlit.components.v1.iframe": { "name": "iframe", @@ -235802,7 +247527,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/iframe.py#L28" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/iframe.py#L29" }, "DeltaGenerator.add_rows": { "name": "add_rows", @@ -235828,7 +247553,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L763" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/arrow.py#L848" }, "StatusContainer.update": { "name": "update", @@ -235861,7 +247586,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/lib/mutable_status_container.py#L108" }, "streamlit.testing.v1.AppTest": { "name": "AppTest", @@ -235890,7 +247615,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L1032" }, { "name": "run", @@ -235914,7 +247639,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L375" }, { "name": "switch_page", @@ -235938,7 +247663,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L398" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L398" } ], "properties": [ @@ -235955,7 +247680,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L453" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L453" }, { "name": "button_group", @@ -235970,7 +247695,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L468" }, { "name": "caption", @@ -235985,7 +247710,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L482" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L482" }, { "name": "chat_input", @@ -236000,7 +247725,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L496" }, { "name": "chat_message", @@ -236015,7 +247740,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L510" }, { "name": "checkbox", @@ -236030,7 +247755,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L524" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L524" }, { "name": "code", @@ -236045,7 +247770,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L538" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L538" }, { "name": "color_picker", @@ -236060,7 +247785,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L552" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L552" }, { "name": "columns", @@ -236075,7 +247800,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L566" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L566" }, { "name": "dataframe", @@ -236090,7 +247815,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L583" }, { "name": "date_input", @@ -236105,7 +247830,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L597" }, { "name": "divider", @@ -236120,7 +247845,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L611" }, { "name": "error", @@ -236135,7 +247860,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L625" }, { "name": "exception", @@ -236150,7 +247875,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L639" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L639" }, { "name": "expander", @@ -236165,7 +247890,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L653" }, { "name": "header", @@ -236180,7 +247905,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L667" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L667" }, { "name": "info", @@ -236195,7 +247920,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L681" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L681" }, { "name": "json", @@ -236210,7 +247935,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L695" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L695" }, { "name": "latex", @@ -236225,7 +247950,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L709" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L709" }, { "name": "main", @@ -236240,7 +247965,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L427" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L427" }, { "name": "markdown", @@ -236255,7 +247980,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L723" }, { "name": "metric", @@ -236270,7 +247995,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L737" }, { "name": "multiselect", @@ -236285,7 +248010,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L751" }, { "name": "number_input", @@ -236300,7 +248025,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L765" }, { "name": "radio", @@ -236315,7 +248040,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L779" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L779" }, { "name": "select_slider", @@ -236330,7 +248055,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L793" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L793" }, { "name": "selectbox", @@ -236345,7 +248070,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L807" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L807" }, { "name": "sidebar", @@ -236360,7 +248085,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L440" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L440" }, { "name": "slider", @@ -236375,7 +248100,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L821" }, { "name": "status", @@ -236390,7 +248115,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L863" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L863" }, { "name": "subheader", @@ -236405,7 +248130,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L835" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L835" }, { "name": "success", @@ -236420,7 +248145,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L849" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L849" }, { "name": "table", @@ -236435,7 +248160,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L877" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L877" }, { "name": "tabs", @@ -236450,7 +248175,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L891" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L891" }, { "name": "text", @@ -236465,7 +248190,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L911" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L911" }, { "name": "text_area", @@ -236480,7 +248205,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L925" }, { "name": "text_input", @@ -236495,7 +248220,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L939" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L939" }, { "name": "time_input", @@ -236510,7 +248235,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L953" }, { "name": "title", @@ -236525,7 +248250,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L967" }, { "name": "toast", @@ -236540,7 +248265,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L981" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L981" }, { "name": "toggle", @@ -236555,7 +248280,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L995" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L995" }, { "name": "warning", @@ -236570,10 +248295,10 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L1009" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L98", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L98", "description": "

A simulated Streamlit app to check the correctness of displayed elements and outputs.

\n

An instance of AppTest simulates a running Streamlit app. This class\nprovides methods to set up, manipulate, and inspect the app contents via\nAPI instead of a browser UI. It can be used to write automated tests of an\napp in various scenarios. These can then be run using a tool like pytest.

\n

AppTest can be initialized by one of three class methods:

\n\n

Once initialized, Session State and widget values can be updated and the\nscript can be run. Unlike an actual live-running Streamlit app, you need to\ncall AppTest.run() explicitly to re-run the app after changing a widget\nvalue. Switching pages also requires an explicit, follow-up call to\nAppTest.run().

\n

AppTest enables developers to build tests on their app as-is, in the\nfamiliar python test format, without major refactoring or abstracting out\nlogic to be tested separately from the UI. Tests can run quickly with very\nlow overhead. A typical pattern is to build a suite of tests for an app\nthat ensure consistent functionality as the app evolves, and run the tests\nlocally and/or in a CI environment like Github Actions.

\n
\n

Note

\n

AppTest only supports testing a single page of an app per\ninstance. For multipage apps, each page will need to be tested\nseparately. AppTest is not yet compatible with multipage apps\nusing st.navigation and st.Page.

\n
\n", "args": [ { @@ -236613,7 +248338,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L453" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L453" }, "AppTest.button_group": { "name": "button_group", @@ -236628,7 +248353,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L468" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L468" }, "AppTest.caption": { "name": "caption", @@ -236643,7 +248368,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L482" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L482" }, "AppTest.chat_input": { "name": "chat_input", @@ -236658,7 +248383,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L496" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L496" }, "AppTest.chat_message": { "name": "chat_message", @@ -236673,7 +248398,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L510" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L510" }, "AppTest.checkbox": { "name": "checkbox", @@ -236688,7 +248413,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L524" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L524" }, "AppTest.code": { "name": "code", @@ -236703,7 +248428,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L538" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L538" }, "AppTest.color_picker": { "name": "color_picker", @@ -236718,7 +248443,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L552" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L552" }, "AppTest.columns": { "name": "columns", @@ -236733,7 +248458,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L566" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L566" }, "AppTest.dataframe": { "name": "dataframe", @@ -236748,7 +248473,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L583" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L583" }, "AppTest.date_input": { "name": "date_input", @@ -236763,7 +248488,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L597" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L597" }, "AppTest.divider": { "name": "divider", @@ -236778,7 +248503,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L611" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L611" }, "AppTest.error": { "name": "error", @@ -236793,7 +248518,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L625" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L625" }, "AppTest.exception": { "name": "exception", @@ -236808,7 +248533,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L639" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L639" }, "AppTest.expander": { "name": "expander", @@ -236823,7 +248548,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L653" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L653" }, "AppTest.from_file": { "name": "from_file", @@ -236855,7 +248580,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L275" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L275" }, "AppTest.from_function": { "name": "from_function", @@ -236903,7 +248628,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L225" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L225" }, "AppTest.from_string": { "name": "from_string", @@ -236935,7 +248660,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L178" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L178" }, "AppTest.get": { "name": "get", @@ -236959,7 +248684,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1032" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L1032" }, "AppTest.header": { "name": "header", @@ -236974,7 +248699,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L667" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L667" }, "AppTest.info": { "name": "info", @@ -236989,7 +248714,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L681" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L681" }, "AppTest.json": { "name": "json", @@ -237004,7 +248729,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L695" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L695" }, "AppTest.latex": { "name": "latex", @@ -237019,7 +248744,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L709" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L709" }, "AppTest.main": { "name": "main", @@ -237034,7 +248759,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L427" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L427" }, "AppTest.markdown": { "name": "markdown", @@ -237049,7 +248774,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L723" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L723" }, "AppTest.metric": { "name": "metric", @@ -237064,7 +248789,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L737" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L737" }, "AppTest.multiselect": { "name": "multiselect", @@ -237079,7 +248804,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L751" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L751" }, "AppTest.number_input": { "name": "number_input", @@ -237094,7 +248819,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L765" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L765" }, "AppTest.radio": { "name": "radio", @@ -237109,7 +248834,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L779" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L779" }, "AppTest.run": { "name": "run", @@ -237133,7 +248858,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L375" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L375" }, "AppTest.select_slider": { "name": "select_slider", @@ -237148,7 +248873,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L793" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L793" }, "AppTest.selectbox": { "name": "selectbox", @@ -237163,7 +248888,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L807" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L807" }, "AppTest.sidebar": { "name": "sidebar", @@ -237178,7 +248903,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L440" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L440" }, "AppTest.slider": { "name": "slider", @@ -237193,7 +248918,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L821" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L821" }, "AppTest.status": { "name": "status", @@ -237208,7 +248933,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L863" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L863" }, "AppTest.subheader": { "name": "subheader", @@ -237223,7 +248948,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L835" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L835" }, "AppTest.success": { "name": "success", @@ -237238,7 +248963,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L849" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L849" }, "AppTest.switch_page": { "name": "switch_page", @@ -237262,7 +248987,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L398" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L398" }, "AppTest.table": { "name": "table", @@ -237277,7 +249002,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L877" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L877" }, "AppTest.tabs": { "name": "tabs", @@ -237292,7 +249017,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L891" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L891" }, "AppTest.text": { "name": "text", @@ -237307,7 +249032,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L911" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L911" }, "AppTest.text_area": { "name": "text_area", @@ -237322,7 +249047,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L925" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L925" }, "AppTest.text_input": { "name": "text_input", @@ -237337,7 +249062,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L939" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L939" }, "AppTest.time_input": { "name": "time_input", @@ -237352,7 +249077,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L953" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L953" }, "AppTest.title": { "name": "title", @@ -237367,7 +249092,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L967" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L967" }, "AppTest.toast": { "name": "toast", @@ -237382,7 +249107,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L981" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L981" }, "AppTest.toggle": { "name": "toggle", @@ -237397,7 +249122,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L995" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L995" }, "AppTest.warning": { "name": "warning", @@ -237412,7 +249137,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/app_test.py#L1009" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/app_test.py#L1009" }, "streamlit.testing.v1.element_tree.Button": { "name": "Button", @@ -237425,7 +249150,7 @@ "description": "

Set the value of the button to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L339" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L339" }, { "name": "run", @@ -237442,7 +249167,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237450,7 +249175,7 @@ "description": "

Set the value of the button.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L334" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L334" } ], "properties": [ @@ -237460,10 +249185,10 @@ "description": "

The value of the button. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L325" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L325" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L302", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L302", "description": "

A representation of st.button and st.form_submit_button.

\n", "args": [], "returns": [] @@ -237488,7 +249213,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -237496,7 +249221,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L744" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L744" }, { "name": "set_value", @@ -237504,7 +249229,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L738" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L738" }, { "name": "unselect", @@ -237512,7 +249237,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L758" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L758" } ], "properties": [ @@ -237522,7 +249247,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L732" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L732" }, { "name": "indices", @@ -237530,7 +249255,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L727" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L727" }, { "name": "value", @@ -237538,10 +249263,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L718" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L718" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L692", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L692", "description": "

A representation of button_group that is used by st.feedback.

\n", "args": [], "returns": [] @@ -237566,7 +249291,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237574,7 +249299,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L356" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L356" } ], "properties": [ @@ -237584,10 +249309,10 @@ "description": "

The value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L369" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L369" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L344", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L344", "description": "

A representation of st.chat_input.

\n", "args": [], "returns": [] @@ -237603,7 +249328,7 @@ "description": "

Set the value of the widget to True.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L415" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L415" }, { "name": "run", @@ -237620,7 +249345,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237628,7 +249353,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L410" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L410" }, { "name": "uncheck", @@ -237636,7 +249361,7 @@ "description": "

Set the value of the widget to False.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L419" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L419" } ], "properties": [ @@ -237646,10 +249371,10 @@ "description": "

The value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L401" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L401" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L379", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L379", "description": "

A representation of st.checkbox.

\n", "args": [], "returns": [] @@ -237665,7 +249390,7 @@ "description": "

Set the value of the widget as a hex string. May omit the "#" prefix.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L486" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L486" }, { "name": "run", @@ -237682,7 +249407,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237690,7 +249415,7 @@ "description": "

Set the value of the widget as a hex string.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L481" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L481" } ], "properties": [ @@ -237700,10 +249425,10 @@ "description": "

The currently selected value as a hex string. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L461" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L461" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L446", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L446", "description": "

A representation of st.color_picker.

\n", "args": [], "returns": [] @@ -237728,7 +249453,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237736,7 +249461,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L532" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L532" } ], "properties": [ @@ -237746,10 +249471,10 @@ "description": "

The value of the widget. (date or Tuple of date)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L546" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L546" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L512", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L512", "description": "

A representation of st.date_input.

\n", "args": [], "returns": [] @@ -237774,7 +249499,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" } ], "properties": [ @@ -237784,10 +249509,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L103", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L103", "description": "

Element base class for testing.

\n

This class's methods and attributes are universal for all elements\nimplemented in testing. For example, Caption, Code, Text, and\nTitle inherit from Element. All widget classes also\ninherit from Element, but have additional methods specific to each\nwidget type. See the AppTest class for the full list of supported\nelements.

\n

For all element classes, parameters of the original element can be obtained\nas properties. For example, Button.label, Caption.help, and\nToast.icon.

\n", "args": [], "returns": [] @@ -237812,7 +249537,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -237820,7 +249545,7 @@ "description": "

Add a selection to the widget. Do nothing if the value is already selected. If testing a multiselect widget with repeated options, use set_value instead.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L834" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L834" }, { "name": "set_value", @@ -237828,7 +249553,7 @@ "description": "

Set the value of the multiselect widget. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L828" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L828" }, { "name": "unselect", @@ -237836,7 +249561,7 @@ "description": "

Remove a selection from the widget. Do nothing if the value is not already selected. If a value is selected multiple times, the first instance is removed.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L848" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L848" } ], "properties": [ @@ -237846,7 +249571,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L822" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L822" }, { "name": "indices", @@ -237854,7 +249579,7 @@ "description": "

The indices of the currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L812" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L812" }, { "name": "value", @@ -237862,7 +249587,7 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L803" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L803" }, { "name": "values", @@ -237870,10 +249595,10 @@ "description": "

The currently selected values from the options. (list)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L817" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L817" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L774", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L774", "description": "

A representation of st.multiselect.

\n", "args": [], "returns": [] @@ -237889,7 +249614,7 @@ "description": "

Decrement the st.number_input widget as if the user clicked "-".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L919" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L919" }, { "name": "increment", @@ -237897,7 +249622,7 @@ "description": "

Increment the st.number_input widget as if the user clicked "+".

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L911" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L911" }, { "name": "run", @@ -237914,7 +249639,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237922,7 +249647,7 @@ "description": "

Set the value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L887" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L887" } ], "properties": [ @@ -237932,10 +249657,10 @@ "description": "

Get the current value of the st.number_input widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L900" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L900" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L867", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L867", "description": "

A representation of st.number_input.

\n", "args": [], "returns": [] @@ -237960,7 +249685,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -237968,7 +249693,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L969" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L969" } ], "properties": [ @@ -237978,7 +249703,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L963" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L963" }, { "name": "index", @@ -237986,7 +249711,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L947" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L947" }, { "name": "value", @@ -237994,10 +249719,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L954" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L954" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L928", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L928", "description": "

A representation of st.radio.

\n", "args": [], "returns": [] @@ -238022,7 +249747,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -238030,7 +249755,7 @@ "description": "

Set the ranged selection by values.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1113" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1113" }, { "name": "set_value", @@ -238038,7 +249763,7 @@ "description": "

Set the (single) selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1076" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1076" } ], "properties": [ @@ -238048,7 +249773,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1107" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1107" }, { "name": "value", @@ -238056,10 +249781,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1097" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1097" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1058", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1058", "description": "

A representation of st.select_slider.

\n", "args": [], "returns": [] @@ -238084,7 +249809,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "select", @@ -238092,7 +249817,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1035" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1035" }, { "name": "select_index", @@ -238100,7 +249825,7 @@ "description": "

Set the selection by index.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1039" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1039" }, { "name": "set_value", @@ -238108,7 +249833,7 @@ "description": "

Set the selection by value.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1030" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1030" } ], "properties": [ @@ -238118,7 +249843,7 @@ "description": "

The widget's formatting function for displaying options. (callable)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1024" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1024" }, { "name": "index", @@ -238126,7 +249851,7 @@ "description": "

The index of the current selection. (int)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1005" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1005" }, { "name": "value", @@ -238134,10 +249859,10 @@ "description": "

The currently selected value from the options. (Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1015" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1015" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L987", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L987", "description": "

A representation of st.selectbox.

\n", "args": [], "returns": [] @@ -238162,7 +249887,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_range", @@ -238170,7 +249895,7 @@ "description": "

Set the ranged value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1168" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1168" }, { "name": "set_value", @@ -238178,7 +249903,7 @@ "description": "

Set the (single) value of the slider.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1140" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1140" } ], "properties": [ @@ -238188,10 +249913,10 @@ "description": "

The currently selected value or range. (Any or Sequence of Any)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1158" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1158" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1121", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1121", "description": "

A representation of st.slider.

\n", "args": [], "returns": [] @@ -238207,7 +249932,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1248" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1248" }, { "name": "run", @@ -238224,7 +249949,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -238232,7 +249957,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1225" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1225" } ], "properties": [ @@ -238242,10 +249967,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1238" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1238" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1207", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1207", "description": "

A representation of st.text_area.

\n", "args": [], "returns": [] @@ -238261,7 +249986,7 @@ "description": "

Set the value of the widget only if the value does not exceed the maximum allowed characters.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1300" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1300" }, { "name": "run", @@ -238278,7 +250003,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -238286,7 +250011,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1277" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1277" } ], "properties": [ @@ -238296,10 +250021,10 @@ "description": "

The current value of the widget. (str)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1290" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1290" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1259", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1259", "description": "

A representation of st.text_input.

\n", "args": [], "returns": [] @@ -238315,7 +250040,7 @@ "description": "

Select the previous available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1363" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1363" }, { "name": "increment", @@ -238323,7 +250048,7 @@ "description": "

Select the next available time.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1356" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1356" }, { "name": "run", @@ -238340,7 +250065,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -238348,7 +250073,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1330" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1330" } ], "properties": [ @@ -238358,10 +250083,10 @@ "description": "

The current value of the widget. (time)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1346" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1346" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1314", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1314", "description": "

A representation of st.time_input.

\n", "args": [], "returns": [] @@ -238386,7 +250111,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -238394,7 +250119,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1419" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1419" } ], "properties": [ @@ -238404,10 +250129,10 @@ "description": "

The current value of the widget. (bool)

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1410" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1410" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L1387", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L1387", "description": "

A representation of st.toggle.

\n", "args": [], "returns": [] @@ -238432,7 +250157,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L142" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L142" }, { "name": "set_value", @@ -238440,7 +250165,7 @@ "description": "

Set the value of the widget.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L193" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L193" } ], "properties": [ @@ -238450,10 +250175,10 @@ "description": "

The value or contents of the element.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L132" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L132" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/testing/v1/element_tree.py#L178", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/testing/v1/element_tree.py#L178", "description": "

Widget base class for testing.

\n", "args": [], "returns": [] @@ -238471,7 +250196,7 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L514" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/user_info.py#L517" }, "context.cookies": { "name": "cookies", @@ -238480,7 +250205,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L205" }, "context.headers": { "name": "headers", @@ -238489,7 +250214,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

\n

Keys are case-insensitive and may be repeated. When keys are repeated,\ndict-like methods will only return the last instance of each key. Use\n.get_all(key="your_repeated_key") to see all values if the same\nheader is set multiple times.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L159" }, "context.ip_address": { "name": "ip_address", @@ -238498,7 +250223,7 @@ "description": "

The read-only IP address of the user's connection.

\n

This should not be used for security measures because it can easily be\nspoofed. When a user accesses the app through localhost, the IP\naddress is None. Otherwise, the IP address is determined from the\nremote_ip attribute of the Tornado request object and may be an\nIPv4 or IPv6 address.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L394" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L394" }, "context.is_embedded": { "name": "is_embedded", @@ -238507,7 +250232,7 @@ "description": "

Whether the app is embedded.

\n

This property returns a boolean value indicating whether the app is\nrunning in an embedded context. This is determined by the presence of\nembed=true as a query parameter in the URL. This is the only way to\ndetermine if the app is currently configured for embedding because\nembedding settings are not accessible through st.query_params or\nst.context.url.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L432" }, "context.locale": { "name": "locale", @@ -238516,7 +250241,7 @@ "description": "

The read-only locale of the user's browser.

\n

st.context.locale returns the value of navigator.language from\nthe user's DOM. This is a string representing the user's preferred\nlanguage (e.g. "en-US").

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L335" }, "context.theme": { "name": "theme", @@ -238533,7 +250258,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L239" }, "context.timezone": { "name": "timezone", @@ -238542,7 +250267,7 @@ "description": "

The read-only timezone of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L279" }, "context.timezone_offset": { "name": "timezone_offset", @@ -238551,7 +250276,7 @@ "description": "

The read-only timezone offset of the user's browser.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L308" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L308" }, "context.url": { "name": "url", @@ -238560,7 +250285,7 @@ "description": "

The read-only URL of the app in the user's browser.

\n

st.context.url returns the URL through which the user is accessing\nthe app. This includes the scheme, domain name, port, and path. If\nquery parameters or anchors are present in the URL, they are removed\nand not included in this value.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L364" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L364" }, "CachedFunc.clear": { "name": "clear", @@ -238586,7 +250311,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/caching/cache_utils.py#L366" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/caching/cache_utils.py#L366" }, "StreamlitPage": { "name": "StreamlitPage", @@ -238599,7 +250324,7 @@ "description": "

Execute the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L272" } ], "properties": [ @@ -238609,7 +250334,7 @@ "description": "

The icon of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L249" }, { "name": "title", @@ -238617,7 +250342,7 @@ "description": "

The title of the page.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L238" }, { "name": "url_path", @@ -238625,10 +250350,10 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L257" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L128", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L128", "description": "

A page within a multipage Streamlit app.

\n

Use st.Page to initialize a StreamlitPage object.

\n", "args": [ { @@ -238661,7 +250386,7 @@ "description": "

The icon of the page.

\n

If no icon was declared in st.Page, this property returns "".

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L249" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L249" }, "StreamlitPage.run": { "name": "run", @@ -238669,7 +250394,7 @@ "description": "

Execute the page.

\n

When a page is returned by st.navigation, use the .run() method\nwithin your entrypoint file to render the page. You can only call this\nmethod on the page returned by st.navigation. You can only call\nthis method once per run of your entrypoint file.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L272" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L272" }, "StreamlitPage.title": { "name": "title", @@ -238677,7 +250402,7 @@ "description": "

The title of the page.

\n

Unless declared otherwise in st.Page, the page title is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L238" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L238" }, "StreamlitPage.url_path": { "name": "url_path", @@ -238685,7 +250410,7 @@ "description": "

The page's URL pathname, which is the path relative to the app's root URL.

\n

Unless declared otherwise in st.Page, the URL pathname is inferred\nfrom the filename or callable name. For more information, see\nOverview of multipage apps.

\n

The default page will always have a url_path of "" to indicate\nthe root URL (e.g. homepage).

\n", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/navigation/page.py#L257" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/navigation/page.py#L257" }, "streamlit.user": { "name": "user", @@ -238705,11 +250430,11 @@ "return_name": null } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L514" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/user_info.py#L517" } ], "properties": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/user_info.py#L379", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/user_info.py#L382", "examples": "

Example 1: Google's identity token

\n

If you configure a basic Google OIDC connection as shown in Example 1 of\nst.login(), the following data is available in\nst.user. Streamlit adds the is_logged_in attribute.\nAdditional attributes may be available depending on the configuration of\nthe user's Google account. For more information about Google's identity\ntokens, see Obtain user information from the ID token\nin Google's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "iss":"https://accounts.google.com"\n    "azp":"{client_id}.apps.googleusercontent.com"\n    "aud":"{client_id}.apps.googleusercontent.com"\n    "sub":"{unique_user_id}"\n    "email":"{user}@gmail.com"\n    "email_verified":true\n    "at_hash":"{access_token_hash}"\n    "nonce":"{nonce_string}"\n    "name":"{full_name}"\n    "picture":"https://lh3.googleusercontent.com/a/{content_path}"\n    "given_name":"{given_name}"\n    "family_name":"{family_name}"\n    "iat":{issued_time}\n    "exp":{expiration_time}\n}\n
\n

Example 2: Microsoft's identity token

\n

If you configure a basic Microsoft OIDC connection as shown in Example 2 of\nst.login(), the following data is available in\nst.user. For more information about Microsoft's identity\ntokens, see ID token claims reference\nin Microsoft's docs.

\n

Your app code:

\n
\nimport streamlit as st\n\nif st.user.is_logged_in:\n    st.write(st.user)\n
\n

Displayed data when a user is logged in:

\n
\n{\n    "is_logged_in":true\n    "ver":"2.0"\n    "iss":"https://login.microsoftonline.com/{tenant_id}/v2.0"\n    "sub":"{application_user_id}"\n    "aud":"{application_id}"\n    "exp":{expiration_time}\n    "iat":{issued_time}\n    "nbf":{start_time}\n    "name":"{full_name}"\n    "preferred_username":"{username}"\n    "oid":"{user_GUID}"\n    "email":"{email}"\n    "tid":"{tenant_id}"\n    "nonce":"{nonce_string}"\n    "aio":"{opaque_string}"\n}\n
\n", "description": "

A read-only, dict-like object for accessing information about the current user.

\n

st.user is dependent on the host platform running your\nStreamlit app. If your host platform has not configured the object,\nst.user will behave as it does in a locally running app.

\n

When authentication is configured in secrets.toml, Streamlit will parse\nthe OpenID Connect (OIDC) identity token and copy the attributes to\nst.user. Check your provider's documentation for their\navailable attributes (known as claims).

\n

When authentication is not configured, st.user has no\nattributes.

\n

You can access values via key or attribute notation. For example, use\nst.user["email"] or st.user.email to\naccess the email attribute.

\n
\n

Important

\n

Identity tokens include an issuance and expiration time. Streamlit does\nnot implicitly check these. If you want to automatically expire a\nuser's authentication, check these values manually and programmatically\nlog out your user (st.logout()) when needed.

\n
\n", "args": [ @@ -238736,7 +250461,7 @@ "description": "

A read-only, dict-like object containing cookies sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L205" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L205" }, { "name": "headers", @@ -238745,7 +250470,7 @@ "description": "

A read-only, dict-like object containing headers sent in the initial request.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L159" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L159" }, { "name": "ip_address", @@ -238754,7 +250479,7 @@ "description": "

The read-only IP address of the user's connection.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L394" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L394" }, { "name": "is_embedded", @@ -238763,7 +250488,7 @@ "description": "

Whether the app is embedded.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L432" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L432" }, { "name": "locale", @@ -238772,7 +250497,7 @@ "description": "

The read-only locale of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L335" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L335" }, { "name": "theme", @@ -238789,7 +250514,7 @@ } ], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L239" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L239" }, { "name": "timezone", @@ -238798,7 +250523,7 @@ "description": "

The read-only timezone of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L279" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L279" }, { "name": "timezone_offset", @@ -238807,7 +250532,7 @@ "description": "

The read-only timezone offset of the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L308" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L308" }, { "name": "url", @@ -238816,10 +250541,10 @@ "description": "

The read-only URL of the app in the user's browser.

", "args": [], "returns": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L364" + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L364" } ], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/runtime/context.py#L148", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/runtime/context.py#L148", "description": "

An interface to access user session context.

\n

st.context provides a read-only interface to access headers and cookies\nfor the current user session.

\n

Each property (st.context.headers and st.context.cookies) returns\na dictionary of named values.

\n", "args": [], "returns": [] @@ -238829,7 +250554,7 @@ "signature": "PlotlyState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L168", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/plotly_chart.py#L168", "example": "

Try selecting points by any of the three available methods (direct click,\nbox, or lasso). The current selection state is available through Session\nState or as the output of the chart function.

\n
\nimport plotly.express as px\nimport streamlit as st\n\ndf = px.data.iris()\nfig = px.scatter(df, x="sepal_width", y="sepal_length")\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent\n
\n", "description": "

The schema for the Plotly chart event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -238849,7 +250574,7 @@ "signature": "PlotlySelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/plotly_chart.py#L80", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/plotly_chart.py#L80", "example": "

When working with more complicated graphs, the points attribute\ndisplays additional information. Try selecting points in the following\nexample:

\n
\nimport plotly.express as px\nimport streamlit as st\n\ndf = px.data.iris()\nfig = px.scatter(\n    df,\n    x="sepal_width",\n    y="sepal_length",\n    color="species",\n    size="petal_length",\n    hover_data=["petal_width"],\n)\n\nevent = st.plotly_chart(fig, key="iris", on_select="rerun")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single point:

\n
\n{\n  "points": [\n    {\n      "curve_number": 2,\n      "point_number": 9,\n      "point_index": 9,\n      "x": 3.6,\n      "y": 7.2,\n      "customdata": [\n        2.5\n      ],\n      "marker_size": 6.1,\n      "legendgroup": "virginica"\n    }\n  ],\n  "point_indices": [\n    9\n  ],\n  "box": [],\n  "lasso": []\n}\n
\n", "description": "

The schema for the Plotly chart selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n", "args": [ @@ -238890,7 +250615,7 @@ "signature": "VegaLiteState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/vega_charts.py#L108", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/vega_charts.py#L108", "examples": "

The following two examples have equivalent definitions. Each one has a\npoint and interval selection parameter include in the chart definition.\nThe point selection parameter is named "point_selection". The interval\nor box selection parameter is named "interval_selection".

\n

Example 1: Chart selections with ``st.altair_chart``

\n
\nimport altair as alt\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\npoint_selector = alt.selection_point("point_selection")\ninterval_selector = alt.selection_interval("interval_selection")\nchart = (\n    alt.Chart(df)\n    .mark_circle()\n    .encode(\n        x="a",\n        y="b",\n        size="c",\n        color="c",\n        tooltip=["a", "b", "c"],\n        fillOpacity=alt.condition(point_selector, alt.value(1), alt.value(0.3)),\n    )\n    .add_params(point_selector, interval_selector)\n)\n\nevent = st.altair_chart(chart, key="alt_chart", on_select="rerun")\n\nevent\n
\n

Example 2: Chart selections with ``st.vega_lite_chart``

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(rng(0).standard_normal((20, 3)), columns=["a", "b", "c"])\n\nspec = {\n    "mark": {"type": "circle", "tooltip": True},\n    "params": [\n        {"name": "interval_selection", "select": "interval"},\n        {"name": "point_selection", "select": "point"},\n    ],\n    "encoding": {\n        "x": {"field": "a", "type": "quantitative"},\n        "y": {"field": "b", "type": "quantitative"},\n        "size": {"field": "c", "type": "quantitative"},\n        "color": {"field": "c", "type": "quantitative"},\n        "fillOpacity": {\n            "condition": {"param": "point_selection", "value": 1},\n            "value": 0.3,\n        },\n    },\n}\n\nevent = st.vega_lite_chart(df, spec, key="vega_chart", on_select="rerun")\n\nevent\n
\n

Try selecting points in this interactive example. When you click a point,\nthe selection will appear under the attribute, "point_selection", which\nis the name given to the point selection parameter. Similarly, when you\nmake an interval selection, it will appear under the attribute\n"interval_selection". You can give your selection parameters other\nnames if desired.

\n

If you hold Shift while selecting points, existing point selections\nwill be preserved. Interval selections are not preserved when making\nadditional selections.

\n", "description": "

The schema for the Vega-Lite event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ @@ -238910,7 +250635,7 @@ "signature": "DataframeState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L137", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/arrow.py#L158", "description": "

The schema for the dataframe event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically\nchanged or set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -238929,8 +250654,8 @@ "signature": "DataframeSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/arrow.py#L80", - "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold Ctrl while\nselecting columns. Hold Shift to select a range of columns.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((12, 5)), columns=["a", "b", "c", "d", "e"]\n)\n\nevent = st.dataframe(\n    df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column"],\n)\n\nevent.selection\n
\n", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/arrow.py#L94", + "example": "

The following example has multi-row and multi-column selections enabled.\nTry selecting some rows. To select multiple columns, hold CMD (macOS)\nor Ctrl (Windows) while selecting columns. Hold Shift to select a\nrange of columns.

\n
\nimport pandas as pd\nimport streamlit as st\nfrom numpy.random import default_rng as rng\n\ndf = pd.DataFrame(\n    rng(0).standard_normal((12, 5)), columns=["a", "b", "c", "d", "e"]\n)\n\nevent = st.dataframe(\n    df,\n    key="data",\n    on_select="rerun",\n    selection_mode=["multi-row", "multi-column", "multi-cell"],\n)\n\nevent.selection\n
\n", "description": "

The schema for the dataframe selection state.

\n

The selection state is stored in a dictionary-like object that supports both\nkey and attribute notation. Selection states cannot be programmatically\nchanged or set through Session State.

\n
\n

Warning

\n

If a user sorts a dataframe, row selections will be reset. If your\nusers need to sort and filter the dataframe to make selections, direct\nthem to use the search function in the dataframe toolbar instead.

\n
\n", "args": [ { @@ -238946,6 +250671,13 @@ "is_optional": false, "description": "

The selected columns, identified by their names.

\n", "default": null + }, + { + "name": "cells", + "type_name": "list[tuple[int, str]]", + "is_optional": false, + "description": "

The selected cells, provided as a tuple of row integer position\nand column name. For example, the first cell in a column named "col 1"\nis represented as (0, "col 1"). Cells within index columns are not\nreturned.

\n", + "default": null } ], "returns": [], @@ -238956,7 +250688,7 @@ "signature": "PydeckState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/deck_gl_json_chart.py#L209", "description": "

The schema for the PyDeck event state.

\n

The event state is stored in a dictionary-like object that supports both\nkey and attribute notation. Event states cannot be programmatically changed\nor set through Session State.

\n

Only selection events are supported at this time.

\n", "args": [ { @@ -238975,7 +250707,7 @@ "signature": "PydeckSelectionState", "is_class": true, "methods": [], - "source": "https://github.com/streamlit/streamlit/blob/1.48.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", + "source": "https://github.com/streamlit/streamlit/blob/1.49.0/lib/streamlit/elements/deck_gl_json_chart.py#L102", "examples": "

The following example has multi-object selection enabled. The chart\ndisplays US state capitals by population (2023 US Census estimate). You\ncan access this data\nfrom GitHub.

\n
\nimport streamlit as st\nimport pydeck\nimport pandas as pd\n\ncapitals = pd.read_csv(\n    "capitals.csv",\n    header=0,\n    names=[\n        "Capital",\n        "State",\n        "Abbreviation",\n        "Latitude",\n        "Longitude",\n        "Population",\n    ],\n)\ncapitals["size"] = capitals.Population / 10\n\npoint_layer = pydeck.Layer(\n    "ScatterplotLayer",\n    data=capitals,\n    id="capital-cities",\n    get_position=["Longitude", "Latitude"],\n    get_color="[255, 75, 75]",\n    pickable=True,\n    auto_highlight=True,\n    get_radius="size",\n)\n\nview_state = pydeck.ViewState(\n    latitude=40, longitude=-117, controller=True, zoom=2.4, pitch=30\n)\n\nchart = pydeck.Deck(\n    point_layer,\n    initial_view_state=view_state,\n    tooltip={"text": "{Capital}, {Abbreviation}\\nPopulation: {Population}"},\n)\n\nevent = st.pydeck_chart(chart, on_select="rerun", selection_mode="multi-object")\n\nevent.selection\n
\n

This is an example of the selection state when selecting a single object\nfrom a layer with id, "captial-cities":

\n
\n{\n  "indices":{\n    "capital-cities":[\n      2\n    ]\n  },\n  "objects":{\n    "capital-cities":[\n      {\n        "Abbreviation":" AZ"\n        "Capital":"Phoenix"\n        "Latitude":33.448457\n        "Longitude":-112.073844\n        "Population":1650070\n        "State":" Arizona"\n        "size":165007.0\n      }\n    ]\n  }\n}\n
\n", "description": "

The schema for the PyDeck chart selection state.

\n

The selection state is stored in a dictionary-like object that supports\nboth key and attribute notation. Selection states cannot be\nprogrammatically changed or set through Session State.

\n

You must define id in pydeck.Layer to ensure statefulness when\nusing selections with st.pydeck_chart.

\n", "args": [ diff --git a/python/tutorial-source/llm-18-lines-of-code/requirements.txt b/python/tutorial-source/llm-18-lines-of-code/requirements.txt index 6f8defe93..b78434367 100644 --- a/python/tutorial-source/llm-18-lines-of-code/requirements.txt +++ b/python/tutorial-source/llm-18-lines-of-code/requirements.txt @@ -1,2 +1,2 @@ -streamlit-nightly +streamlit>=1.49.0 langchain-openai