streamlit-nightly 1.46.2.dev20250701__py3-none-any.whl → 1.46.2.dev20250702__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/config.py +21 -0
- streamlit/elements/doc_string.py +3 -0
- streamlit/elements/lib/column_types.py +37 -20
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +5 -1
- streamlit/runtime/app_session.py +49 -1
- streamlit/runtime/caching/cache_data_api.py +34 -55
- streamlit/runtime/caching/cache_errors.py +9 -9
- streamlit/runtime/caching/cache_resource_api.py +26 -44
- streamlit/runtime/caching/cache_utils.py +37 -24
- streamlit/runtime/caching/cached_message_replay.py +13 -6
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +219 -219
- streamlit/static/static/css/index.2-JSeiMQ.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.BPc3D9N9.js → ErrorOutline.esm.MhIoYdvl.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BiFtKhyO.js → FileDownload.esm.MFVQ8TeX.js} +1 -1
- streamlit/static/static/js/{FileHelper.D4zH-LPy.js → FileHelper.4MaelLoM.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.C0oAv5iO.js → FormClearHelper.B0jg0hVR.js} +1 -1
- streamlit/static/static/js/{Hooks.DUp04RsA.js → Hooks.BRUa3Uwi.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DDo33kg9.js → InputInstructions.DIDrjUfW.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DluhCn8Y.js → ProgressBar.D5j4Grse.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CgnRTw5b.js → RenderInPortalIfExists.DSEpNV6C.js} +1 -1
- streamlit/static/static/js/{Toolbar.Ds5GetiN.js → Toolbar.CQcJmHso.js} +1 -1
- streamlit/static/static/js/{base-input.WGo1U6ZF.js → base-input.BnnSlzQu.js} +1 -1
- streamlit/static/static/js/{checkbox.D6n54iT6.js → checkbox.C3U3kKA7.js} +1 -1
- streamlit/static/static/js/{createSuper.5U626-en.js → createSuper.Cy5MeyJ7.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.DfB1NFlz.js +1 -0
- streamlit/static/static/js/{downloader.O2_sntfr.js → downloader.DJTt16dd.js} +1 -1
- streamlit/static/static/js/{es6.q_Hnl4aM.js → es6.wyhZ4wJk.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CI0jLiDM.js → iframeResizer.contentWindow.DFyVP9Ig.js} +1 -1
- streamlit/static/static/js/{index.DFr6h2Mp.js → index.B-X33K52.js} +1 -1
- streamlit/static/static/js/{index.ivZN8Zb2.js → index.B22EHN7-.js} +1 -1
- streamlit/static/static/js/{index.BIFkuq05.js → index.B465_5qO.js} +1 -1
- streamlit/static/static/js/{index.DvfUlU7_.js → index.BHoorvVC.js} +60 -60
- streamlit/static/static/js/{index.DExpy6fp.js → index.BMd4yctQ.js} +1 -1
- streamlit/static/static/js/{index.Bx8y-PCC.js → index.BNiT2b3M.js} +1 -1
- streamlit/static/static/js/{index.CuZeb5ME.js → index.BSHRz8-s.js} +1 -1
- streamlit/static/static/js/{index.CydAyglg.js → index.C2ZYRKqZ.js} +1 -1
- streamlit/static/static/js/{index.CssTumWz.js → index.C4H2pObU.js} +1 -1
- streamlit/static/static/js/{index.DXUf_iJw.js → index.CDhJdsJ-.js} +1 -1
- streamlit/static/static/js/{index.CdMiaTQu.js → index.CDk53kDT.js} +1 -1
- streamlit/static/static/js/{index.TZ6Mn-5O.js → index.CG52VtIR.js} +1 -1
- streamlit/static/static/js/{index.BBvZmL8i.js → index.CLg6_EPb.js} +1 -1
- streamlit/static/static/js/{index.BcBDhWfd.js → index.C_ub2Pfc.js} +1 -1
- streamlit/static/static/js/{index.DX-uvB3F.js → index.Cipw6ZXy.js} +1 -1
- streamlit/static/static/js/{index.Chck3OtZ.js → index.CvEUwmm2.js} +1 -1
- streamlit/static/static/js/{index.BpJHZBLD.js → index.Cx59kXcb.js} +1 -1
- streamlit/static/static/js/{index.BgjJWPwA.js → index.D-doFAXM.js} +1 -1
- streamlit/static/static/js/{index.d8SU82Ov.js → index.DEc9e9_6.js} +1 -1
- streamlit/static/static/js/index.DFtXcE7L.js +197 -0
- streamlit/static/static/js/{index.BK_N8ZQx.js → index.DJzsQdj5.js} +1 -1
- streamlit/static/static/js/{index.CJ2HNyRu.js → index.DLQQdwIj.js} +1 -1
- streamlit/static/static/js/{index.Cut1d44J.js → index.DRodAgy0.js} +1 -1
- streamlit/static/static/js/{index.CSmIUY0Y.js → index.DT8f2xQ9.js} +1 -1
- streamlit/static/static/js/{index.9k0LltIg.js → index.DcEV00Pn.js} +1 -1
- streamlit/static/static/js/{index.DYssBBFR.js → index.Do1oo2Dl.js} +1 -1
- streamlit/static/static/js/{index.DGehTu4y.js → index.Dr7_LGVT.js} +1 -1
- streamlit/static/static/js/{index.fwYnPZir.js → index.DsdPm0SS.js} +1 -1
- streamlit/static/static/js/{index.Df3rWQZG.js → index.Dsil7y_J.js} +1 -1
- streamlit/static/static/js/{index.CVeKGjlc.js → index.DtbQuv3u.js} +1 -1
- streamlit/static/static/js/{index.BHq3ymE5.js → index.DyTIPa0F.js} +1 -1
- streamlit/static/static/js/{index.DLIPqPyW.js → index.DynUmaAG.js} +1 -1
- streamlit/static/static/js/{index.D3dJUIaK.js → index.DzC4L_Us.js} +1 -1
- streamlit/static/static/js/{index.6EiR9ocA.js → index.UFChjuC3.js} +1 -1
- streamlit/static/static/js/{index.C3nRmcoA.js → index.gMS0zlRZ.js} +1 -1
- streamlit/static/static/js/{index.C4Ex7o_F.js → index.lQYpmexK.js} +1 -1
- streamlit/static/static/js/{index.DKkRsEHh.js → index.z241Yt9a.js} +1 -1
- streamlit/static/static/js/{input.Da7mGl-e.js → input.C8HOZnEd.js} +1 -1
- streamlit/static/static/js/{memory.Ba9R8N9F.js → memory.8fc2LDiK.js} +1 -1
- streamlit/static/static/js/{mergeWith.DuOn5KYt.js → mergeWith.xmxP-tqn.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Cies2BnB.js → number-overlay-editor.DtoLRumH.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.PFROJe03.js → possibleConstructorReturn.DqUCGXEg.js} +1 -1
- streamlit/static/static/js/{sandbox.BJEPeXCj.js → sandbox.de7mpc93.js} +1 -1
- streamlit/static/static/js/{textarea.C9d_M8Ah.js → textarea.9dU6cbLz.js} +1 -1
- streamlit/static/static/js/{timepicker.DqRJAopc.js → timepicker.DANyzCwb.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BFmb1pdq.js → toConsumableArray.Bja4AaDo.js} +1 -1
- streamlit/static/static/js/{uniqueId.BJtPrMww.js → uniqueId.q5r0gCRd.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.DKrm_jMv.js → useBasicWidgetState.B0oxOutH.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DVjdiDhw.js → useOnInputChange.XxzVJXCy.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CAgTFtpw.js → withFullScreenWrapper.eXXoswSf.js} +1 -1
- {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/RECORD +86 -86
- streamlit/static/static/css/index.C5t3M85E.css +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.BArb4CJR.js +0 -1
- streamlit/static/static/js/index.BE0RFnDe.js +0 -197
- {streamlit_nightly-1.46.2.dev20250701.data → streamlit_nightly-1.46.2.dev20250702.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.46.2.dev20250701.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,9 @@ from __future__ import annotations
|
|
17
17
|
import contextlib
|
18
18
|
import threading
|
19
19
|
from dataclasses import dataclass
|
20
|
-
from typing import TYPE_CHECKING, Any, Literal, Union
|
20
|
+
from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, TypeVar, Union
|
21
|
+
|
22
|
+
from typing_extensions import ParamSpec
|
21
23
|
|
22
24
|
import streamlit as st
|
23
25
|
from streamlit import runtime, util
|
@@ -29,7 +31,6 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import (
|
|
29
31
|
|
30
32
|
if TYPE_CHECKING:
|
31
33
|
from collections.abc import Iterator
|
32
|
-
from types import FunctionType
|
33
34
|
|
34
35
|
from google.protobuf.message import Message
|
35
36
|
|
@@ -70,13 +71,16 @@ class BlockMsgData:
|
|
70
71
|
MsgData = Union[ElementMsgData, BlockMsgData]
|
71
72
|
|
72
73
|
|
74
|
+
R = TypeVar("R")
|
75
|
+
|
76
|
+
|
73
77
|
@dataclass
|
74
|
-
class CachedResult:
|
78
|
+
class CachedResult(Generic[R]):
|
75
79
|
"""The full results of calling a cache-decorated function, enough to
|
76
80
|
replay the st functions called while executing it.
|
77
81
|
"""
|
78
82
|
|
79
|
-
value:
|
83
|
+
value: R
|
80
84
|
messages: list[MsgData]
|
81
85
|
main_id: str
|
82
86
|
sidebar_id: str
|
@@ -132,7 +136,7 @@ class CachedMessageReplayContext(threading.local):
|
|
132
136
|
return util.repr_(self)
|
133
137
|
|
134
138
|
@contextlib.contextmanager
|
135
|
-
def calling_cached_function(self, func:
|
139
|
+
def calling_cached_function(self, func: Callable[..., Any]) -> Iterator[None]: # noqa: ARG002
|
136
140
|
"""Context manager that should wrap the invocation of a cached function.
|
137
141
|
It allows us to track any `st.foo` messages that are generated from inside the
|
138
142
|
function for playback during cache retrieval.
|
@@ -233,8 +237,11 @@ class CachedMessageReplayContext(threading.local):
|
|
233
237
|
self._media_data.append(MediaMsgData(media_data, mimetype, media_id))
|
234
238
|
|
235
239
|
|
240
|
+
P = ParamSpec("P")
|
241
|
+
|
242
|
+
|
236
243
|
def replay_cached_messages(
|
237
|
-
result: CachedResult, cache_type: CacheType, cached_func:
|
244
|
+
result: CachedResult[R], cache_type: CacheType, cached_func: Callable[P, R]
|
238
245
|
) -> None:
|
239
246
|
"""Replay the st element function calls that happened when executing a
|
240
247
|
cache-decorated function.
|
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.BHoorvVC.js"></script>
|
41
41
|
<link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
|
42
42
|
</head>
|
43
43
|
<body>
|