streamlit 1.50.0__py3-none-any.whl โ 1.52.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/__init__.py +5 -1
- streamlit/commands/execution_control.py +89 -14
- streamlit/commands/navigation.py +4 -6
- streamlit/commands/page_config.py +4 -6
- streamlit/components/v1/component_arrow.py +7 -7
- streamlit/components/v2/__init__.py +514 -0
- streamlit/components/v2/bidi_component/__init__.py +20 -0
- streamlit/components/v2/bidi_component/constants.py +29 -0
- streamlit/components/v2/bidi_component/main.py +534 -0
- streamlit/components/v2/bidi_component/serialization.py +272 -0
- streamlit/components/v2/bidi_component/state.py +92 -0
- streamlit/components/v2/component_definition_resolver.py +143 -0
- streamlit/components/v2/component_file_watcher.py +403 -0
- streamlit/components/v2/component_manager.py +439 -0
- streamlit/components/v2/component_manifest_handler.py +122 -0
- streamlit/components/v2/component_path_utils.py +245 -0
- streamlit/components/v2/component_registry.py +426 -0
- streamlit/components/v2/get_bidi_component_manager.py +51 -0
- streamlit/components/v2/manifest_scanner.py +615 -0
- streamlit/components/v2/presentation.py +198 -0
- streamlit/components/v2/types.py +324 -0
- streamlit/config.py +456 -53
- streamlit/config_option.py +4 -1
- streamlit/config_util.py +650 -1
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/connections/snowpark_connection.py +1 -1
- streamlit/dataframe_util.py +33 -26
- streamlit/delta_generator.py +13 -4
- streamlit/delta_generator_singletons.py +11 -15
- streamlit/deprecation_util.py +17 -6
- streamlit/elements/alert.py +16 -0
- streamlit/elements/arrow.py +68 -10
- streamlit/elements/bokeh_chart.py +10 -78
- streamlit/elements/code.py +2 -2
- streamlit/elements/deck_gl_json_chart.py +98 -40
- streamlit/elements/dialog_decorator.py +2 -1
- streamlit/elements/exception.py +4 -2
- streamlit/elements/form.py +27 -0
- streamlit/elements/graphviz_chart.py +1 -3
- streamlit/elements/heading.py +63 -10
- streamlit/elements/html.py +13 -2
- streamlit/elements/image.py +3 -5
- streamlit/elements/layouts.py +59 -33
- streamlit/elements/lib/built_in_chart_utils.py +50 -19
- streamlit/elements/lib/color_util.py +9 -19
- streamlit/elements/lib/column_config_utils.py +9 -12
- streamlit/elements/lib/column_types.py +40 -12
- streamlit/elements/lib/dialog.py +2 -2
- streamlit/elements/lib/image_utils.py +3 -5
- streamlit/elements/lib/layout_utils.py +100 -13
- streamlit/elements/lib/mutable_status_container.py +2 -2
- streamlit/elements/lib/options_selector_utils.py +2 -2
- streamlit/elements/lib/pandas_styler_utils.py +17 -9
- streamlit/elements/lib/shortcut_utils.py +152 -0
- streamlit/elements/lib/utils.py +4 -4
- streamlit/elements/map.py +80 -37
- streamlit/elements/markdown.py +50 -3
- streamlit/elements/media.py +5 -7
- streamlit/elements/metric.py +34 -6
- streamlit/elements/pdf.py +2 -4
- streamlit/elements/plotly_chart.py +197 -20
- streamlit/elements/progress.py +2 -4
- streamlit/elements/space.py +113 -0
- streamlit/elements/spinner.py +1 -1
- streamlit/elements/text.py +20 -3
- streamlit/elements/toast.py +2 -0
- streamlit/elements/vega_charts.py +356 -149
- streamlit/elements/widgets/audio_input.py +12 -11
- streamlit/elements/widgets/button.py +280 -43
- streamlit/elements/widgets/button_group.py +60 -9
- streamlit/elements/widgets/camera_input.py +3 -5
- streamlit/elements/widgets/chat.py +307 -43
- streamlit/elements/widgets/color_picker.py +8 -1
- streamlit/elements/widgets/data_editor.py +88 -44
- streamlit/elements/widgets/file_uploader.py +9 -11
- streamlit/elements/widgets/multiselect.py +4 -3
- streamlit/elements/widgets/number_input.py +4 -4
- streamlit/elements/widgets/radio.py +10 -3
- streamlit/elements/widgets/select_slider.py +8 -5
- streamlit/elements/widgets/selectbox.py +6 -3
- streamlit/elements/widgets/slider.py +38 -42
- streamlit/elements/widgets/text_widgets.py +2 -0
- streamlit/elements/widgets/time_widgets.py +587 -21
- streamlit/elements/write.py +27 -6
- streamlit/emojis.py +1 -1
- streamlit/errors.py +137 -0
- streamlit/git_util.py +1 -1
- streamlit/hello/hello.py +8 -0
- streamlit/hello/utils.py +2 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/navigation/page.py +11 -1
- streamlit/net_util.py +2 -2
- streamlit/proto/Alert_pb2.pyi +3 -3
- streamlit/proto/AppPage_pb2.pyi +7 -1
- streamlit/proto/ArrowData_pb2.py +27 -0
- streamlit/proto/ArrowData_pb2.pyi +52 -0
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +7 -1
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +7 -1
- streamlit/proto/Arrow_pb2.py +10 -10
- streamlit/proto/Arrow_pb2.pyi +19 -12
- streamlit/proto/AudioInput_pb2.pyi +7 -1
- streamlit/proto/Audio_pb2.pyi +7 -1
- streamlit/proto/AuthRedirect_pb2.pyi +7 -1
- streamlit/proto/AutoRerun_pb2.pyi +7 -1
- streamlit/proto/BackMsg_pb2.py +4 -2
- streamlit/proto/BackMsg_pb2.pyi +34 -4
- streamlit/proto/Balloons_pb2.pyi +7 -1
- streamlit/proto/BidiComponent_pb2.py +34 -0
- streamlit/proto/BidiComponent_pb2.pyi +159 -0
- streamlit/proto/Block_pb2.py +7 -7
- streamlit/proto/Block_pb2.pyi +39 -36
- streamlit/proto/BokehChart_pb2.pyi +7 -1
- streamlit/proto/ButtonGroup_pb2.pyi +9 -9
- streamlit/proto/Button_pb2.py +2 -2
- streamlit/proto/Button_pb2.pyi +11 -2
- streamlit/proto/CameraInput_pb2.pyi +7 -1
- streamlit/proto/ChatInput_pb2.py +6 -6
- streamlit/proto/ChatInput_pb2.pyi +18 -6
- streamlit/proto/Checkbox_pb2.pyi +3 -3
- streamlit/proto/ClientState_pb2.pyi +10 -4
- streamlit/proto/Code_pb2.pyi +7 -1
- streamlit/proto/ColorPicker_pb2.pyi +7 -1
- streamlit/proto/Common_pb2.py +3 -3
- streamlit/proto/Common_pb2.pyi +35 -23
- streamlit/proto/Components_pb2.pyi +19 -13
- streamlit/proto/DataFrame_pb2.pyi +55 -49
- streamlit/proto/DateInput_pb2.pyi +7 -1
- streamlit/proto/DateTimeInput_pb2.py +28 -0
- streamlit/proto/DateTimeInput_pb2.pyi +92 -0
- streamlit/proto/DeckGlJsonChart_pb2.py +10 -4
- streamlit/proto/DeckGlJsonChart_pb2.pyi +12 -6
- streamlit/proto/Delta_pb2.pyi +7 -1
- streamlit/proto/DocString_pb2.pyi +10 -4
- streamlit/proto/DownloadButton_pb2.py +2 -2
- streamlit/proto/DownloadButton_pb2.pyi +16 -2
- streamlit/proto/Element_pb2.py +7 -3
- streamlit/proto/Element_pb2.pyi +33 -5
- streamlit/proto/Empty_pb2.pyi +7 -1
- streamlit/proto/Exception_pb2.pyi +7 -1
- streamlit/proto/Favicon_pb2.pyi +7 -1
- streamlit/proto/FileUploader_pb2.pyi +7 -1
- streamlit/proto/ForwardMsg_pb2.py +12 -10
- streamlit/proto/ForwardMsg_pb2.pyi +42 -15
- streamlit/proto/GapSize_pb2.pyi +4 -4
- streamlit/proto/GitInfo_pb2.pyi +3 -3
- streamlit/proto/GraphVizChart_pb2.pyi +7 -1
- streamlit/proto/Heading_pb2.pyi +7 -1
- streamlit/proto/HeightConfig_pb2.py +2 -2
- streamlit/proto/HeightConfig_pb2.pyi +13 -4
- streamlit/proto/Html_pb2.py +2 -2
- streamlit/proto/Html_pb2.pyi +11 -2
- streamlit/proto/IFrame_pb2.pyi +7 -1
- streamlit/proto/Image_pb2.pyi +10 -4
- streamlit/proto/Json_pb2.pyi +7 -1
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +3 -3
- streamlit/proto/LinkButton_pb2.py +2 -2
- streamlit/proto/LinkButton_pb2.pyi +15 -2
- streamlit/proto/Logo_pb2.pyi +7 -1
- streamlit/proto/Markdown_pb2.pyi +3 -3
- streamlit/proto/Metric_pb2.pyi +7 -7
- streamlit/proto/MetricsEvent_pb2.pyi +10 -4
- streamlit/proto/MultiSelect_pb2.pyi +7 -1
- streamlit/proto/NamedDataSet_pb2.pyi +7 -1
- streamlit/proto/Navigation_pb2.pyi +3 -3
- streamlit/proto/NewSession_pb2.py +18 -18
- streamlit/proto/NewSession_pb2.pyi +59 -40
- streamlit/proto/NumberInput_pb2.pyi +3 -3
- streamlit/proto/PageConfig_pb2.pyi +7 -7
- streamlit/proto/PageInfo_pb2.pyi +7 -1
- streamlit/proto/PageLink_pb2.py +2 -2
- streamlit/proto/PageLink_pb2.pyi +11 -2
- streamlit/proto/PageNotFound_pb2.pyi +7 -1
- streamlit/proto/PageProfile_pb2.pyi +13 -7
- streamlit/proto/PagesChanged_pb2.pyi +7 -1
- streamlit/proto/ParentMessage_pb2.pyi +7 -1
- streamlit/proto/PlotlyChart_pb2.py +8 -6
- streamlit/proto/PlotlyChart_pb2.pyi +9 -7
- streamlit/proto/Progress_pb2.pyi +7 -1
- streamlit/proto/Radio_pb2.pyi +7 -1
- streamlit/proto/RootContainer_pb2.pyi +1 -1
- streamlit/proto/Selectbox_pb2.pyi +7 -1
- streamlit/proto/SessionEvent_pb2.pyi +7 -1
- streamlit/proto/SessionStatus_pb2.pyi +7 -1
- streamlit/proto/Skeleton_pb2.pyi +3 -3
- streamlit/proto/Slider_pb2.pyi +5 -5
- streamlit/proto/Snow_pb2.pyi +7 -1
- streamlit/proto/Space_pb2.py +27 -0
- streamlit/proto/Space_pb2.pyi +48 -0
- streamlit/proto/Spinner_pb2.pyi +7 -1
- streamlit/proto/TextAlignmentConfig_pb2.py +29 -0
- streamlit/proto/TextAlignmentConfig_pb2.pyi +68 -0
- streamlit/proto/TextArea_pb2.pyi +7 -1
- streamlit/proto/TextInput_pb2.pyi +3 -3
- streamlit/proto/Text_pb2.pyi +7 -1
- streamlit/proto/TimeInput_pb2.pyi +7 -1
- streamlit/proto/Toast_pb2.pyi +7 -1
- streamlit/proto/VegaLiteChart_pb2.pyi +7 -1
- streamlit/proto/Video_pb2.pyi +6 -6
- streamlit/proto/WidgetStates_pb2.py +2 -2
- streamlit/proto/WidgetStates_pb2.pyi +23 -7
- streamlit/proto/WidthConfig_pb2.py +2 -2
- streamlit/proto/WidthConfig_pb2.pyi +13 -4
- streamlit/proto/openmetrics_data_model_pb2.pyi +52 -52
- streamlit/runtime/app_session.py +65 -2
- streamlit/runtime/caching/cache_data_api.py +5 -5
- streamlit/runtime/caching/cache_errors.py +4 -1
- streamlit/runtime/caching/cache_resource_api.py +5 -4
- streamlit/runtime/caching/cache_utils.py +3 -2
- streamlit/runtime/caching/cached_message_replay.py +3 -3
- streamlit/runtime/caching/hashing.py +4 -5
- streamlit/runtime/caching/legacy_cache_api.py +2 -1
- streamlit/runtime/connection_factory.py +1 -3
- streamlit/runtime/download_data_util.py +53 -0
- streamlit/runtime/forward_msg_queue.py +5 -1
- streamlit/runtime/fragment.py +2 -1
- streamlit/runtime/media_file_manager.py +178 -2
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/metrics_util.py +91 -3
- streamlit/runtime/runtime.py +14 -0
- streamlit/runtime/scriptrunner/exec_code.py +2 -1
- streamlit/runtime/scriptrunner/script_runner.py +5 -3
- streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -6
- streamlit/runtime/secrets.py +2 -4
- streamlit/runtime/session_manager.py +3 -1
- streamlit/runtime/state/common.py +30 -5
- streamlit/runtime/state/presentation.py +85 -0
- streamlit/runtime/state/query_params.py +80 -29
- streamlit/runtime/state/safe_session_state.py +2 -2
- streamlit/runtime/state/session_state.py +221 -17
- streamlit/runtime/state/widgets.py +19 -3
- streamlit/runtime/websocket_session_manager.py +3 -1
- streamlit/source_util.py +2 -2
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +557 -239
- streamlit/static/static/css/{index.CIiu7Ygf.css โ index.BpABIXK9.css} +1 -1
- streamlit/static/static/css/index.DgR7E2CV.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.DUpR0_Ka.js โ ErrorOutline.esm.ZJDbmVTx.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CN4j9-1w.js โ FileDownload.esm.Dx0vI3vH.js} +1 -1
- streamlit/static/static/js/{FileHelper.CaIUKG91.js โ FileHelper.B7Ero7qQ.js} +3 -3
- streamlit/static/static/js/{FormClearHelper.DTcdrasw.js โ FormClearHelper.CG2XN1_g.js} +1 -1
- streamlit/static/static/js/IFrameUtil.DefezniK.js +1 -0
- streamlit/static/static/js/InputInstructions.Cj5-1zf6.js +1 -0
- streamlit/static/static/js/Particles.BfWfv0Aw.js +1 -0
- streamlit/static/static/js/{ProgressBar.DetlP5aY.js โ ProgressBar.CGQ8OgfO.js} +2 -2
- streamlit/static/static/js/StreamlitSyntaxHighlighter.DTKLpwhl.js +20 -0
- streamlit/static/static/js/{Toolbar.C77ar7rq.js โ Toolbar.B2qFUmd9.js} +1 -1
- streamlit/static/static/js/_arrayIncludes.B19Iyn2B.js +1 -0
- streamlit/static/static/js/_baseIndexOf.BTknn6Gb.js +1 -0
- streamlit/static/static/js/{base-input.BQft14La.js โ base-input.o9tL8MDP.js} +4 -4
- streamlit/static/static/js/{checkbox.yZOfXCeX.js โ checkbox.0BeV1IBL.js} +1 -1
- streamlit/static/static/js/{createSuper.Dh9w1cs8.js โ createSuper.RBO59fEm.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.CiTkUy0t.js +1 -0
- streamlit/static/static/js/{downloader.MeHtkq8r.js โ downloader.DwNZg3Mw.js} +1 -1
- streamlit/static/static/js/embed.XT9xNd3F.js +195 -0
- streamlit/static/static/js/{es6.VpBPGCnM.js โ es6.x9KsYQg-.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.yMw_ARIL.js โ iframeResizer.contentWindow.ZVXpMPi0.js} +1 -1
- streamlit/static/static/js/index.5VPOamri.js +1 -0
- streamlit/static/static/js/index.8HslT92O.js +14 -0
- streamlit/static/static/js/index.AnXMIBz3.js +7 -0
- streamlit/static/static/js/index.B0yp3bM1.js +6 -0
- streamlit/static/static/js/index.B1fRb5wF.js +1 -0
- streamlit/static/static/js/index.B527JZdO.js +3 -0
- streamlit/static/static/js/index.BHgV-yW4.js +1 -0
- streamlit/static/static/js/index.BQr-XwGV.js +1 -0
- streamlit/static/static/js/index.BTtmaLDB.js +1 -0
- streamlit/static/static/js/index.BWB_91TA.js +1 -0
- streamlit/static/static/js/index.BfEKaEmw.js +1 -0
- streamlit/static/static/js/index.BfXjTO8b.js +1 -0
- streamlit/static/static/js/index.Bjy4NRu9.js +3 -0
- streamlit/static/static/js/index.Bu5JWpT_.js +1 -0
- streamlit/static/static/js/index.BuCx76ZV.js +1 -0
- streamlit/static/static/js/index.BxjzhVUb.js +2 -0
- streamlit/static/static/js/index.By55VdPY.js +1 -0
- streamlit/static/static/js/index.CF5MxTbK.js +1 -0
- streamlit/static/static/js/index.CLmq_z9K.js +1 -0
- streamlit/static/static/js/index.CNH4rdSz.js +1 -0
- streamlit/static/static/js/{index.B0H9IXUJ.js โ index.CTgm_-jO.js} +10 -41
- streamlit/static/static/js/index.C_rK-Swb.js +188 -0
- streamlit/static/static/js/index.CjozwSzS.js +1 -0
- streamlit/static/static/js/{index.CH1tqnSs.js โ index.CkGVt6-G.js} +1 -1
- streamlit/static/static/js/index.CuvXOyER.js +2 -0
- streamlit/static/static/js/{index.FFOzOWzC.js โ index.CyUHWoCC.js} +2 -2
- streamlit/static/static/js/index.CyroQtI4.js +2 -0
- streamlit/static/static/js/index.D6HmkoDm.js +263 -0
- streamlit/static/static/js/index.DAqCNvsO.js +1 -0
- streamlit/static/static/js/index.DB_w_CZQ.js +1 -0
- streamlit/static/static/js/index.DBalctjj.js +2 -0
- streamlit/static/static/js/index.DK0RFJUG.js +11 -0
- streamlit/static/static/js/index.DMxc2XFp.js +151 -0
- streamlit/static/static/js/index.DO5utP74.js +2 -0
- streamlit/static/static/js/index.DS7lf09n.js +1 -0
- streamlit/static/static/js/index.DWexTVLY.js +1 -0
- streamlit/static/static/js/index.DXxnU5ej.js +1 -0
- streamlit/static/static/js/index.DcU3uDvB.js +2 -0
- streamlit/static/static/js/index.DlltaH7J.js +1 -0
- streamlit/static/static/js/index.DpNTZz82.js +27 -0
- streamlit/static/static/js/index.Dr9HIhQw.js +1 -0
- streamlit/static/static/js/index.DsgAU5lc.js +1 -0
- streamlit/static/static/js/{index.64ejlaaT.js โ index.KfXqjDYy.js} +1 -1
- streamlit/static/static/js/index.PaidgjCs.js +1 -0
- streamlit/static/static/js/index.RJZuWCGA.js +1 -0
- streamlit/static/static/js/{index.Ctn27_AE.js โ index.hbeqcRTn.js} +53 -122
- streamlit/static/static/js/index.q5hIQwAY.js +1 -0
- streamlit/static/static/js/index.rORSX6IW.js +1 -0
- streamlit/static/static/js/index.uSX757_v.js +1 -0
- streamlit/static/static/js/index.x_QRaLMd.js +1 -0
- streamlit/static/static/js/{input.s6pjQ49A.js โ input.D5oh9-aB.js} +2 -2
- streamlit/static/static/js/main.q9oGOg0H.js +13 -0
- streamlit/static/static/js/{memory.Cuvsdfrl.js โ memory.5kCSFUJS.js} +1 -1
- streamlit/static/static/js/moment.C3j7ZXd7.js +4 -0
- streamlit/static/static/js/number-overlay-editor.Cn_LsK8N.js +9 -0
- streamlit/static/static/js/pandasStylerUtils.BqhXt51_.js +1 -0
- streamlit/static/static/js/{possibleConstructorReturn.CqidKeei.js โ possibleConstructorReturn.DD9NK1Z8.js} +1 -1
- streamlit/static/static/js/record.B-tDciZb.js +1 -0
- streamlit/static/static/js/{sandbox.CCQREcJx.js โ sandbox.DACSyz29.js} +1 -1
- streamlit/static/static/js/styled-components.C3R090At.js +1 -0
- streamlit/static/static/js/threshold.Q1mXg5rX.js +1 -0
- streamlit/static/static/js/throttle.B0GR3Iyz.js +1 -0
- streamlit/static/static/js/{timepicker.mkJF97Bb.js โ timepicker.BdhzPxrv.js} +1 -1
- streamlit/static/static/js/timer.C2hYhUse.js +1 -0
- streamlit/static/static/js/{toConsumableArray.De7I7KVR.js โ toConsumableArray.Db2pdqM2.js} +1 -1
- streamlit/static/static/js/uniqueId.CtqIr-Yh.js +1 -0
- streamlit/static/static/js/urls.BwSlolu9.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.CedkNjUW.js โ useBasicWidgetState.Bfp6TnSw.js} +1 -1
- streamlit/static/static/js/useIntlLocale.hRV75Xgj.js +12 -0
- streamlit/static/static/js/{useTextInputAutoExpand.Ca7w8dVs.js โ useTextInputAutoExpand.QepX7n8Y.js} +1 -1
- streamlit/static/static/js/useUpdateUiValue.DHx8TzX6.js +1 -0
- streamlit/static/static/js/useWaveformController.WxVzpzEX.js +1 -0
- streamlit/static/static/js/value.B4vHRSi7.js +1 -0
- streamlit/static/static/js/wavesurfer.esm.vI8Eid4k.js +73 -0
- streamlit/static/static/js/withCalculatedWidth.DcKeRSWJ.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.CrHddARq.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
- streamlit/string_util.py +9 -4
- streamlit/testing/v1/app_test.py +17 -2
- streamlit/testing/v1/element_tree.py +85 -9
- streamlit/testing/v1/util.py +2 -2
- streamlit/type_util.py +3 -4
- streamlit/url_util.py +1 -3
- streamlit/user_info.py +1 -2
- streamlit/util.py +3 -1
- streamlit/watcher/event_based_path_watcher.py +23 -12
- streamlit/watcher/local_sources_watcher.py +11 -1
- streamlit/watcher/path_watcher.py +9 -6
- streamlit/watcher/polling_path_watcher.py +4 -1
- streamlit/watcher/util.py +2 -2
- streamlit/web/bootstrap.py +24 -0
- streamlit/web/cli.py +51 -22
- streamlit/web/server/bidi_component_request_handler.py +193 -0
- streamlit/web/server/component_file_utils.py +97 -0
- streamlit/web/server/component_request_handler.py +8 -21
- streamlit/web/server/oauth_authlib_routes.py +5 -2
- streamlit/web/server/oidc_mixin.py +3 -1
- streamlit/web/server/routes.py +2 -2
- streamlit/web/server/server.py +9 -0
- streamlit/web/server/server_util.py +3 -1
- streamlit/web/server/upload_file_request_handler.py +19 -1
- {streamlit-1.50.0.dist-info โ streamlit-1.52.0.dist-info}/METADATA +10 -7
- streamlit-1.52.0.dist-info/RECORD +620 -0
- streamlit/static/static/css/index.CHEnSPGk.css +0 -1
- streamlit/static/static/js/Hooks.BRba_Own.js +0 -1
- streamlit/static/static/js/InputInstructions.xnSDuYeQ.js +0 -1
- streamlit/static/static/js/Particles.CElH0XX2.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.DcuHuCyW.js +0 -1
- streamlit/static/static/js/index.6xX1278W.js +0 -975
- streamlit/static/static/js/index.B-hiXRzw.js +0 -1
- streamlit/static/static/js/index.B4cAbHP6.js +0 -1
- streamlit/static/static/js/index.B4dUQfni.js +0 -1
- streamlit/static/static/js/index.BPQo7BKk.js +0 -1
- streamlit/static/static/js/index.Baqa90pe.js +0 -2
- streamlit/static/static/js/index.Bj9JgOEC.js +0 -1
- streamlit/static/static/js/index.BjCwMzj4.js +0 -3
- streamlit/static/static/js/index.Bm3VbPB5.js +0 -1
- streamlit/static/static/js/index.Bxz2yX3P.js +0 -1
- streamlit/static/static/js/index.BycLveZ4.js +0 -1
- streamlit/static/static/js/index.C9BdUqTi.js +0 -1
- streamlit/static/static/js/index.CFMf5_ez.js +0 -197
- streamlit/static/static/js/index.CGYqqs6j.js +0 -1
- streamlit/static/static/js/index.CMItVsFA.js +0 -1
- streamlit/static/static/js/index.CTBk8Vk2.js +0 -1
- streamlit/static/static/js/index.CiAQIz1H.js +0 -7
- streamlit/static/static/js/index.Cj7DSzVR.js +0 -73
- streamlit/static/static/js/index.Ck8rQ9OL.js +0 -1
- streamlit/static/static/js/index.ClELlchS.js +0 -1617
- streamlit/static/static/js/index.Cnpi3o3E.js +0 -1
- streamlit/static/static/js/index.D2QEXQq_.js +0 -1
- streamlit/static/static/js/index.DH71Ezyj.js +0 -1
- streamlit/static/static/js/index.DHh-U0dK.js +0 -3
- streamlit/static/static/js/index.DK7hD7_w.js +0 -1
- streamlit/static/static/js/index.DKv_lNO7.js +0 -2
- streamlit/static/static/js/index.DNLrMXgm.js +0 -12
- streamlit/static/static/js/index.DW0Grddz.js +0 -1
- streamlit/static/static/js/index.Dbe-Q3C-.js +0 -2
- streamlit/static/static/js/index.DcPNYEUo.js +0 -1
- streamlit/static/static/js/index.DuxqVQpd.js +0 -1
- streamlit/static/static/js/index.GRUzrudl.js +0 -1
- streamlit/static/static/js/number-overlay-editor.DdgVR5m3.js +0 -9
- streamlit/static/static/js/uniqueId.RI1LJdtz.js +0 -1
- streamlit/static/static/js/useUpdateUiValue.DeXelfRH.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.C3561XxJ.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DeCZgS-4.woff2 +0 -0
- streamlit-1.50.0.dist-info/RECORD +0 -557
- {streamlit-1.50.0.data โ streamlit-1.52.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.50.0.dist-info โ streamlit-1.52.0.dist-info}/WHEEL +0 -0
- {streamlit-1.50.0.dist-info โ streamlit-1.52.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.50.0.dist-info โ streamlit-1.52.0.dist-info}/top_level.txt +0 -0
streamlit/__init__.py
CHANGED
|
@@ -165,6 +165,7 @@ audio_input = _main.audio_input
|
|
|
165
165
|
badge = _main.badge
|
|
166
166
|
balloons = _main.balloons
|
|
167
167
|
bar_chart = _main.bar_chart
|
|
168
|
+
_bidi_component = _main._bidi_component
|
|
168
169
|
bokeh_chart = _main.bokeh_chart
|
|
169
170
|
button = _main.button
|
|
170
171
|
caption = _main.caption
|
|
@@ -179,6 +180,7 @@ container = _main.container
|
|
|
179
180
|
dataframe = _main.dataframe
|
|
180
181
|
data_editor = _main.data_editor
|
|
181
182
|
date_input = _main.date_input
|
|
183
|
+
datetime_input = _main.datetime_input
|
|
182
184
|
divider = _main.divider
|
|
183
185
|
download_button = _main.download_button
|
|
184
186
|
expander = _main.expander
|
|
@@ -219,6 +221,7 @@ select_slider = _main.select_slider
|
|
|
219
221
|
segmented_control = _main.segmented_control
|
|
220
222
|
slider = _main.slider
|
|
221
223
|
snow = _main.snow
|
|
224
|
+
space = _main.space
|
|
222
225
|
subheader = _main.subheader
|
|
223
226
|
success = _main.success
|
|
224
227
|
table = _main.table
|
|
@@ -304,4 +307,5 @@ experimental_set_query_params = _deprecate_func_name(
|
|
|
304
307
|
# make it possible to call streamlit.components.v1.html etc. by importing it here
|
|
305
308
|
# import in the very end to avoid partially-initialized module import errors, because
|
|
306
309
|
# streamlit.components.v1 also uses some streamlit imports
|
|
307
|
-
import streamlit.components.v1
|
|
310
|
+
import streamlit.components.v1
|
|
311
|
+
import streamlit.components.v2 # noqa: F401
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
17
|
import os
|
|
18
|
+
import time
|
|
19
|
+
from collections.abc import Iterable, Mapping
|
|
18
20
|
from itertools import dropwhile
|
|
19
21
|
from pathlib import Path
|
|
20
|
-
from typing import Literal, NoReturn
|
|
22
|
+
from typing import TYPE_CHECKING, Literal, NoReturn
|
|
21
23
|
|
|
22
24
|
import streamlit as st
|
|
23
25
|
from streamlit.errors import NoSessionContext, StreamlitAPIException
|
|
@@ -30,6 +32,9 @@ from streamlit.runtime.scriptrunner import (
|
|
|
30
32
|
get_script_run_ctx,
|
|
31
33
|
)
|
|
32
34
|
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
from streamlit.runtime.state.query_params import QueryParams, QueryParamsInput
|
|
37
|
+
|
|
33
38
|
|
|
34
39
|
@gather_metrics("stop")
|
|
35
40
|
def stop() -> NoReturn: # type: ignore[misc]
|
|
@@ -99,6 +104,31 @@ def _new_fragment_id_queue(
|
|
|
99
104
|
return new_queue
|
|
100
105
|
|
|
101
106
|
|
|
107
|
+
def _set_query_params_for_switch(
|
|
108
|
+
query_params_state: QueryParams,
|
|
109
|
+
new_query_params: QueryParamsInput | None,
|
|
110
|
+
) -> None:
|
|
111
|
+
"""Set query params for a switch page."""
|
|
112
|
+
|
|
113
|
+
if new_query_params is None:
|
|
114
|
+
query_params_state.clear()
|
|
115
|
+
return
|
|
116
|
+
|
|
117
|
+
if isinstance(new_query_params, Mapping) or (
|
|
118
|
+
isinstance(new_query_params, Iterable)
|
|
119
|
+
and not isinstance(
|
|
120
|
+
new_query_params, # type: ignore[unreachable]
|
|
121
|
+
(str, bytes),
|
|
122
|
+
)
|
|
123
|
+
):
|
|
124
|
+
query_params_state.from_dict(new_query_params)
|
|
125
|
+
return
|
|
126
|
+
|
|
127
|
+
raise StreamlitAPIException(
|
|
128
|
+
f"`query_params` must be a mapping or an iterable of (key, value) pairs not a `{type(new_query_params)}`."
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
102
132
|
@gather_metrics("rerun")
|
|
103
133
|
def rerun( # type: ignore[misc]
|
|
104
134
|
*, # The scope argument can only be passed via keyword.
|
|
@@ -155,7 +185,11 @@ def rerun( # type: ignore[misc]
|
|
|
155
185
|
|
|
156
186
|
|
|
157
187
|
@gather_metrics("switch_page")
|
|
158
|
-
def switch_page(
|
|
188
|
+
def switch_page( # type: ignore[misc]
|
|
189
|
+
page: str | Path | StreamlitPage,
|
|
190
|
+
*,
|
|
191
|
+
query_params: QueryParamsInput | None = None,
|
|
192
|
+
) -> NoReturn: # ty: ignore[invalid-return-type]
|
|
159
193
|
"""Programmatically switch the current page in a multipage app.
|
|
160
194
|
|
|
161
195
|
When ``st.switch_page`` is called, the current page execution stops and
|
|
@@ -166,20 +200,31 @@ def switch_page(page: str | Path | StreamlitPage) -> NoReturn: # type: ignore[m
|
|
|
166
200
|
|
|
167
201
|
Parameters
|
|
168
202
|
----------
|
|
169
|
-
page: str, Path, or st.Page
|
|
203
|
+
page : str, Path, or st.Page
|
|
170
204
|
The file path (relative to the main script) or an st.Page indicating
|
|
171
205
|
the page to switch to.
|
|
172
206
|
|
|
207
|
+
query_params : dict, list of tuples, or None
|
|
208
|
+
Query parameters to apply when navigating to the target page.
|
|
209
|
+
This can be a dictionary or an iterable of key-value tuples. Values can
|
|
210
|
+
be strings or iterables of strings (for repeated keys). When this is
|
|
211
|
+
``None`` (default), all non-embed query parameters are cleared during
|
|
212
|
+
navigation.
|
|
173
213
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
214
|
+
Examples
|
|
215
|
+
--------
|
|
216
|
+
**Example 1: Basic usage**
|
|
217
|
+
|
|
218
|
+
The following example shows how to switch to a different page in a
|
|
219
|
+
multipage app that uses the ``pages/`` directory:
|
|
177
220
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
221
|
+
.. code-block:: text
|
|
222
|
+
|
|
223
|
+
your-repository/
|
|
224
|
+
โโโ pages/
|
|
225
|
+
โ โโโ page_1.py
|
|
226
|
+
โ โโโ page_2.py
|
|
227
|
+
โโโ your_app.py
|
|
183
228
|
|
|
184
229
|
>>> import streamlit as st
|
|
185
230
|
>>>
|
|
@@ -190,10 +235,35 @@ def switch_page(page: str | Path | StreamlitPage) -> NoReturn: # type: ignore[m
|
|
|
190
235
|
>>> if st.button("Page 2"):
|
|
191
236
|
>>> st.switch_page("pages/page_2.py")
|
|
192
237
|
|
|
193
|
-
.. output
|
|
238
|
+
.. output::
|
|
194
239
|
https://doc-switch-page.streamlit.app/
|
|
195
240
|
height: 350px
|
|
196
241
|
|
|
242
|
+
**Example 2: Passing query parameters**
|
|
243
|
+
|
|
244
|
+
The following example shows how to pass query parameters when switching to a
|
|
245
|
+
different page. This example uses ``st.navigation`` to create a multipage app.
|
|
246
|
+
|
|
247
|
+
.. code-block:: text
|
|
248
|
+
|
|
249
|
+
your-repository/
|
|
250
|
+
โโโ page_2.py
|
|
251
|
+
โโโ your_app.py
|
|
252
|
+
|
|
253
|
+
>>> import streamlit as st
|
|
254
|
+
>>>
|
|
255
|
+
>>> def page_1():
|
|
256
|
+
>>> st.title("Page 1")
|
|
257
|
+
>>> if st.button("Switch to Page 2"):
|
|
258
|
+
>>> st.switch_page("page_2.py", query_params={"utm_source": "page_1"})
|
|
259
|
+
>>>
|
|
260
|
+
>>> pg = st.navigation([page_1, "page_2.py"])
|
|
261
|
+
>>> pg.run()
|
|
262
|
+
|
|
263
|
+
.. output::
|
|
264
|
+
https://doc-switch-page-query-params.streamlit.app/
|
|
265
|
+
height: 350px
|
|
266
|
+
|
|
197
267
|
"""
|
|
198
268
|
|
|
199
269
|
ctx = get_script_run_ctx()
|
|
@@ -227,9 +297,14 @@ def switch_page(page: str | Path | StreamlitPage) -> NoReturn: # type: ignore[m
|
|
|
227
297
|
|
|
228
298
|
page_script_hash = matched_pages[0]["page_script_hash"]
|
|
229
299
|
|
|
230
|
-
#
|
|
300
|
+
# Reset query params (with exception of embed) and optionally apply overrides.
|
|
231
301
|
with ctx.session_state.query_params() as qp:
|
|
232
|
-
qp
|
|
302
|
+
_set_query_params_for_switch(qp, query_params)
|
|
303
|
+
# Additional safeguard to ensure the query params
|
|
304
|
+
# are sent out to the frontend before the new rerun might clear
|
|
305
|
+
# outstanding messages. This uses the same time that is used as waiting
|
|
306
|
+
# in our event loop.
|
|
307
|
+
time.sleep(0.01)
|
|
233
308
|
|
|
234
309
|
ctx.script_requests.request_rerun(
|
|
235
310
|
RerunData(
|
streamlit/commands/navigation.py
CHANGED
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
from collections.abc import Mapping, Sequence
|
|
17
|
+
from collections.abc import Callable, Mapping, Sequence
|
|
18
18
|
from pathlib import Path
|
|
19
|
-
from typing import TYPE_CHECKING,
|
|
20
|
-
|
|
21
|
-
from typing_extensions import TypeAlias
|
|
19
|
+
from typing import TYPE_CHECKING, Literal, TypeAlias
|
|
22
20
|
|
|
23
21
|
from streamlit import config
|
|
24
22
|
from streamlit.errors import StreamlitAPIException
|
|
@@ -37,7 +35,7 @@ if TYPE_CHECKING:
|
|
|
37
35
|
from streamlit.source_util import PageHash, PageInfo
|
|
38
36
|
|
|
39
37
|
SectionHeader: TypeAlias = str
|
|
40
|
-
PageType: TypeAlias =
|
|
38
|
+
PageType: TypeAlias = str | Path | Callable[[], None] | StreamlitPage
|
|
41
39
|
|
|
42
40
|
|
|
43
41
|
def convert_to_streamlit_page(
|
|
@@ -318,7 +316,7 @@ def _navigation(
|
|
|
318
316
|
else:
|
|
319
317
|
nav_sections = {
|
|
320
318
|
section: [convert_to_streamlit_page(p) for p in section_pages]
|
|
321
|
-
for section, section_pages in pages.items()
|
|
319
|
+
for section, section_pages in pages.items()
|
|
322
320
|
}
|
|
323
321
|
page_list = pages_from_nav_sections(nav_sections)
|
|
324
322
|
|
|
@@ -18,9 +18,7 @@ import random
|
|
|
18
18
|
from collections.abc import Mapping
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
from textwrap import dedent
|
|
21
|
-
from typing import TYPE_CHECKING, Any, Final, Literal,
|
|
22
|
-
|
|
23
|
-
from typing_extensions import TypeAlias
|
|
21
|
+
from typing import TYPE_CHECKING, Any, Final, Literal, TypeAlias, cast
|
|
24
22
|
|
|
25
23
|
from streamlit.elements.lib.image_utils import AtomicImage, image_to_url
|
|
26
24
|
from streamlit.elements.lib.layout_utils import LayoutConfig
|
|
@@ -38,20 +36,20 @@ from streamlit.string_util import is_emoji, validate_material_icon
|
|
|
38
36
|
from streamlit.url_util import is_url
|
|
39
37
|
|
|
40
38
|
if TYPE_CHECKING:
|
|
41
|
-
from
|
|
39
|
+
from typing import TypeGuard
|
|
42
40
|
|
|
43
41
|
GET_HELP_KEY: Final = "get help"
|
|
44
42
|
REPORT_A_BUG_KEY: Final = "report a bug"
|
|
45
43
|
ABOUT_KEY: Final = "about"
|
|
46
44
|
|
|
47
|
-
PageIcon: TypeAlias =
|
|
45
|
+
PageIcon: TypeAlias = AtomicImage | str
|
|
48
46
|
Layout: TypeAlias = Literal["centered", "wide"]
|
|
49
47
|
InitialSideBarState: TypeAlias = Literal["auto", "expanded", "collapsed"]
|
|
50
48
|
_GetHelp: TypeAlias = Literal["Get help", "Get Help", "get help"]
|
|
51
49
|
_ReportABug: TypeAlias = Literal["Report a bug", "report a bug"]
|
|
52
50
|
_About: TypeAlias = Literal["About", "about"]
|
|
53
51
|
MenuKey: TypeAlias = Literal[_GetHelp, _ReportABug, _About]
|
|
54
|
-
MenuItems: TypeAlias = Mapping[MenuKey,
|
|
52
|
+
MenuItems: TypeAlias = Mapping[MenuKey, str | None]
|
|
55
53
|
|
|
56
54
|
RANDOM_EMOJIS: Final = list(
|
|
57
55
|
"๐ฅโข๐๐๐๐ฃโจ๐๐๐๐ฅ๐คฉ๐ค๐๐คโฌ๐ก๐คช๐ฅโก๐จ๐ ๐๐ฟ๐๐ฎ๐ค๐๐๐พ๐ซโช๐ด๐๐ฌ๐๐๐โโฝ๐๐๐๐ธ๐จ๐ฅณโ๐๐
ฑ๐๐ป๐๐๐ฆ๐
๐ฆ๐๐๐ป๐๐คค๐ฏ๐ปโผ๐๐๐๐๐๐ซ๐๐ฝ๐ฌ๐
โ๐ท๐ญโ๐๐๐
๐ฅฐ๐๐๐ฅ๐บโ๐งกโ๐๐ปโ
๐ธ๐ฌ๐ค๐นยฎโบ๐ช๐โ๐ค โ๐ค๐ต๐ค๐๐ฏ๐๐ป๐๐๐๐โฃ๐๐๐๐ค๐ฟ๐ฆ๐โ๐ฟ๐๐น๐ฅด๐ฝ๐๐ญ๐ค๐๐โช๐โ๐๐ญ๐ป๐ฅ๐๐คง๐๐๐๐ค๐๐๐โโฐ๐๐งโ โฅ๐ณ๐พ๐โญ๐๐ณ๐๐๐ธโค๐ช๐๐พโ๐๐๐ โ๐๐ต๐จ๐๐คซ๐คญ๐๐๐๐๐๐๐๐
๐
๐๐๐๐ฉ๐๐คทโ๐ธ๐๐ฎ๐๐ณ๐ฝ๐๐ฟ๐๐ ๐ผ๐ถ๐ค๐โ๐๐ต๐ค๐ฐ๐๐๐ฒ๐ฎ๐๐๐๐๐ต๐ฃโ๐บ๐๐๐๐ฅบ๐๐กโฆ๐๐ฑ๐๐โ๐พ๐ฉ๐ฅถ๐ฃ๐ผ๐คฃโฏ๐ต๐ซโก๐๐โ๐๐๐น๐๐ผ๐โซ๐๐ช๐จ๐ผ๐๐๐ณ๐๐๐๐ธ๐ง๐๐๐๐โ
๐ป๐ด๐ผ๐ฟ๐โ ๐ฆโ๐คโฎ๐ข๐๐ค๐๐บ๐๐ด๐บโน๐ฒ๐๐ญ๐๐๐๐ต๐๐ด๐๐ง๐ฐโ๐๐คก๐ ๐ฒ๐๐๐ฌโ๐๐ฑ๐ฐ๐ฑ๐ง๐๐๐๐ฃ๐ซ๐๐ธ๐ฆ๐๐๐ฏ๐ข๐ถ๐ฆ
๐ง๐ข๐๐ซ๐๐๐ฝ๐๐๐๐ฒ๐๐ฅ๐ธโโฃ๐โโ๐ฏ๐๐ฐ๐ง๐ฟ๐ณ๐ท๐บ๐๐๐๐ค๐ฒ๐๐น๐๐ท๐๐ฅ๐ต๐๐ธโ โ๐ฉโ๐ผ๐โฌโพ๐๐๐โฝ๐ญ๐๐ท๐โ๐๐๐๐๐๐ค๐ฅ๐ฝ๐๐๐ฐ๐๐ดโ๐ฆ๐โ๐๐ด๐๐๐ก๐๐ฉ๐๐บโ๐ผ๐๐ถ๐บ๐๐ฌ๐๐ป๐พโฌ
โฌโถ๐ฎ๐โ๐ธ๐ถ๐ฎ๐ชโณ๐๐พ๐๐ด๐จ๐๐นยฉ๐ฃ๐ฆ๐ฃ๐จ๐๐ฌโญ๐น๐ท"
|
|
@@ -24,7 +24,7 @@ from streamlit import dataframe_util
|
|
|
24
24
|
from streamlit.elements.lib import pandas_styler_utils
|
|
25
25
|
|
|
26
26
|
if TYPE_CHECKING:
|
|
27
|
-
from pandas import DataFrame, Index
|
|
27
|
+
from pandas import DataFrame, Index
|
|
28
28
|
|
|
29
29
|
from streamlit.proto.Components_pb2 import ArrowTable as ArrowTableProto
|
|
30
30
|
|
|
@@ -57,7 +57,7 @@ def marshall(
|
|
|
57
57
|
_marshall_data(proto, df)
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def _marshall_index(proto: ArrowTableProto, index: Index) -> None:
|
|
60
|
+
def _marshall_index(proto: ArrowTableProto, index: Index[Any]) -> None:
|
|
61
61
|
"""Marshall pandas.DataFrame index into an ArrowTable proto.
|
|
62
62
|
|
|
63
63
|
Parameters
|
|
@@ -72,12 +72,12 @@ def _marshall_index(proto: ArrowTableProto, index: Index) -> None:
|
|
|
72
72
|
"""
|
|
73
73
|
import pandas as pd
|
|
74
74
|
|
|
75
|
-
index_values = map(_maybe_tuple_to_list, index.values)
|
|
75
|
+
index_values = list(map(_maybe_tuple_to_list, index.values))
|
|
76
76
|
index_df = pd.DataFrame(index_values)
|
|
77
77
|
proto.index = dataframe_util.convert_pandas_df_to_arrow_bytes(index_df)
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
def _marshall_columns(proto: ArrowTableProto, columns:
|
|
80
|
+
def _marshall_columns(proto: ArrowTableProto, columns: Index[Any]) -> None:
|
|
81
81
|
"""Marshall pandas.DataFrame columns into an ArrowTable proto.
|
|
82
82
|
|
|
83
83
|
Parameters
|
|
@@ -85,15 +85,15 @@ def _marshall_columns(proto: ArrowTableProto, columns: Series) -> None:
|
|
|
85
85
|
proto : proto.ArrowTable
|
|
86
86
|
Output. The protobuf for a Streamlit ArrowTable proto.
|
|
87
87
|
|
|
88
|
-
columns :
|
|
88
|
+
columns : Index
|
|
89
89
|
Column labels to use for resulting frame.
|
|
90
90
|
Will default to RangeIndex (0, 1, 2, ..., n) if no column labels are provided.
|
|
91
91
|
|
|
92
92
|
"""
|
|
93
93
|
import pandas as pd
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
columns_df = pd.DataFrame(
|
|
95
|
+
column_values = list(map(_maybe_tuple_to_list, columns.values))
|
|
96
|
+
columns_df = pd.DataFrame(column_values)
|
|
97
97
|
proto.columns = dataframe_util.convert_pandas_df_to_arrow_bytes(columns_df)
|
|
98
98
|
|
|
99
99
|
|