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
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Serve static assets for Custom Components v2.
|
|
16
|
+
|
|
17
|
+
This module defines a Tornado ``RequestHandler`` that serves static files for
|
|
18
|
+
Custom Components v2 from their registered component directories. Requests are
|
|
19
|
+
resolved safely within the component's root to avoid directory traversal and are
|
|
20
|
+
served with appropriate content type and cache headers. CORS headers are applied
|
|
21
|
+
based on the server configuration.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from __future__ import annotations
|
|
25
|
+
|
|
26
|
+
import os
|
|
27
|
+
from typing import TYPE_CHECKING, Final, cast
|
|
28
|
+
|
|
29
|
+
import tornado.web
|
|
30
|
+
|
|
31
|
+
import streamlit.web.server.routes
|
|
32
|
+
from streamlit.logger import get_logger
|
|
33
|
+
from streamlit.web.server.component_file_utils import (
|
|
34
|
+
build_safe_abspath,
|
|
35
|
+
guess_content_type,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
if TYPE_CHECKING:
|
|
39
|
+
from streamlit.components.v2.component_manager import BidiComponentManager
|
|
40
|
+
|
|
41
|
+
_LOGGER: Final = get_logger(__name__)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class BidiComponentRequestHandler(tornado.web.RequestHandler):
|
|
45
|
+
"""Request handler for serving Custom Components v2 static assets.
|
|
46
|
+
|
|
47
|
+
The handler resolves a requested path to a registered component's asset
|
|
48
|
+
within its component root, writes the file contents to the response, and
|
|
49
|
+
sets appropriate ``Content-Type`` and cache headers. If the component or
|
|
50
|
+
asset cannot be found, a suitable HTTP status is returned.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
def initialize(self, component_manager: BidiComponentManager) -> None:
|
|
54
|
+
"""Initialize the handler with the given component manager.
|
|
55
|
+
|
|
56
|
+
Parameters
|
|
57
|
+
----------
|
|
58
|
+
component_manager : BidiComponentManager
|
|
59
|
+
Manager used to look up registered components and their root paths.
|
|
60
|
+
"""
|
|
61
|
+
self._component_manager = component_manager
|
|
62
|
+
|
|
63
|
+
def get(self, path: str) -> None:
|
|
64
|
+
"""Serve a component asset for the given URL path.
|
|
65
|
+
|
|
66
|
+
The first path segment is interpreted as the component name. The rest
|
|
67
|
+
of the path is resolved to a file within that component's root
|
|
68
|
+
directory. If the file exists and is readable, its bytes are written to
|
|
69
|
+
the response and the ``Content-Type`` header is set based on the file
|
|
70
|
+
type.
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
path : str
|
|
75
|
+
Request path in the form ``"<component_name>/<relative_file>"``.
|
|
76
|
+
|
|
77
|
+
Notes
|
|
78
|
+
-----
|
|
79
|
+
This method writes directly to the response and sets appropriate HTTP
|
|
80
|
+
status codes on error (``404`` for missing components/files, ``403`` for
|
|
81
|
+
forbidden paths).
|
|
82
|
+
"""
|
|
83
|
+
parts = path.split("/")
|
|
84
|
+
component_name = parts[0]
|
|
85
|
+
component_def = self._component_manager.get(component_name)
|
|
86
|
+
if component_def is None:
|
|
87
|
+
self.write("not found")
|
|
88
|
+
self.set_status(404)
|
|
89
|
+
return
|
|
90
|
+
|
|
91
|
+
# Get the component path from the component manager
|
|
92
|
+
component_path = self._component_manager.get_component_path(component_name)
|
|
93
|
+
if component_path is None:
|
|
94
|
+
self.write("not found")
|
|
95
|
+
self.set_status(404)
|
|
96
|
+
return
|
|
97
|
+
|
|
98
|
+
# Build a safe absolute path within the component root
|
|
99
|
+
filename = "/".join(parts[1:])
|
|
100
|
+
# If no file segment is provided (e.g. only component name or trailing slash),
|
|
101
|
+
# treat as not found rather than attempting to open a directory.
|
|
102
|
+
if not filename or filename.endswith("/"):
|
|
103
|
+
self.write("not found")
|
|
104
|
+
self.set_status(404)
|
|
105
|
+
return
|
|
106
|
+
abspath = build_safe_abspath(component_path, filename)
|
|
107
|
+
if abspath is None:
|
|
108
|
+
self.write("forbidden")
|
|
109
|
+
self.set_status(403)
|
|
110
|
+
return
|
|
111
|
+
|
|
112
|
+
# If the resolved path is a directory, return 404 not found.
|
|
113
|
+
if os.path.isdir(abspath):
|
|
114
|
+
self.write("not found")
|
|
115
|
+
self.set_status(404)
|
|
116
|
+
return
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
with open(abspath, "rb") as file:
|
|
120
|
+
contents = file.read()
|
|
121
|
+
except OSError:
|
|
122
|
+
sanitized_abspath = abspath.replace("\n", "").replace("\r", "")
|
|
123
|
+
_LOGGER.exception(
|
|
124
|
+
"BidiComponentRequestHandler: GET %s read error", sanitized_abspath
|
|
125
|
+
)
|
|
126
|
+
self.write("read error")
|
|
127
|
+
self.set_status(404)
|
|
128
|
+
return
|
|
129
|
+
|
|
130
|
+
self.write(contents)
|
|
131
|
+
self.set_header("Content-Type", guess_content_type(abspath))
|
|
132
|
+
|
|
133
|
+
self.set_extra_headers(path)
|
|
134
|
+
|
|
135
|
+
def set_extra_headers(self, path: str) -> None:
|
|
136
|
+
"""Disable cache for HTML files.
|
|
137
|
+
|
|
138
|
+
We assume other assets like JS and CSS are suffixed with their hash, so
|
|
139
|
+
they can be cached indefinitely.
|
|
140
|
+
"""
|
|
141
|
+
if path.endswith(".html"):
|
|
142
|
+
self.set_header("Cache-Control", "no-cache")
|
|
143
|
+
else:
|
|
144
|
+
self.set_header("Cache-Control", "public")
|
|
145
|
+
|
|
146
|
+
def set_default_headers(self) -> None:
|
|
147
|
+
"""Set default CORS headers based on server configuration.
|
|
148
|
+
|
|
149
|
+
If cross-origin requests are fully allowed, ``Access-Control-Allow-
|
|
150
|
+
Origin`` is set to ``"*"``. Otherwise, if the request ``Origin`` header
|
|
151
|
+
is an allowed origin, the header is echoed back.
|
|
152
|
+
"""
|
|
153
|
+
if streamlit.web.server.routes.allow_all_cross_origin_requests():
|
|
154
|
+
self.set_header("Access-Control-Allow-Origin", "*")
|
|
155
|
+
elif streamlit.web.server.routes.is_allowed_origin(
|
|
156
|
+
origin := self.request.headers.get("Origin")
|
|
157
|
+
):
|
|
158
|
+
self.set_header("Access-Control-Allow-Origin", cast("str", origin))
|
|
159
|
+
|
|
160
|
+
def options(self) -> None:
|
|
161
|
+
"""Handle preflight CORS requests.
|
|
162
|
+
|
|
163
|
+
Returns
|
|
164
|
+
-------
|
|
165
|
+
None
|
|
166
|
+
Responds with HTTP ``204 No Content`` to indicate that the actual
|
|
167
|
+
request can proceed.
|
|
168
|
+
"""
|
|
169
|
+
self.set_status(204)
|
|
170
|
+
self.finish()
|
|
171
|
+
|
|
172
|
+
@staticmethod
|
|
173
|
+
def get_url(file_id: str) -> str:
|
|
174
|
+
"""Return the URL for a component asset identified by ``file_id``.
|
|
175
|
+
|
|
176
|
+
Parameters
|
|
177
|
+
----------
|
|
178
|
+
file_id : str
|
|
179
|
+
Component file identifier (typically a relative path or hashed
|
|
180
|
+
filename).
|
|
181
|
+
|
|
182
|
+
Returns
|
|
183
|
+
-------
|
|
184
|
+
str
|
|
185
|
+
Relative URL path for the resource, to be joined with the server
|
|
186
|
+
base URL.
|
|
187
|
+
|
|
188
|
+
Examples
|
|
189
|
+
--------
|
|
190
|
+
>>> BidiComponentRequestHandler.get_url("my_component/main.js")
|
|
191
|
+
'_stcore/bidi-components/my_component/main.js'
|
|
192
|
+
"""
|
|
193
|
+
return f"_stcore/bidi-components/{file_id}"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
"""Utilities for safely resolving component asset paths and content types.
|
|
17
|
+
|
|
18
|
+
These helpers are used by server handlers to construct safe absolute paths for
|
|
19
|
+
component files and to determine the appropriate ``Content-Type`` header for
|
|
20
|
+
responses. Path resolution prevents directory traversal by normalizing and
|
|
21
|
+
checking real paths against a component's root directory.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from __future__ import annotations
|
|
25
|
+
|
|
26
|
+
import mimetypes
|
|
27
|
+
import os
|
|
28
|
+
from typing import Final
|
|
29
|
+
|
|
30
|
+
_OCTET_STREAM: Final[str] = "application/octet-stream"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def build_safe_abspath(component_root: str, relative_url_path: str) -> str | None:
|
|
34
|
+
"""Build an absolute path inside ``component_root`` if safe.
|
|
35
|
+
|
|
36
|
+
The function joins ``relative_url_path`` with ``component_root`` and
|
|
37
|
+
normalizes and resolves symlinks. If the resulting path escapes the
|
|
38
|
+
component root, ``None`` is returned to indicate a forbidden traversal.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
component_root : str
|
|
43
|
+
Absolute path to the component's root directory.
|
|
44
|
+
relative_url_path : str
|
|
45
|
+
Relative URL path from the component root to the requested file.
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
str or None
|
|
50
|
+
The resolved absolute path if it stays within ``component_root``;
|
|
51
|
+
otherwise ``None`` when the path would traverse outside the root.
|
|
52
|
+
"""
|
|
53
|
+
root_real = os.path.realpath(component_root)
|
|
54
|
+
candidate = os.path.normpath(os.path.join(root_real, relative_url_path))
|
|
55
|
+
candidate_real = os.path.realpath(candidate)
|
|
56
|
+
|
|
57
|
+
try:
|
|
58
|
+
# Ensure the candidate stays within the real component root
|
|
59
|
+
if os.path.commonpath([root_real, candidate_real]) != root_real:
|
|
60
|
+
return None
|
|
61
|
+
except ValueError:
|
|
62
|
+
# On some platforms, commonpath can raise if drives differ; treat as forbidden.
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
return candidate_real
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def guess_content_type(abspath: str) -> str:
|
|
69
|
+
"""Guess the HTTP ``Content-Type`` for a file path.
|
|
70
|
+
|
|
71
|
+
This logic mirrors Tornado's ``StaticFileHandler`` by respecting encoding
|
|
72
|
+
metadata from ``mimetypes.guess_type`` and falling back to
|
|
73
|
+
``application/octet-stream`` when no specific type can be determined.
|
|
74
|
+
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
abspath : str
|
|
78
|
+
Absolute file path used for type detection (only the suffix matters).
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
-------
|
|
82
|
+
str
|
|
83
|
+
Guessed content type string suitable for the ``Content-Type`` header.
|
|
84
|
+
"""
|
|
85
|
+
mime_type, encoding = mimetypes.guess_type(abspath)
|
|
86
|
+
# per RFC 6713, use the appropriate type for a gzip compressed file
|
|
87
|
+
if encoding == "gzip":
|
|
88
|
+
return "application/gzip"
|
|
89
|
+
# As of 2015-07-21 there is no bzip2 encoding defined at
|
|
90
|
+
# http://www.iana.org/assignments/media-types/media-types.xhtml
|
|
91
|
+
# So for that (and any other encoding), use octet-stream.
|
|
92
|
+
if encoding is not None:
|
|
93
|
+
return _OCTET_STREAM
|
|
94
|
+
if mime_type is not None:
|
|
95
|
+
return mime_type
|
|
96
|
+
# if mime_type not detected, use application/octet-stream
|
|
97
|
+
return _OCTET_STREAM
|
|
@@ -14,14 +14,16 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
import mimetypes
|
|
18
|
-
import os
|
|
19
17
|
from typing import TYPE_CHECKING, Final, cast
|
|
20
18
|
|
|
21
19
|
import tornado.web
|
|
22
20
|
|
|
23
21
|
import streamlit.web.server.routes
|
|
24
22
|
from streamlit.logger import get_logger
|
|
23
|
+
from streamlit.web.server.component_file_utils import (
|
|
24
|
+
build_safe_abspath,
|
|
25
|
+
guess_content_type,
|
|
26
|
+
)
|
|
25
27
|
|
|
26
28
|
if TYPE_CHECKING:
|
|
27
29
|
from streamlit.components.types.base_component_registry import BaseComponentRegistry
|
|
@@ -42,13 +44,10 @@ class ComponentRequestHandler(tornado.web.RequestHandler):
|
|
|
42
44
|
self.set_status(404)
|
|
43
45
|
return
|
|
44
46
|
|
|
45
|
-
#
|
|
46
|
-
component_root = os.path.realpath(component_root)
|
|
47
|
+
# Build a safe absolute path within the component root
|
|
47
48
|
filename = "/".join(parts[1:])
|
|
48
|
-
abspath =
|
|
49
|
-
|
|
50
|
-
# Do NOT expose anything outside of the component root.
|
|
51
|
-
if os.path.commonpath([component_root, abspath]) != component_root:
|
|
49
|
+
abspath = build_safe_abspath(component_root, filename)
|
|
50
|
+
if abspath is None:
|
|
52
51
|
self.write("forbidden")
|
|
53
52
|
self.set_status(403)
|
|
54
53
|
return
|
|
@@ -100,19 +99,7 @@ class ComponentRequestHandler(tornado.web.RequestHandler):
|
|
|
100
99
|
"""Returns the ``Content-Type`` header to be used for this request.
|
|
101
100
|
From tornado.web.StaticFileHandler.
|
|
102
101
|
"""
|
|
103
|
-
|
|
104
|
-
# per RFC 6713, use the appropriate type for a gzip compressed file
|
|
105
|
-
if encoding == "gzip":
|
|
106
|
-
return "application/gzip"
|
|
107
|
-
# As of 2015-07-21 there is no bzip2 encoding defined at
|
|
108
|
-
# http://www.iana.org/assignments/media-types/media-types.xhtml
|
|
109
|
-
# So for that (and any other encoding), use octet-stream.
|
|
110
|
-
if encoding is not None:
|
|
111
|
-
return "application/octet-stream"
|
|
112
|
-
if mime_type is not None:
|
|
113
|
-
return mime_type
|
|
114
|
-
# if mime_type not detected, use application/octet-stream
|
|
115
|
-
return "application/octet-stream"
|
|
102
|
+
return guess_content_type(abspath)
|
|
116
103
|
|
|
117
104
|
@staticmethod
|
|
118
105
|
def get_url(file_id: str) -> str:
|
|
@@ -162,8 +162,11 @@ class AuthCallbackHandler(AuthHandlerMixin, tornado.web.RequestHandler):
|
|
|
162
162
|
return
|
|
163
163
|
|
|
164
164
|
if provider is None:
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
# See https://github.com/streamlit/streamlit/issues/13101
|
|
166
|
+
_LOGGER.warning(
|
|
167
|
+
"Missing provider for OAuth callback; this often indicates a stale "
|
|
168
|
+
"or replayed callback (for example, from browser back/forward "
|
|
169
|
+
"navigation).",
|
|
167
170
|
)
|
|
168
171
|
self.redirect_to_base()
|
|
169
172
|
return
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
|
-
from typing import TYPE_CHECKING, Any,
|
|
19
|
+
from typing import TYPE_CHECKING, Any, cast
|
|
20
20
|
|
|
21
21
|
from authlib.integrations.base_client import (
|
|
22
22
|
BaseApp,
|
|
@@ -32,6 +32,8 @@ from authlib.integrations.requests_client import (
|
|
|
32
32
|
from streamlit.web.server.authlib_tornado_integration import TornadoIntegration
|
|
33
33
|
|
|
34
34
|
if TYPE_CHECKING:
|
|
35
|
+
from collections.abc import Callable
|
|
36
|
+
|
|
35
37
|
import tornado.web
|
|
36
38
|
|
|
37
39
|
from streamlit.auth_util import AuthCache
|
streamlit/web/server/routes.py
CHANGED
|
@@ -16,7 +16,7 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import os
|
|
18
18
|
import re
|
|
19
|
-
from typing import TYPE_CHECKING, Any,
|
|
19
|
+
from typing import TYPE_CHECKING, Any, Final, cast
|
|
20
20
|
|
|
21
21
|
import tornado.web
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ from streamlit.web.server.server_util import (
|
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
if TYPE_CHECKING:
|
|
31
|
-
from collections.abc import Awaitable, Sequence
|
|
31
|
+
from collections.abc import Awaitable, Callable, Sequence
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
# Files that match this pattern do not get cached.
|
streamlit/web/server/server.py
CHANGED
|
@@ -38,6 +38,9 @@ from streamlit.web.cache_storage_manager_config import (
|
|
|
38
38
|
create_default_cache_storage_manager,
|
|
39
39
|
)
|
|
40
40
|
from streamlit.web.server.app_static_file_handler import AppStaticFileHandler
|
|
41
|
+
from streamlit.web.server.bidi_component_request_handler import (
|
|
42
|
+
BidiComponentRequestHandler,
|
|
43
|
+
)
|
|
41
44
|
from streamlit.web.server.browser_websocket_handler import BrowserWebSocketHandler
|
|
42
45
|
from streamlit.web.server.component_request_handler import ComponentRequestHandler
|
|
43
46
|
from streamlit.web.server.media_file_handler import MediaFileHandler
|
|
@@ -133,6 +136,7 @@ UNIX_SOCKET_PREFIX: Final = "unix://"
|
|
|
133
136
|
# as the endpoints in frontend/connection/src/DefaultStreamlitEndpoints
|
|
134
137
|
MEDIA_ENDPOINT: Final = "/media"
|
|
135
138
|
COMPONENT_ENDPOINT: Final = "/component"
|
|
139
|
+
BIDI_COMPONENT_ENDPOINT: Final = "/_stcore/bidi-components"
|
|
136
140
|
STATIC_SERVING_ENDPOINT: Final = "/app/static"
|
|
137
141
|
UPLOAD_FILE_ENDPOINT: Final = "/_stcore/upload_file"
|
|
138
142
|
STREAM_ENDPOINT: Final = r"_stcore/stream"
|
|
@@ -395,6 +399,11 @@ class Server:
|
|
|
395
399
|
ComponentRequestHandler,
|
|
396
400
|
{"registry": self._runtime.component_registry},
|
|
397
401
|
),
|
|
402
|
+
(
|
|
403
|
+
make_url_path_regex(base, f"{BIDI_COMPONENT_ENDPOINT}/(.*)"),
|
|
404
|
+
BidiComponentRequestHandler,
|
|
405
|
+
{"component_manager": self._runtime.bidi_component_registry},
|
|
406
|
+
),
|
|
398
407
|
]
|
|
399
408
|
|
|
400
409
|
if config.get_option("server.scriptHealthCheckEnabled"):
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
|
-
from typing import TYPE_CHECKING,
|
|
19
|
+
from typing import TYPE_CHECKING, Final, Literal, cast
|
|
20
20
|
from urllib.parse import urljoin
|
|
21
21
|
|
|
22
22
|
from streamlit import config, net_util, url_util
|
|
@@ -24,6 +24,8 @@ from streamlit.runtime.secrets import secrets_singleton
|
|
|
24
24
|
from streamlit.type_util import is_version_less_than
|
|
25
25
|
|
|
26
26
|
if TYPE_CHECKING:
|
|
27
|
+
from collections.abc import Callable
|
|
28
|
+
|
|
27
29
|
from tornado.web import RequestHandler
|
|
28
30
|
|
|
29
31
|
# The port used for internal development.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
from typing import TYPE_CHECKING, Any,
|
|
17
|
+
from typing import TYPE_CHECKING, Any, cast
|
|
18
18
|
|
|
19
19
|
import tornado.httputil
|
|
20
20
|
import tornado.web
|
|
@@ -25,6 +25,8 @@ from streamlit.web.server import routes, server_util
|
|
|
25
25
|
from streamlit.web.server.server_util import is_xsrf_enabled
|
|
26
26
|
|
|
27
27
|
if TYPE_CHECKING:
|
|
28
|
+
from collections.abc import Callable
|
|
29
|
+
|
|
28
30
|
from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
|
|
29
31
|
|
|
30
32
|
|
|
@@ -91,6 +93,14 @@ class UploadFileRequestHandler(tornado.web.RequestHandler):
|
|
|
91
93
|
args: dict[str, list[bytes]] = {}
|
|
92
94
|
files: dict[str, list[Any]] = {}
|
|
93
95
|
|
|
96
|
+
if not self.path_kwargs:
|
|
97
|
+
# This is not expected to happen with normal Streamlit usage.
|
|
98
|
+
self.send_error(
|
|
99
|
+
400,
|
|
100
|
+
reason="No path arguments provided. Please provide a session_id and file_id in the URL.",
|
|
101
|
+
)
|
|
102
|
+
return
|
|
103
|
+
|
|
94
104
|
session_id = self.path_kwargs["session_id"]
|
|
95
105
|
file_id = self.path_kwargs["file_id"]
|
|
96
106
|
|
|
@@ -133,6 +143,14 @@ class UploadFileRequestHandler(tornado.web.RequestHandler):
|
|
|
133
143
|
|
|
134
144
|
def delete(self, **kwargs: Any) -> None:
|
|
135
145
|
"""Delete file request handler."""
|
|
146
|
+
|
|
147
|
+
if not self.path_kwargs:
|
|
148
|
+
self.send_error(
|
|
149
|
+
400,
|
|
150
|
+
reason="No path arguments provided. Please provide a session_id and file_id in the URL.",
|
|
151
|
+
)
|
|
152
|
+
return
|
|
153
|
+
|
|
136
154
|
session_id = self.path_kwargs["session_id"]
|
|
137
155
|
file_id = self.path_kwargs["file_id"]
|
|
138
156
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: streamlit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.52.0
|
|
4
4
|
Summary: A faster way to build and share data apps
|
|
5
5
|
Home-page: https://streamlit.io
|
|
6
6
|
Author: Snowflake Inc
|
|
@@ -18,27 +18,27 @@ Classifier: Environment :: Web Environment
|
|
|
18
18
|
Classifier: Intended Audience :: Developers
|
|
19
19
|
Classifier: Intended Audience :: Science/Research
|
|
20
20
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
26
|
Classifier: Topic :: Database :: Front-Ends
|
|
27
27
|
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
|
|
28
28
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
29
29
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
30
30
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
31
31
|
Classifier: Topic :: Software Development :: Widget Sets
|
|
32
|
-
Requires-Python: >=3.
|
|
32
|
+
Requires-Python: >=3.10
|
|
33
33
|
Description-Content-Type: text/markdown
|
|
34
|
-
Requires-Dist: altair!=5.4.0,!=5.4.1,<
|
|
34
|
+
Requires-Dist: altair!=5.4.0,!=5.4.1,<7,>=4.0
|
|
35
35
|
Requires-Dist: blinker<2,>=1.5.0
|
|
36
36
|
Requires-Dist: cachetools<7,>=4.0
|
|
37
37
|
Requires-Dist: click<9,>=7.0
|
|
38
38
|
Requires-Dist: numpy<3,>=1.23
|
|
39
|
-
Requires-Dist: packaging
|
|
39
|
+
Requires-Dist: packaging>=20
|
|
40
40
|
Requires-Dist: pandas<3,>=1.4.0
|
|
41
|
-
Requires-Dist: pillow<
|
|
41
|
+
Requires-Dist: pillow<13,>=7.1.0
|
|
42
42
|
Requires-Dist: protobuf<7,>=3.20
|
|
43
43
|
Requires-Dist: pyarrow>=7.0
|
|
44
44
|
Requires-Dist: requests<3,>=2.27
|
|
@@ -63,8 +63,11 @@ Requires-Dist: plotly>=4.0.0; extra == "charts"
|
|
|
63
63
|
Requires-Dist: orjson>=3.5.0; extra == "charts"
|
|
64
64
|
Provides-Extra: sql
|
|
65
65
|
Requires-Dist: SQLAlchemy>=2.0.0; extra == "sql"
|
|
66
|
+
Provides-Extra: performance
|
|
67
|
+
Requires-Dist: orjson>=3.5.0; extra == "performance"
|
|
68
|
+
Requires-Dist: uvloop>=0.15.2; (sys_platform != "win32" and (sys_platform != "cygwin" and platform_python_implementation != "PyPy")) and extra == "performance"
|
|
66
69
|
Provides-Extra: all
|
|
67
|
-
Requires-Dist: streamlit[auth,charts,pdf,snowflake,sql]; extra == "all"
|
|
70
|
+
Requires-Dist: streamlit[auth,charts,pdf,performance,snowflake,sql]; extra == "all"
|
|
68
71
|
Requires-Dist: rich>=11.0.0; extra == "all"
|
|
69
72
|
Dynamic: author
|
|
70
73
|
Dynamic: author-email
|