streamlit-nightly 1.52.3.dev20260107__py3-none-any.whl → 1.52.3.dev20260109__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/components/v2/__init__.py +3 -3
- streamlit/components/v2/types.py +4 -4
- streamlit/config.py +14 -0
- streamlit/connections/__init__.py +5 -1
- streamlit/connections/snowflake_connection.py +203 -57
- streamlit/elements/lib/options_selector_utils.py +98 -0
- streamlit/elements/widgets/multiselect.py +19 -9
- streamlit/elements/widgets/selectbox.py +12 -24
- streamlit/proto/MetricsEvent_pb2.py +4 -4
- streamlit/proto/MetricsEvent_pb2.pyi +4 -1
- streamlit/proto/PageProfile_pb2.py +6 -6
- streamlit/proto/PageProfile_pb2.pyi +11 -1
- streamlit/runtime/connection_factory.py +25 -0
- streamlit/runtime/metrics_util.py +4 -0
- streamlit/runtime/runtime.py +3 -0
- streamlit/starlette.py +34 -0
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +291 -291
- streamlit/static/static/js/{ErrorOutline.esm.D2r71uaM.js → ErrorOutline.esm.BcqUpfNe.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BWEHU45R.js → FileDownload.esm.CtJWBuub.js} +1 -1
- streamlit/static/static/js/{FileHelper.bM5nEcHb.js → FileHelper.D0dQPhOs.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DrhgNNta.js → FormClearHelper.Cm3GDSk6.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DPiGX0Th.js → InputInstructions.D7Hxdzwv.js} +1 -1
- streamlit/static/static/js/{Particles.NjZlN0Ji.js → Particles.vAUDtAR8.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BC4DXqMl.js → ProgressBar.Dp2CGRba.js} +2 -2
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.CbRgSaN7.js → StreamlitSyntaxHighlighter.DC0000nJ.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.gttTfh7r.js → TableChart.esm.DDVoSKOT.js} +1 -1
- streamlit/static/static/js/{Toolbar.DO2JfHk1.js → Toolbar.CuMH-Gqe.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.NVlzvmTZ.js → WidgetLabelHelpIconInline.WAReecol.js} +1 -1
- streamlit/static/static/js/{base-input.CmG3KTuv.js → base-input.BX9Jll5o.js} +4 -4
- streamlit/static/static/js/{checkbox.cfHeGdGI.js → checkbox.BzMHUSz1.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.B59a5_bn.js → createDownloadLinkElement.CviG5BQx.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DpTe47v0.js → data-grid-overlay-editor.Dzo9A4l6.js} +1 -1
- streamlit/static/static/js/{downloader.CYtKIJ9J.js → downloader.DIDvj0d5.js} +1 -1
- streamlit/static/static/js/{embed.Dfyy6eKR.js → embed.C8qeQ38b.js} +6 -6
- streamlit/static/static/js/{es6.x2A9auGg.js → es6.Dpcc-U7U.js} +2 -2
- streamlit/static/static/js/{formatNumber.D8YUVHBi.js → formatNumber.CPvuaBa8.js} +1 -1
- streamlit/static/static/js/{iconPosition.C6Qxuo2L.js → iconPosition.y0q-Rqem.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.Q0Cy4mzM.js → iframeResizer.contentWindow.DblExdXF.js} +1 -1
- streamlit/static/static/js/{index.BICn75_M.js → index.B-g6lwYa.js} +1 -1
- streamlit/static/static/js/{index.CcpuNeOs.js → index.B10MmI2m.js} +1 -1
- streamlit/static/static/js/{index.BTcImDDt.js → index.B6vCS66f.js} +7 -7
- streamlit/static/static/js/{index.mRYkGVRy.js → index.B9TG5Ah8.js} +1 -1
- streamlit/static/static/js/{index.CEB-gMZu.js → index.BDb0PRvK.js} +1 -1
- streamlit/static/static/js/{index.WMC0NWRg.js → index.BGufEmCz.js} +1 -1
- streamlit/static/static/js/{index.DfXZgqLi.js → index.BItU4jMo.js} +1 -1
- streamlit/static/static/js/{index.Dmaco99Q.js → index.BPMqWDef.js} +1 -1
- streamlit/static/static/js/index.BTHi5W25.js +1 -0
- streamlit/static/static/js/{index.Bs9bS4ZQ.js → index.BVN9cI-k.js} +1 -1
- streamlit/static/static/js/index.BWOP7HFT.js +1 -0
- streamlit/static/static/js/{index.CzMaYu3-.js → index.BXYgO5B8.js} +1 -1
- streamlit/static/static/js/{index.BuCGo7-5.js → index.BZBWLU1C.js} +9 -9
- streamlit/static/static/js/{index.i5tC1QD-.js → index.BfZdZpv-.js} +2 -2
- streamlit/static/static/js/{index.72U0nUaY.js → index.Bxe7fKbw.js} +1 -1
- streamlit/static/static/js/{index.D2pbLWvp.js → index.C1ElSZEy.js} +1 -1
- streamlit/static/static/js/index.C26ZOVFL.js +1 -0
- streamlit/static/static/js/{index.DyL5do6X.js → index.C7lwRBvF.js} +1 -1
- streamlit/static/static/js/{index.DDUzbOzY.js → index.C93QGPyk.js} +1 -1
- streamlit/static/static/js/{index.WW20lmQl.js → index.CCDejIvL.js} +2 -2
- streamlit/static/static/js/index.CcMmNHAq.js +1 -0
- streamlit/static/static/js/index.D42y-GeO.js +1 -0
- streamlit/static/static/js/{index.Bmo0a9c3.js → index.D69ULFWq.js} +1 -1
- streamlit/static/static/js/{index.DltYrNjp.js → index.DB4MbQ40.js} +3 -3
- streamlit/static/static/js/{index.9lrRft8u.js → index.DRFJgBf-.js} +1 -1
- streamlit/static/static/js/{index.DzZhu8Ry.js → index.DTK-btqV.js} +1 -1
- streamlit/static/static/js/{index.CCkh_YSD.js → index.DZEQ0G7H.js} +1 -1
- streamlit/static/static/js/{index.Zffuf6-0.js → index.DaU1ayM7.js} +1 -1
- streamlit/static/static/js/{index.BA25ZBoD.js → index.Dla9XiNe.js} +2 -2
- streamlit/static/static/js/{index.AF9wK9Wi.js → index.DmQqT9OM.js} +1 -1
- streamlit/static/static/js/{index.5zBrLB5N.js → index.DppScppA.js} +1 -1
- streamlit/static/static/js/{index.DrHoCPek.js → index.Dr8b3Vn6.js} +2 -2
- streamlit/static/static/js/{index.BSULROGA.js → index.DvQ7-afx.js} +1 -1
- streamlit/static/static/js/{index.DMtSM2QJ.js → index.F-NmmwfK.js} +1 -1
- streamlit/static/static/js/{index.4evoB7lO.js → index.MKI8t7l2.js} +1 -1
- streamlit/static/static/js/{index.BtasgGzT.js → index.RRAKXgBZ.js} +1 -1
- streamlit/static/static/js/{index.9i44yl-A.js → index.VSsf6tsu.js} +2 -2
- streamlit/static/static/js/{index.CWEfMTRP.js → index.aEeM0ekc.js} +1 -1
- streamlit/static/static/js/{index.Cto6hKVz.js → index.eweE9HKU.js} +1 -1
- streamlit/static/static/js/{index.DFrG8naT.js → index.gr6yGiCL.js} +1 -1
- streamlit/static/static/js/{index.Dm8qt8Me.js → index.kKkHk9Mc.js} +1 -1
- streamlit/static/static/js/index.pMvzHC7z.js +1 -0
- streamlit/static/static/js/{index.DMgiqc8r.js → index.pgifwCIr.js} +1 -1
- streamlit/static/static/js/index.q83b8_8b.js +1 -0
- streamlit/static/static/js/index.u2AvcQQT.js +1 -0
- streamlit/static/static/js/{index.BHzkSOU6.js → index.w2_VrtVw.js} +1 -1
- streamlit/static/static/js/{index.4DpGzJxM.js → index.wv1DYVsn.js} +1 -1
- streamlit/static/static/js/{index.DemMZEQt.js → index.x4j6nnNb.js} +1 -1
- streamlit/static/static/js/{input.C76A8APa.js → input.BoJqOS7a.js} +1 -1
- streamlit/static/static/js/{main.CFbvktEv.js → main.B5XmUwmQ.js} +1 -1
- streamlit/static/static/js/{memory.BkhqbxJl.js → memory.9izgq54V.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Dpeh6_Ag.js → number-overlay-editor.PqOGQcLn.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.D8MDzfFI.js → pandasStylerUtils.DUtF2t3R.js} +1 -1
- streamlit/static/static/js/{sandbox.m1TYtBuF.js → sandbox.DgKTHPLO.js} +1 -1
- streamlit/static/static/js/{styled-components.yin3sIMA.js → styled-components.D4x8jmOI.js} +1 -1
- streamlit/static/static/js/{throttle.Df6MiNTy.js → throttle.DxEHIIp7.js} +1 -1
- streamlit/static/static/js/{timepicker.gcx4yeRx.js → timepicker.CDks5DWI.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.Ca7RO9Jm.js → toConsumableArray.CvTQRsV-.js} +1 -1
- streamlit/static/static/js/uniqueId.RScLN3St.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.CRkPCtR5.js → useBasicWidgetState.D6_b0IqA.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.CFOMULNz.js → useIntlLocale.Ctz17A7g.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.9c205rhQ.js → useTextInputAutoExpand.PAFB5o1T.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.SYJJuEJM.js → useUpdateUiValue.CcTvmGlb.js} +1 -1
- streamlit/static/static/js/{useWaveformController.CCs9fdSv.js → useWaveformController.vLi36Ir4.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.MG9RY_Y-.js → withCalculatedWidth.BtA2jL5-.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BgGLtZrC.js → withFullScreenWrapper.CeeoYBpc.js} +1 -1
- streamlit/web/bootstrap.py +105 -10
- streamlit/web/cli.py +21 -4
- streamlit/web/server/app_discovery.py +421 -0
- streamlit/web/server/server.py +0 -13
- streamlit/web/server/starlette/__init__.py +2 -1
- streamlit/web/server/starlette/starlette_app.py +326 -3
- streamlit/web/server/starlette/starlette_routes.py +27 -8
- {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/RECORD +118 -116
- streamlit/static/static/js/index.7BBVjqsx.js +0 -1
- streamlit/static/static/js/index.CgFM5y1b.js +0 -1
- streamlit/static/static/js/index.Cszkm2ii.js +0 -1
- streamlit/static/static/js/index.DlXiDt-m.js +0 -1
- streamlit/static/static/js/index.HTZptmDX.js +0 -1
- streamlit/static/static/js/index.mUwcAQrC.js +0 -1
- streamlit/static/static/js/index.up8HPR4v.js +0 -1
- streamlit/static/static/js/index.xQYe72hk.js +0 -1
- streamlit/static/static/js/uniqueId.Bf2Hsb60.js +0 -1
- {streamlit_nightly-1.52.3.dev20260107.data → streamlit_nightly-1.52.3.dev20260109.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260109.dist-info}/top_level.txt +0 -0
|
@@ -83,6 +83,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
|
83
83
|
ACTIVE_THEME_FIELD_NUMBER: builtins.int
|
|
84
84
|
TOTAL_LOAD_TIME_FIELD_NUMBER: builtins.int
|
|
85
85
|
BROWSER_INFO_FIELD_NUMBER: builtins.int
|
|
86
|
+
SERVER_MODE_FIELD_NUMBER: builtins.int
|
|
86
87
|
event: builtins.str
|
|
87
88
|
"""Common Event Fields:"""
|
|
88
89
|
anonymous_id: builtins.str
|
|
@@ -128,6 +129,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
|
128
129
|
page_script_hash: builtins.str
|
|
129
130
|
active_theme: builtins.str
|
|
130
131
|
total_load_time: builtins.int
|
|
132
|
+
server_mode: builtins.str
|
|
131
133
|
@property
|
|
132
134
|
def commands(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[streamlit.proto.PageProfile_pb2.Command]:
|
|
133
135
|
"""Page Profile Event fields:
|
|
@@ -187,10 +189,11 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
|
187
189
|
active_theme: builtins.str = ...,
|
|
188
190
|
total_load_time: builtins.int = ...,
|
|
189
191
|
browser_info: Global___BrowserInfo | None = ...,
|
|
192
|
+
server_mode: builtins.str = ...,
|
|
190
193
|
) -> None: ...
|
|
191
194
|
_HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["browser_info", b"browser_info"]
|
|
192
195
|
def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ...
|
|
193
|
-
_ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["active_theme", b"active_theme", "anonymous_id", b"anonymous_id", "app_id", b"app_id", "attributions", b"attributions", "branch", b"branch", "browser_info", b"browser_info", "commands", b"commands", "config", b"config", "context_locale", b"context_locale", "context_page_path", b"context_page_path", "context_page_referrer", b"context_page_referrer", "context_page_search", b"context_page_search", "context_page_title", b"context_page_title", "context_page_url", b"context_page_url", "context_user_agent", b"context_user_agent", "creator_id", b"creator_id", "dev", b"dev", "event", b"event", "exec_time", b"exec_time", "has_display", b"has_display", "headless", b"headless", "hosted_at", b"hosted_at", "is_fragment_run", b"is_fragment_run", "is_hello", b"is_hello", "is_webdriver", b"is_webdriver", "label", b"label", "machine_id_v3", b"machine_id_v3", "machine_id_v4", b"machine_id_v4", "main_module", b"main_module", "numPages", b"numPages", "os", b"os", "owner", b"owner", "page_script_hash", b"page_script_hash", "prep_time", b"prep_time", "python_version", b"python_version", "repo", b"repo", "report_hash", b"report_hash", "server_os", b"server_os", "session_id", b"session_id", "source", b"source", "streamlit_version", b"streamlit_version", "timezone", b"timezone", "total_load_time", b"total_load_time", "uncaught_exception", b"uncaught_exception"]
|
|
196
|
+
_ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["active_theme", b"active_theme", "anonymous_id", b"anonymous_id", "app_id", b"app_id", "attributions", b"attributions", "branch", b"branch", "browser_info", b"browser_info", "commands", b"commands", "config", b"config", "context_locale", b"context_locale", "context_page_path", b"context_page_path", "context_page_referrer", b"context_page_referrer", "context_page_search", b"context_page_search", "context_page_title", b"context_page_title", "context_page_url", b"context_page_url", "context_user_agent", b"context_user_agent", "creator_id", b"creator_id", "dev", b"dev", "event", b"event", "exec_time", b"exec_time", "has_display", b"has_display", "headless", b"headless", "hosted_at", b"hosted_at", "is_fragment_run", b"is_fragment_run", "is_hello", b"is_hello", "is_webdriver", b"is_webdriver", "label", b"label", "machine_id_v3", b"machine_id_v3", "machine_id_v4", b"machine_id_v4", "main_module", b"main_module", "numPages", b"numPages", "os", b"os", "owner", b"owner", "page_script_hash", b"page_script_hash", "prep_time", b"prep_time", "python_version", b"python_version", "repo", b"repo", "report_hash", b"report_hash", "server_mode", b"server_mode", "server_os", b"server_os", "session_id", b"session_id", "source", b"source", "streamlit_version", b"streamlit_version", "timezone", b"timezone", "total_load_time", b"total_load_time", "uncaught_exception", b"uncaught_exception"]
|
|
194
197
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
195
198
|
|
|
196
199
|
Global___MetricsEvent: typing_extensions.TypeAlias = MetricsEvent
|
|
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/PageProfile.proto\"\
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/PageProfile.proto\"\xef\x01\n\x0bPageProfile\x12\x1a\n\x08\x63ommands\x18\x01 \x03(\x0b\x32\x08.Command\x12\x11\n\texec_time\x18\x02 \x01(\x03\x12\x11\n\tprep_time\x18\x03 \x01(\x03\x12\x0e\n\x06\x63onfig\x18\x05 \x03(\t\x12\x1a\n\x12uncaught_exception\x18\x06 \x01(\t\x12\x14\n\x0c\x61ttributions\x18\x07 \x03(\t\x12\n\n\x02os\x18\x08 \x01(\t\x12\x10\n\x08timezone\x18\t \x01(\t\x12\x10\n\x08headless\x18\n \x01(\x08\x12\x17\n\x0fis_fragment_run\x18\x0b \x01(\x08\x12\x13\n\x0bserver_mode\x18\x0c \x01(\t\"6\n\x08\x41rgument\x12\t\n\x01k\x18\x01 \x01(\t\x12\t\n\x01t\x18\x02 \x01(\t\x12\t\n\x01m\x18\x03 \x01(\t\x12\t\n\x01p\x18\x05 \x01(\x05\">\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\t.Argument\x12\x0c\n\x04time\x18\x04 \x01(\x03\x42\x30\n\x1c\x63om.snowflake.apps.streamlitB\x10PageProfileProtob\x06proto3')
|
|
18
18
|
|
|
19
19
|
_globals = globals()
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -23,9 +23,9 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020PageProfileProto'
|
|
25
25
|
_globals['_PAGEPROFILE']._serialized_start=38
|
|
26
|
-
_globals['_PAGEPROFILE']._serialized_end=
|
|
27
|
-
_globals['_ARGUMENT']._serialized_start=
|
|
28
|
-
_globals['_ARGUMENT']._serialized_end=
|
|
29
|
-
_globals['_COMMAND']._serialized_start=
|
|
30
|
-
_globals['_COMMAND']._serialized_end=
|
|
26
|
+
_globals['_PAGEPROFILE']._serialized_end=277
|
|
27
|
+
_globals['_ARGUMENT']._serialized_start=279
|
|
28
|
+
_globals['_ARGUMENT']._serialized_end=333
|
|
29
|
+
_globals['_COMMAND']._serialized_start=335
|
|
30
|
+
_globals['_COMMAND']._serialized_end=397
|
|
31
31
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -46,6 +46,7 @@ class PageProfile(google.protobuf.message.Message):
|
|
|
46
46
|
TIMEZONE_FIELD_NUMBER: builtins.int
|
|
47
47
|
HEADLESS_FIELD_NUMBER: builtins.int
|
|
48
48
|
IS_FRAGMENT_RUN_FIELD_NUMBER: builtins.int
|
|
49
|
+
SERVER_MODE_FIELD_NUMBER: builtins.int
|
|
49
50
|
exec_time: builtins.int
|
|
50
51
|
prep_time: builtins.int
|
|
51
52
|
uncaught_exception: builtins.str
|
|
@@ -53,6 +54,14 @@ class PageProfile(google.protobuf.message.Message):
|
|
|
53
54
|
timezone: builtins.str
|
|
54
55
|
headless: builtins.bool
|
|
55
56
|
is_fragment_run: builtins.bool
|
|
57
|
+
server_mode: builtins.str
|
|
58
|
+
"""The server mode used to run the Streamlit app:
|
|
59
|
+
- "tornado": Traditional Tornado server (streamlit run)
|
|
60
|
+
- "starlette-managed": Starlette server via server.useStarlette config
|
|
61
|
+
- "starlette-app": st.App started via streamlit run
|
|
62
|
+
- "asgi-server": st.App run directly with external ASGI server (uvicorn, gunicorn)
|
|
63
|
+
- "asgi-mounted": st.App mounted on another ASGI framework (FastAPI, Starlette)
|
|
64
|
+
"""
|
|
56
65
|
@property
|
|
57
66
|
def commands(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___Command]: ...
|
|
58
67
|
@property
|
|
@@ -72,8 +81,9 @@ class PageProfile(google.protobuf.message.Message):
|
|
|
72
81
|
timezone: builtins.str = ...,
|
|
73
82
|
headless: builtins.bool = ...,
|
|
74
83
|
is_fragment_run: builtins.bool = ...,
|
|
84
|
+
server_mode: builtins.str = ...,
|
|
75
85
|
) -> None: ...
|
|
76
|
-
_ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["attributions", b"attributions", "commands", b"commands", "config", b"config", "exec_time", b"exec_time", "headless", b"headless", "is_fragment_run", b"is_fragment_run", "os", b"os", "prep_time", b"prep_time", "timezone", b"timezone", "uncaught_exception", b"uncaught_exception"]
|
|
86
|
+
_ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["attributions", b"attributions", "commands", b"commands", "config", b"config", "exec_time", b"exec_time", "headless", b"headless", "is_fragment_run", b"is_fragment_run", "os", b"os", "prep_time", b"prep_time", "server_mode", b"server_mode", "timezone", b"timezone", "uncaught_exception", b"uncaught_exception"]
|
|
77
87
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
78
88
|
|
|
79
89
|
Global___PageProfile: typing_extensions.TypeAlias = PageProfile
|
|
@@ -20,6 +20,7 @@ from typing import TYPE_CHECKING, Any, Final, Literal, TypeVar, overload
|
|
|
20
20
|
|
|
21
21
|
from streamlit.connections import (
|
|
22
22
|
BaseConnection,
|
|
23
|
+
SnowflakeCallersRightsConnection,
|
|
23
24
|
SnowflakeConnection,
|
|
24
25
|
SnowparkConnection,
|
|
25
26
|
SQLConnection,
|
|
@@ -40,6 +41,7 @@ if TYPE_CHECKING:
|
|
|
40
41
|
# 3. Updating test_get_first_party_connection_helper in connection_factory_test.py.
|
|
41
42
|
_FIRST_PARTY_CONNECTIONS: Final[dict[str, type[BaseConnection[Any]]]] = {
|
|
42
43
|
"snowflake": SnowflakeConnection,
|
|
44
|
+
"snowflake-callers-rights": SnowflakeCallersRightsConnection,
|
|
43
45
|
"snowpark": SnowparkConnection,
|
|
44
46
|
"sql": SQLConnection,
|
|
45
47
|
}
|
|
@@ -173,6 +175,29 @@ def connection_factory(
|
|
|
173
175
|
pass
|
|
174
176
|
|
|
175
177
|
|
|
178
|
+
@overload
|
|
179
|
+
def connection_factory(
|
|
180
|
+
name: Literal["snowflake-callers-rights"],
|
|
181
|
+
max_entries: int | None = None,
|
|
182
|
+
ttl: float | timedelta | None = None,
|
|
183
|
+
autocommit: bool = False,
|
|
184
|
+
**kwargs: Any,
|
|
185
|
+
) -> SnowflakeCallersRightsConnection:
|
|
186
|
+
pass
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@overload
|
|
190
|
+
def connection_factory(
|
|
191
|
+
name: str,
|
|
192
|
+
type: Literal["snowflake-callers-rights"],
|
|
193
|
+
max_entries: int | None = None,
|
|
194
|
+
ttl: float | timedelta | None = None,
|
|
195
|
+
autocommit: bool = False,
|
|
196
|
+
**kwargs: Any,
|
|
197
|
+
) -> SnowflakeCallersRightsConnection:
|
|
198
|
+
pass
|
|
199
|
+
|
|
200
|
+
|
|
176
201
|
@overload
|
|
177
202
|
def connection_factory(
|
|
178
203
|
name: Literal["snowpark"],
|
|
@@ -573,6 +573,10 @@ def create_page_profile_message(
|
|
|
573
573
|
|
|
574
574
|
page_profile.headless = config.get_option("server.headless")
|
|
575
575
|
|
|
576
|
+
# Include the server mode for metrics tracking
|
|
577
|
+
if config._server_mode:
|
|
578
|
+
page_profile.server_mode = config._server_mode
|
|
579
|
+
|
|
576
580
|
# Collect all config options that have been manually set
|
|
577
581
|
config_options: set[str] = set()
|
|
578
582
|
if config._config_options:
|
streamlit/runtime/runtime.py
CHANGED
|
@@ -232,6 +232,9 @@ class Runtime:
|
|
|
232
232
|
self._stats_mgr.register_provider(get_resource_cache_stats_provider())
|
|
233
233
|
if self._uploaded_file_mgr is not None:
|
|
234
234
|
self._stats_mgr.register_provider(self._uploaded_file_mgr)
|
|
235
|
+
# Register media file storage for stats if it implements StatsProvider
|
|
236
|
+
if isinstance(config.media_file_storage, StatsProvider):
|
|
237
|
+
self._stats_mgr.register_provider(config.media_file_storage)
|
|
235
238
|
self._stats_mgr.register_provider(SessionStateStatProvider(self._session_mgr))
|
|
236
239
|
|
|
237
240
|
# Register session manager for session event metrics if it implements StatsProvider
|
streamlit/starlette.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)
|
|
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
|
+
"""Starlette integration for Streamlit.
|
|
16
|
+
|
|
17
|
+
This module provides the ASGI-compatible App class for running Streamlit
|
|
18
|
+
applications with any ASGI server (uvicorn, hypercorn, etc.).
|
|
19
|
+
|
|
20
|
+
Example
|
|
21
|
+
-------
|
|
22
|
+
>>> from streamlit.starlette import App
|
|
23
|
+
>>> app = App("main.py")
|
|
24
|
+
|
|
25
|
+
Run with uvicorn:
|
|
26
|
+
|
|
27
|
+
.. code-block:: bash
|
|
28
|
+
|
|
29
|
+
uvicorn myapp:app --host 0.0.0.0 --port 8501
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
from streamlit.web.server.starlette.starlette_app import App
|
|
33
|
+
|
|
34
|
+
__all__ = ["App"]
|
streamlit/static/index.html
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<script>
|
|
38
38
|
window.prerenderReady = false
|
|
39
39
|
</script>
|
|
40
|
-
<script type="module" crossorigin src="./static/js/index.
|
|
40
|
+
<script type="module" crossorigin src="./static/js/index.BZBWLU1C.js"></script>
|
|
41
41
|
<link rel="stylesheet" crossorigin href="./static/css/index.BUP6fTcR.css">
|
|
42
42
|
</head>
|
|
43
43
|
<body>
|