streamlit-nightly 1.52.3.dev20260105__py3-none-any.whl → 1.52.3.dev20260106__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/connections/base_connection.py +28 -1
- streamlit/runtime/connection_factory.py +15 -1
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +300 -300
- streamlit/static/static/js/{ErrorOutline.esm.CUbPpREP.js → ErrorOutline.esm.D2r71uaM.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DetkHTcN.js → FileDownload.esm.BWEHU45R.js} +1 -1
- streamlit/static/static/js/{FileHelper.BwIyMxu6.js → FileHelper.bM5nEcHb.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CASwqls6.js → FormClearHelper.DrhgNNta.js} +1 -1
- streamlit/static/static/js/{InputInstructions.S3adIyNg.js → InputInstructions.DPiGX0Th.js} +1 -1
- streamlit/static/static/js/{Particles.RThwaGLL.js → Particles.NjZlN0Ji.js} +1 -1
- streamlit/static/static/js/{ProgressBar.C5R-2EpR.js → ProgressBar.BC4DXqMl.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.Y7KVbKtx.js → StreamlitSyntaxHighlighter.CbRgSaN7.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.Yg3weFJJ.js → TableChart.esm.gttTfh7r.js} +1 -1
- streamlit/static/static/js/{Toolbar.BLFSj5n_.js → Toolbar.DO2JfHk1.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.DAWJEVd6.js → WidgetLabelHelpIconInline.NVlzvmTZ.js} +1 -1
- streamlit/static/static/js/{base-input.CHeZetve.js → base-input.CmG3KTuv.js} +1 -1
- streamlit/static/static/js/{checkbox.BK8sNhcL.js → checkbox.cfHeGdGI.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement._lShGDOq.js → createDownloadLinkElement.B59a5_bn.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.ssbLvS2J.js → data-grid-overlay-editor.DpTe47v0.js} +1 -1
- streamlit/static/static/js/{downloader.CZdoNBU_.js → downloader.CYtKIJ9J.js} +1 -1
- streamlit/static/static/js/{embed.2TWJ6qNB.js → embed.Dfyy6eKR.js} +1 -1
- streamlit/static/static/js/{es6.D41As5l9.js → es6.x2A9auGg.js} +2 -2
- streamlit/static/static/js/{formatNumber.QuIArRkA.js → formatNumber.D8YUVHBi.js} +1 -1
- streamlit/static/static/js/{iconPosition.CSpYbZdy.js → iconPosition.C6Qxuo2L.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.Ba3c7d3E.js → iframeResizer.contentWindow.Q0Cy4mzM.js} +1 -1
- streamlit/static/static/js/{index.nbcFTn_s.js → index.4DpGzJxM.js} +1 -1
- streamlit/static/static/js/{index.WQewRvlT.js → index.4evoB7lO.js} +1 -1
- streamlit/static/static/js/{index.BoY3Kkcd.js → index.5zBrLB5N.js} +1 -1
- streamlit/static/static/js/{index.DFCPECXZ.js → index.72U0nUaY.js} +1 -1
- streamlit/static/static/js/{index.BOvjmPsN.js → index.7BBVjqsx.js} +1 -1
- streamlit/static/static/js/{index.B6YM-IfX.js → index.9i44yl-A.js} +1 -1
- streamlit/static/static/js/{index.BDu_MJqs.js → index.9lrRft8u.js} +1 -1
- streamlit/static/static/js/{index.BYH1e4xe.js → index.AF9wK9Wi.js} +1 -1
- streamlit/static/static/js/{index.C8z5LOYQ.js → index.BA25ZBoD.js} +1 -1
- streamlit/static/static/js/{index.B8XnIwXu.js → index.BHzkSOU6.js} +1 -1
- streamlit/static/static/js/{index.DZSrtq6x.js → index.BICn75_M.js} +1 -1
- streamlit/static/static/js/{index.DnWt2J6g.js → index.BSULROGA.js} +1 -1
- streamlit/static/static/js/{index.Q_E7sonx.js → index.BTcImDDt.js} +5 -5
- streamlit/static/static/js/{index.Clrm_eTk.js → index.Bmo0a9c3.js} +1 -1
- streamlit/static/static/js/{index.BAHhsNEO.js → index.Bs9bS4ZQ.js} +1 -1
- streamlit/static/static/js/{index.Bz3MkLgx.js → index.BtasgGzT.js} +1 -1
- streamlit/static/static/js/{index.B4ZFNrs2.js → index.BuCGo7-5.js} +5 -5
- streamlit/static/static/js/{index.KQLzM7MF.js → index.CCkh_YSD.js} +1 -1
- streamlit/static/static/js/{index.BOIgWFBo.js → index.CEB-gMZu.js} +1 -1
- streamlit/static/static/js/{index.D2GAddP5.js → index.CWEfMTRP.js} +1 -1
- streamlit/static/static/js/{index.DWr4fsaW.js → index.CcpuNeOs.js} +1 -1
- streamlit/static/static/js/index.CgFM5y1b.js +1 -0
- streamlit/static/static/js/{index.DDmNxuM1.js → index.Cszkm2ii.js} +1 -1
- streamlit/static/static/js/{index.g1YybQQ9.js → index.Cto6hKVz.js} +1 -1
- streamlit/static/static/js/{index.CYiKO5um.js → index.CzMaYu3-.js} +1 -1
- streamlit/static/static/js/{index.DRcHLhCK.js → index.D2pbLWvp.js} +1 -1
- streamlit/static/static/js/{index.Chj6qsmB.js → index.DDUzbOzY.js} +1 -1
- streamlit/static/static/js/{index.BI_fnYvO.js → index.DFrG8naT.js} +1 -1
- streamlit/static/static/js/{index.uYBEeDUr.js → index.DMgiqc8r.js} +1 -1
- streamlit/static/static/js/{index.DrsyU_tH.js → index.DMtSM2QJ.js} +1 -1
- streamlit/static/static/js/{index.9i_-lwmj.js → index.DemMZEQt.js} +1 -1
- streamlit/static/static/js/{index.thfM5Jp-.js → index.DfXZgqLi.js} +1 -1
- streamlit/static/static/js/{index.DDf8sbO4.js → index.DlXiDt-m.js} +1 -1
- streamlit/static/static/js/{index.BnkFb6TA.js → index.DltYrNjp.js} +1 -1
- streamlit/static/static/js/{index.CuZMPicb.js → index.Dm8qt8Me.js} +1 -1
- streamlit/static/static/js/{index.C7V9OjPg.js → index.Dmaco99Q.js} +1 -1
- streamlit/static/static/js/{index.Bw-KHlow.js → index.DrHoCPek.js} +1 -1
- streamlit/static/static/js/{index.BCDbmK91.js → index.DyL5do6X.js} +1 -1
- streamlit/static/static/js/{index.C761egln.js → index.DzZhu8Ry.js} +1 -1
- streamlit/static/static/js/{index.Dd0uREcX.js → index.HTZptmDX.js} +1 -1
- streamlit/static/static/js/{index.DBEtWjU1.js → index.WMC0NWRg.js} +1 -1
- streamlit/static/static/js/{index.DSMOcJzt.js → index.WW20lmQl.js} +1 -1
- streamlit/static/static/js/{index.D6rDKuAr.js → index.Zffuf6-0.js} +1 -1
- streamlit/static/static/js/{index.DceyCzDe.js → index.i5tC1QD-.js} +1 -1
- streamlit/static/static/js/{index.BvVfzDZQ.js → index.mRYkGVRy.js} +1 -1
- streamlit/static/static/js/{index.WRCuRhqg.js → index.mUwcAQrC.js} +1 -1
- streamlit/static/static/js/{index.OlwiZDpn.js → index.up8HPR4v.js} +1 -1
- streamlit/static/static/js/index.xQYe72hk.js +1 -0
- streamlit/static/static/js/{input.BfQ-NLYJ.js → input.C76A8APa.js} +1 -1
- streamlit/static/static/js/{main.kRp_qJ7D.js → main.CFbvktEv.js} +1 -1
- streamlit/static/static/js/{memory.BkmZS8L_.js → memory.BkhqbxJl.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DG6TifvP.js → number-overlay-editor.Dpeh6_Ag.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.2q7Waiua.js → pandasStylerUtils.D8MDzfFI.js} +1 -1
- streamlit/static/static/js/{sandbox.CNlPmm2Y.js → sandbox.m1TYtBuF.js} +1 -1
- streamlit/static/static/js/{styled-components.BzgaiWCN.js → styled-components.yin3sIMA.js} +1 -1
- streamlit/static/static/js/{throttle.C6Ziz6X5.js → throttle.Df6MiNTy.js} +1 -1
- streamlit/static/static/js/{timepicker.BaHSf28n.js → timepicker.gcx4yeRx.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BNGCByOf.js → toConsumableArray.Ca7RO9Jm.js} +1 -1
- streamlit/static/static/js/uniqueId.Bf2Hsb60.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.BcW4Dq9k.js → useBasicWidgetState.CRkPCtR5.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.BmLgec-0.js → useIntlLocale.CFOMULNz.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.BR8fAFbd.js → useTextInputAutoExpand.9c205rhQ.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.Dg1Zd8gd.js → useUpdateUiValue.SYJJuEJM.js} +1 -1
- streamlit/static/static/js/{useWaveformController.Ch2JLD06.js → useWaveformController.CCs9fdSv.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.YVnNIVT2.js → withCalculatedWidth.MG9RY_Y-.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DjieznUq.js → withFullScreenWrapper.BgGLtZrC.js} +1 -1
- streamlit/web/server/oauth_authlib_routes.py +13 -1
- streamlit/web/server/starlette/__init__.py +13 -0
- streamlit/web/server/starlette/starlette_app.py +213 -0
- streamlit/web/server/starlette/starlette_app_utils.py +306 -0
- streamlit/web/server/starlette/starlette_auth_routes.py +506 -0
- streamlit/web/server/starlette/starlette_gzip_middleware.py +121 -0
- streamlit/web/server/starlette/starlette_routes.py +855 -0
- streamlit/web/server/starlette/starlette_server_config.py +55 -0
- streamlit/web/server/starlette/starlette_static_routes.py +171 -0
- streamlit/web/server/starlette/starlette_websocket.py +521 -0
- {streamlit_nightly-1.52.3.dev20260105.dist-info → streamlit_nightly-1.52.3.dev20260106.dist-info}/METADATA +10 -2
- {streamlit_nightly-1.52.3.dev20260105.dist-info → streamlit_nightly-1.52.3.dev20260106.dist-info}/RECORD +107 -98
- streamlit/static/static/js/index.DLplCBmm.js +0 -1
- streamlit/static/static/js/index.zcrZ8Dj9.js +0 -1
- streamlit/static/static/js/uniqueId.Nvl4r5vW.js +0 -1
- {streamlit_nightly-1.52.3.dev20260105.data → streamlit_nightly-1.52.3.dev20260106.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.52.3.dev20260105.dist-info → streamlit_nightly-1.52.3.dev20260106.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20260105.dist-info → streamlit_nightly-1.52.3.dev20260106.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20260105.dist-info → streamlit_nightly-1.52.3.dev20260106.dist-info}/top_level.txt +0 -0
|
@@ -16,7 +16,7 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
from abc import ABC, abstractmethod
|
|
19
|
-
from typing import Any, Generic, TypeVar, cast
|
|
19
|
+
from typing import Any, Generic, Literal, TypeVar, cast
|
|
20
20
|
|
|
21
21
|
from streamlit.runtime.secrets import AttrDict, secrets_singleton
|
|
22
22
|
from streamlit.util import calc_md5
|
|
@@ -174,3 +174,30 @@ class BaseConnection(ABC, Generic[RawConnectionT]):
|
|
|
174
174
|
The underlying connection object.
|
|
175
175
|
"""
|
|
176
176
|
raise NotImplementedError
|
|
177
|
+
|
|
178
|
+
@classmethod
|
|
179
|
+
def scope(cls) -> Literal["global", "session"]:
|
|
180
|
+
"""Returns the scope of this connection type.
|
|
181
|
+
|
|
182
|
+
"global" connection instances will be cached globally, and typically created
|
|
183
|
+
once during the lifetime of an application. "session" connection instances will
|
|
184
|
+
be cached per session, and typically will be created once per user session.
|
|
185
|
+
|
|
186
|
+
Returns
|
|
187
|
+
-------
|
|
188
|
+
"global" or "session"
|
|
189
|
+
The scope of this connection type.
|
|
190
|
+
"""
|
|
191
|
+
return "global"
|
|
192
|
+
|
|
193
|
+
def close(self) -> None:
|
|
194
|
+
"""A function to invoke when this connection needs to be cleaned up.
|
|
195
|
+
|
|
196
|
+
``close`` is registered as an ``on_release`` hook in the resource cache when a
|
|
197
|
+
connection is created with ``st.connection``.
|
|
198
|
+
|
|
199
|
+
Returns
|
|
200
|
+
-------
|
|
201
|
+
None
|
|
202
|
+
"""
|
|
203
|
+
# NOTE: Default implementation is intentionally a no-op.
|
|
@@ -95,10 +95,23 @@ def _create_connection(
|
|
|
95
95
|
__create_connection.__qualname__ = (
|
|
96
96
|
f"{__create_connection.__qualname__}_{ttl_str}_{max_entries}"
|
|
97
97
|
)
|
|
98
|
+
|
|
99
|
+
scope = connection_class.scope()
|
|
100
|
+
if scope not in ("global", "session"):
|
|
101
|
+
raise StreamlitAPIException(
|
|
102
|
+
f"Connection class {connection_class} has scope '{scope}'. Valid values "
|
|
103
|
+
"are 'global' or 'session'."
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
def on_release_wrapped(connection: ConnectionClass) -> None:
|
|
107
|
+
connection.close()
|
|
108
|
+
|
|
98
109
|
__create_connection = cache_resource(
|
|
99
110
|
max_entries=max_entries,
|
|
100
111
|
show_spinner="Running `st.connection(...)`.",
|
|
101
112
|
ttl=ttl,
|
|
113
|
+
scope=scope,
|
|
114
|
+
on_release=on_release_wrapped,
|
|
102
115
|
)(__create_connection)
|
|
103
116
|
|
|
104
117
|
return __create_connection(name, connection_class, **kwargs)
|
|
@@ -220,7 +233,8 @@ def connection_factory( # type: ignore
|
|
|
220
233
|
- Any connection-specific configuration files.
|
|
221
234
|
|
|
222
235
|
The connection returned from ``st.connection`` is internally cached with
|
|
223
|
-
``st.cache_resource
|
|
236
|
+
``st.cache_resource``. Connection types with a scope of ``"global"`` will be shared
|
|
237
|
+
between sessions.
|
|
224
238
|
|
|
225
239
|
Parameters
|
|
226
240
|
----------
|
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.BuCGo7-5.js"></script>
|
|
41
41
|
<link rel="stylesheet" crossorigin href="./static/css/index.BUP6fTcR.css">
|
|
42
42
|
</head>
|
|
43
43
|
<body>
|