streamlit-nightly 1.44.2.dev20250420__py3-none-any.whl → 1.44.2.dev20250422__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/commands/execution_control.py +1 -0
- streamlit/components/types/base_custom_component.py +9 -0
- streamlit/components/v1/custom_component.py +21 -0
- streamlit/config.py +5 -1
- streamlit/elements/iframe.py +35 -0
- streamlit/env_util.py +4 -4
- streamlit/proto/Components_pb2.py +10 -10
- streamlit/proto/Components_pb2.pyi +6 -1
- streamlit/proto/IFrame_pb2.py +3 -3
- streamlit/proto/IFrame_pb2.pyi +8 -2
- streamlit/proto/MetricsEvent_pb2.py +4 -4
- streamlit/proto/MetricsEvent_pb2.pyi +10 -4
- streamlit/proto/NewSession_pb2.py +4 -4
- streamlit/proto/NewSession_pb2.pyi +20 -5
- streamlit/runtime/app_session.py +7 -2
- streamlit/runtime/context.py +11 -1
- streamlit/runtime/context_util.py +49 -0
- streamlit/runtime/metrics_util.py +5 -5
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.D80Zu2gu.js → ErrorOutline.esm.Bp2ldccU.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.D2zYm91E.js → FileDownload.esm.BFGQMqxg.js} +1 -1
- streamlit/static/static/js/{FileHelper.CzdvH5eG.js → FileHelper.CLfR2Nl5.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D2meQXk1.js → FormClearHelper.DN7_Z3pK.js} +1 -1
- streamlit/static/static/js/{Hooks.wIIx8htT.js → Hooks.Dr0GH325.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CS4Vdw-E.js → InputInstructions.BmCPiwuH.js} +1 -1
- streamlit/static/static/js/{ProgressBar.0_C13cVk.js → ProgressBar.C1S12VpK.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CaqEwihl.js → RenderInPortalIfExists.CfxGSPro.js} +1 -1
- streamlit/static/static/js/Toolbar.BMxjLFs_.js +1 -0
- streamlit/static/static/js/{base-input.ZA7uuQvb.js → base-input.BLpJZP2E.js} +1 -1
- streamlit/static/static/js/{checkbox.DXQQLg5d.js → checkbox.CIgBIQZk.js} +1 -1
- streamlit/static/static/js/{createSuper.BzMZnd4A.js → createSuper.DBgOP3Du.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BzOG44L0.js → data-grid-overlay-editor.CSVlRStP.js} +1 -1
- streamlit/static/static/js/{downloader.O7ihHgXD.js → downloader.B2XHI8Rs.js} +1 -1
- streamlit/static/static/js/{es6.CwyZhsx5.js → es6.Dopsw67W.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Du-UpviG.js → iframeResizer.contentWindow.C85rYpfO.js} +1 -1
- streamlit/static/static/js/{index.BLT473Tv.js → index.3HfBohwS.js} +1 -1
- streamlit/static/static/js/{index.CKXWhVKi.js → index.6uvkM5kA.js} +1 -1
- streamlit/static/static/js/{index.CYjG_79q.js → index.9mIvDHDJ.js} +1 -1
- streamlit/static/static/js/{index.BoU4uauW.js → index.BL3Kr9Rq.js} +1 -1
- streamlit/static/static/js/{index.C09S0HiQ.js → index.BV4FE5kB.js} +1 -1
- streamlit/static/static/js/{index.CHPwAUGA.js → index.BVHpAfQR.js} +1 -1
- streamlit/static/static/js/{index.ZNnD8Hqu.js → index.BiV4F66u.js} +1 -1
- streamlit/static/static/js/{index.CApa-pt-.js → index.BpYJxTkk.js} +83 -83
- streamlit/static/static/js/{index.BtRVol3Q.js → index.Bpd8CsZ5.js} +1 -1
- streamlit/static/static/js/{index.RTVs3fag.js → index.Bpy9n229.js} +1 -1
- streamlit/static/static/js/{index.C8tbWaDL.js → index.BwyCju0E.js} +1 -1
- streamlit/static/static/js/{index.D7F-a3EE.js → index.C00os7bA.js} +1 -1
- streamlit/static/static/js/{index.D5JZgpeD.js → index.C2MtHl98.js} +1 -1
- streamlit/static/static/js/index.C56IkBvU.js +1 -0
- streamlit/static/static/js/{index.BJcBYpwT.js → index.C7p03y_M.js} +1 -1
- streamlit/static/static/js/{index.DazsbagD.js → index.CCX5EIu8.js} +1 -1
- streamlit/static/static/js/{index.CX1tEa8n.js → index.CCYDqcpA.js} +1 -1
- streamlit/static/static/js/{index.DTXnZAvc.js → index.CEWxPngV.js} +1 -1
- streamlit/static/static/js/{index.dnuJvy6m.js → index.CSVdq4RM.js} +54 -54
- streamlit/static/static/js/{index.Cyj4XRvN.js → index.CWB411xq.js} +1 -1
- streamlit/static/static/js/{index.DmYKZFsN.js → index.CZ-a2zEe.js} +1 -1
- streamlit/static/static/js/{index.C-9LS8Yj.js → index.CrSmh1fy.js} +1 -1
- streamlit/static/static/js/{index.CflP6_Dx.js → index.D4vkE8k4.js} +1 -1
- streamlit/static/static/js/{index.YVNSDXxI.js → index.DMSrAr4X.js} +1 -1
- streamlit/static/static/js/{index.D1xvlhB6.js → index.DN3zE0RU.js} +1 -1
- streamlit/static/static/js/{index.DHe1f5z_.js → index.DN_7WvH0.js} +1 -1
- streamlit/static/static/js/{index.Cnl0etuP.js → index.DPcAZ75a.js} +1 -1
- streamlit/static/static/js/{index.BtiLOsf8.js → index.DYVqVcRM.js} +1 -1
- streamlit/static/static/js/index.DZxZM7Ek.js +1 -0
- streamlit/static/static/js/{index.ZWMqHNuK.js → index.DeS0IkWE.js} +247 -220
- streamlit/static/static/js/{index.DgXhmnxf.js → index.DojXbCby.js} +1 -1
- streamlit/static/static/js/{index.S6acAWs2.js → index.DoribfgZ.js} +1 -1
- streamlit/static/static/js/{index.Ukzz8srB.js → index.HAb52J76.js} +1 -1
- streamlit/static/static/js/{index.Dhb1ZtIh.js → index.Kw3W98Th.js} +1 -1
- streamlit/static/static/js/{index.ByRk1ZVr.js → index.PNpPr6uJ.js} +1 -1
- streamlit/static/static/js/{index.C2epN1DG.js → index.p0aNteOo.js} +1 -1
- streamlit/static/static/js/{index.Cc1Nr493.js → index.q8SJCyGp.js} +1 -1
- streamlit/static/static/js/{input.DMVHVEx-.js → input.CCoe_psd.js} +1 -1
- streamlit/static/static/js/{memory.CCk-R0ri.js → memory.DJlUxbbU.js} +1 -1
- streamlit/static/static/js/{mergeWith.DcPT5Xx0.js → mergeWith.BIF_NZCa.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.E7tX6o4a.js → number-overlay-editor.V-rRAT06.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.CPhG6rzv.js → possibleConstructorReturn.DJfAQe4D.js} +1 -1
- streamlit/static/static/js/{sandbox.CcAzCFLp.js → sandbox.Dg0KTNPN.js} +1 -1
- streamlit/static/static/js/{textarea.DrEbtK8O.js → textarea.D3KTVlzD.js} +1 -1
- streamlit/static/static/js/{timepicker.D9yq3TfR.js → timepicker.Bz2YVuxL.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CcKik6VV.js → toConsumableArray.B93v6_qJ.js} +1 -1
- streamlit/static/static/js/{uniqueId.D_YpZxmT.js → uniqueId.Binq0oUN.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.rw_e_dkX.js → useBasicWidgetState.CvULcwlh.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DSfi0HEo.js → useOnInputChange.CuQA4gaj.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.D8OHKNTo.js → withFullScreenWrapper.RQKRDDEV.js} +1 -1
- {streamlit_nightly-1.44.2.dev20250420.dist-info → streamlit_nightly-1.44.2.dev20250422.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250420.dist-info → streamlit_nightly-1.44.2.dev20250422.dist-info}/RECORD +91 -90
- streamlit/static/static/js/Toolbar.DrcZygAl.js +0 -1
- streamlit/static/static/js/index.BSd346rW.js +0 -1
- streamlit/static/static/js/index.Dd8KIO3_.js +0 -1
- {streamlit_nightly-1.44.2.dev20250420.data → streamlit_nightly-1.44.2.dev20250422.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250420.dist-info → streamlit_nightly-1.44.2.dev20250422.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250420.dist-info → streamlit_nightly-1.44.2.dev20250422.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250420.dist-info → streamlit_nightly-1.44.2.dev20250422.dist-info}/top_level.txt +0 -0
@@ -149,6 +149,7 @@ def rerun( # type: ignore[misc]
|
|
149
149
|
fragment_id_queue=_new_fragment_id_queue(ctx, scope),
|
150
150
|
is_fragment_scoped_rerun=scope == "fragment",
|
151
151
|
cached_message_hashes=cached_message_hashes,
|
152
|
+
context_info=ctx.context_info,
|
152
153
|
)
|
153
154
|
)
|
154
155
|
# Force a yield point so the runner can do the rerun
|
@@ -60,6 +60,7 @@ class BaseCustomComponent(ABC):
|
|
60
60
|
default: Any = None,
|
61
61
|
key: str | None = None,
|
62
62
|
on_change: WidgetCallback | None = None,
|
63
|
+
tab_index: int | None = None,
|
63
64
|
**kwargs,
|
64
65
|
) -> Any:
|
65
66
|
"""An alias for create_instance."""
|
@@ -68,6 +69,7 @@ class BaseCustomComponent(ABC):
|
|
68
69
|
default=default,
|
69
70
|
key=key,
|
70
71
|
on_change=on_change,
|
72
|
+
tab_index=tab_index,
|
71
73
|
**kwargs,
|
72
74
|
)
|
73
75
|
|
@@ -113,6 +115,7 @@ class BaseCustomComponent(ABC):
|
|
113
115
|
default: Any = None,
|
114
116
|
key: str | None = None,
|
115
117
|
on_change: WidgetCallback | None = None,
|
118
|
+
tab_index: int | None = None,
|
116
119
|
**kwargs,
|
117
120
|
) -> Any:
|
118
121
|
"""Create a new instance of the component.
|
@@ -131,6 +134,12 @@ class BaseCustomComponent(ABC):
|
|
131
134
|
component's "widget ID".
|
132
135
|
on_change: WidgetCallback or None
|
133
136
|
An optional callback invoked when the widget's value changes. No arguments are passed to it.
|
137
|
+
tab_index: int or None
|
138
|
+
Specifies the tab order of the iframe containing the component.
|
139
|
+
Possible values are:
|
140
|
+
- ``None`` (default): Browser default behavior.
|
141
|
+
- ``-1``: Removes the iframe from the natural tab order, but it can still be focused programmatically.
|
142
|
+
- ``0`` or positive integer: Includes the iframe in the natural tab order.
|
134
143
|
**kwargs
|
135
144
|
Keyword args to pass to the component.
|
136
145
|
|
@@ -52,6 +52,7 @@ class CustomComponent(BaseCustomComponent):
|
|
52
52
|
default: Any = None,
|
53
53
|
key: str | None = None,
|
54
54
|
on_change: WidgetCallback | None = None,
|
55
|
+
tab_index: int | None = None,
|
55
56
|
**kwargs,
|
56
57
|
) -> Any:
|
57
58
|
"""An alias for create_instance."""
|
@@ -60,6 +61,7 @@ class CustomComponent(BaseCustomComponent):
|
|
60
61
|
default=default,
|
61
62
|
key=key,
|
62
63
|
on_change=on_change,
|
64
|
+
tab_index=tab_index,
|
63
65
|
**kwargs,
|
64
66
|
)
|
65
67
|
|
@@ -70,6 +72,7 @@ class CustomComponent(BaseCustomComponent):
|
|
70
72
|
default: Any = None,
|
71
73
|
key: str | None = None,
|
72
74
|
on_change: WidgetCallback | None = None,
|
75
|
+
tab_index: int | None = None,
|
73
76
|
**kwargs,
|
74
77
|
) -> Any:
|
75
78
|
"""Create a new instance of the component.
|
@@ -88,6 +91,12 @@ class CustomComponent(BaseCustomComponent):
|
|
88
91
|
component's "widget ID".
|
89
92
|
on_change: WidgetCallback or None
|
90
93
|
An optional callback invoked when the widget's value changes. No arguments are passed to it.
|
94
|
+
tab_index : int, optional
|
95
|
+
Specifies the tab order of the iframe containing the component.
|
96
|
+
Possible values are:
|
97
|
+
- ``None`` (default): Browser default behavior.
|
98
|
+
- ``-1``: Removes the iframe from the natural tab order, but it can still be focused programmatically.
|
99
|
+
- ``0`` or positive integer: Includes the iframe in the natural tab order.
|
91
100
|
**kwargs
|
92
101
|
Keyword args to pass to the component.
|
93
102
|
|
@@ -100,6 +109,16 @@ class CustomComponent(BaseCustomComponent):
|
|
100
109
|
if len(args) > 0:
|
101
110
|
raise MarshallComponentException(f"Argument '{args[0]}' needs a label")
|
102
111
|
|
112
|
+
# Validate tab_index according to web specifications
|
113
|
+
if tab_index is not None and not (
|
114
|
+
isinstance(tab_index, int)
|
115
|
+
and not isinstance(tab_index, bool)
|
116
|
+
and tab_index >= -1
|
117
|
+
):
|
118
|
+
raise StreamlitAPIException(
|
119
|
+
"tab_index must be None, -1, or a non-negative integer."
|
120
|
+
)
|
121
|
+
|
103
122
|
try:
|
104
123
|
import pyarrow # noqa: F401, ICN001
|
105
124
|
|
@@ -148,6 +167,8 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
|
|
148
167
|
element.component_instance.form_id = current_form_id(dg)
|
149
168
|
if self.url is not None:
|
150
169
|
element.component_instance.url = self.url
|
170
|
+
if tab_index is not None:
|
171
|
+
element.component_instance.tab_index = tab_index
|
151
172
|
|
152
173
|
# Normally, a widget's element_hash (which determines
|
153
174
|
# its identity across multiple runs of an app) is computed
|
streamlit/config.py
CHANGED
@@ -711,7 +711,11 @@ def _server_headless() -> bool:
|
|
711
711
|
Default: false unless (1) we are on a Linux box where DISPLAY is unset, or
|
712
712
|
(2) we are running in the Streamlit Atom plugin.
|
713
713
|
"""
|
714
|
-
if
|
714
|
+
if (
|
715
|
+
env_util.IS_LINUX_OR_BSD
|
716
|
+
and not os.getenv("DISPLAY")
|
717
|
+
and not os.getenv("WAYLAND_DISPLAY")
|
718
|
+
):
|
715
719
|
# We're running in Linux and DISPLAY is unset
|
716
720
|
return True
|
717
721
|
|
streamlit/elements/iframe.py
CHANGED
@@ -16,6 +16,7 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
from typing import TYPE_CHECKING, cast
|
18
18
|
|
19
|
+
from streamlit.errors import StreamlitAPIException
|
19
20
|
from streamlit.proto.IFrame_pb2 import IFrame as IFrameProto
|
20
21
|
from streamlit.runtime.metrics_util import gather_metrics
|
21
22
|
|
@@ -31,6 +32,8 @@ class IframeMixin:
|
|
31
32
|
width: int | None = None,
|
32
33
|
height: int | None = None,
|
33
34
|
scrolling: bool = False,
|
35
|
+
*,
|
36
|
+
tab_index: int | None = None,
|
34
37
|
) -> DeltaGenerator:
|
35
38
|
"""Load a remote URL in an iframe.
|
36
39
|
|
@@ -59,6 +62,12 @@ class IframeMixin:
|
|
59
62
|
does not show a scrollbar. If this is ``True``, Streamlit shows a
|
60
63
|
scrollbar when the content is larger than the iframe.
|
61
64
|
|
65
|
+
tab_index : int, optional
|
66
|
+
Specifies the tab order of the iframe. Possible values are:
|
67
|
+
- ``None`` (default): Browser default behavior.
|
68
|
+
- ``-1``: Removes the iframe from the natural tab order, but it can still be focused programmatically.
|
69
|
+
- ``0`` or positive integer: Includes the iframe in the natural tab order.
|
70
|
+
|
62
71
|
Example
|
63
72
|
-------
|
64
73
|
|
@@ -74,6 +83,7 @@ class IframeMixin:
|
|
74
83
|
width=width,
|
75
84
|
height=height,
|
76
85
|
scrolling=scrolling,
|
86
|
+
tab_index=tab_index,
|
77
87
|
)
|
78
88
|
return self.dg._enqueue("iframe", iframe_proto)
|
79
89
|
|
@@ -84,6 +94,8 @@ class IframeMixin:
|
|
84
94
|
width: int | None = None,
|
85
95
|
height: int | None = None,
|
86
96
|
scrolling: bool = False,
|
97
|
+
*,
|
98
|
+
tab_index: int | None = None,
|
87
99
|
) -> DeltaGenerator:
|
88
100
|
"""Display an HTML string in an iframe.
|
89
101
|
|
@@ -115,6 +127,12 @@ class IframeMixin:
|
|
115
127
|
does not show a scrollbar. If this is ``True``, Streamlit shows a
|
116
128
|
scrollbar when the content is larger than the iframe.
|
117
129
|
|
130
|
+
tab_index : int, optional
|
131
|
+
Specifies the tab order of the iframe. Possible values are:
|
132
|
+
- ``None`` (default): Browser default behavior.
|
133
|
+
- ``-1``: Removes the iframe from the natural tab order, but it can still be focused programmatically.
|
134
|
+
- ``0`` or positive integer: Includes the iframe in the natural tab order.
|
135
|
+
|
118
136
|
Example
|
119
137
|
-------
|
120
138
|
|
@@ -132,6 +150,7 @@ class IframeMixin:
|
|
132
150
|
width=width,
|
133
151
|
height=height,
|
134
152
|
scrolling=scrolling,
|
153
|
+
tab_index=tab_index,
|
135
154
|
)
|
136
155
|
return self.dg._enqueue("iframe", iframe_proto)
|
137
156
|
|
@@ -148,6 +167,7 @@ def marshall(
|
|
148
167
|
width: int | None = None,
|
149
168
|
height: int | None = None,
|
150
169
|
scrolling: bool = False,
|
170
|
+
tab_index: int | None = None,
|
151
171
|
) -> None:
|
152
172
|
"""Marshalls data into an IFrame proto.
|
153
173
|
|
@@ -171,6 +191,8 @@ def marshall(
|
|
171
191
|
scrolling : bool
|
172
192
|
If true, show a scrollbar when the content is larger than the iframe.
|
173
193
|
Otherwise, never show a scrollbar.
|
194
|
+
tab_index : int, optional
|
195
|
+
Specifies the tab order of the iframe.
|
174
196
|
|
175
197
|
"""
|
176
198
|
if src is not None:
|
@@ -189,3 +211,16 @@ def marshall(
|
|
189
211
|
proto.height = 150
|
190
212
|
|
191
213
|
proto.scrolling = scrolling
|
214
|
+
|
215
|
+
if tab_index is not None:
|
216
|
+
# Validate tab_index according to web specifications
|
217
|
+
if not (
|
218
|
+
isinstance(tab_index, int)
|
219
|
+
and not isinstance(tab_index, bool)
|
220
|
+
and tab_index >= -1
|
221
|
+
):
|
222
|
+
raise StreamlitAPIException(
|
223
|
+
"tab_index must be None, -1, or a non-negative integer."
|
224
|
+
)
|
225
|
+
|
226
|
+
proto.tab_index = tab_index
|
streamlit/env_util.py
CHANGED
@@ -19,10 +19,10 @@ import platform
|
|
19
19
|
import re
|
20
20
|
import sys
|
21
21
|
|
22
|
-
|
23
|
-
IS_WINDOWS =
|
24
|
-
IS_DARWIN =
|
25
|
-
IS_LINUX_OR_BSD = (
|
22
|
+
SYSTEM = platform.system().lower()
|
23
|
+
IS_WINDOWS = SYSTEM == "windows"
|
24
|
+
IS_DARWIN = SYSTEM == "darwin"
|
25
|
+
IS_LINUX_OR_BSD = (SYSTEM == "linux") or ("bsd" in SYSTEM)
|
26
26
|
|
27
27
|
|
28
28
|
def is_pex() -> bool:
|
@@ -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/Components.proto\"\
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/Components.proto\"\xb1\x01\n\x11\x43omponentInstance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tjson_args\x18\x02 \x01(\t\x12!\n\x0cspecial_args\x18\x03 \x03(\x0b\x32\x0b.SpecialArg\x12\x16\n\x0e\x63omponent_name\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x06 \x01(\t\x12\x16\n\ttab_index\x18\x07 \x01(\x05H\x00\x88\x01\x01\x42\x0c\n\n_tab_index\"_\n\nSpecialArg\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x0f\x61rrow_dataframe\x18\x02 \x01(\x0b\x32\x0f.ArrowDataframeH\x00\x12\x0f\n\x05\x62ytes\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05value\"J\n\x0e\x41rrowDataframe\x12\x19\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x0b.ArrowTable\x12\x0e\n\x06height\x18\x02 \x01(\r\x12\r\n\x05width\x18\x03 \x01(\r\"]\n\nArrowTable\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\r\n\x05index\x18\x02 \x01(\x0c\x12\x0f\n\x07\x63olumns\x18\x03 \x01(\x0c\x12!\n\x06styler\x18\x05 \x01(\x0b\x32\x11.ArrowTableStyler\"Y\n\x10\x41rrowTableStyler\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61ption\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x16\n\x0e\x64isplay_values\x18\x04 \x01(\x0c\x42/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x43omponentsProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,13 +23,13 @@ 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\017ComponentsProto'
|
25
25
|
_globals['_COMPONENTINSTANCE']._serialized_start=37
|
26
|
-
_globals['_COMPONENTINSTANCE']._serialized_end=
|
27
|
-
_globals['_SPECIALARG']._serialized_start=
|
28
|
-
_globals['_SPECIALARG']._serialized_end=
|
29
|
-
_globals['_ARROWDATAFRAME']._serialized_start=
|
30
|
-
_globals['_ARROWDATAFRAME']._serialized_end=
|
31
|
-
_globals['_ARROWTABLE']._serialized_start=
|
32
|
-
_globals['_ARROWTABLE']._serialized_end=
|
33
|
-
_globals['_ARROWTABLESTYLER']._serialized_start=
|
34
|
-
_globals['_ARROWTABLESTYLER']._serialized_end=
|
26
|
+
_globals['_COMPONENTINSTANCE']._serialized_end=214
|
27
|
+
_globals['_SPECIALARG']._serialized_start=216
|
28
|
+
_globals['_SPECIALARG']._serialized_end=311
|
29
|
+
_globals['_ARROWDATAFRAME']._serialized_start=313
|
30
|
+
_globals['_ARROWDATAFRAME']._serialized_end=387
|
31
|
+
_globals['_ARROWTABLE']._serialized_start=389
|
32
|
+
_globals['_ARROWTABLE']._serialized_end=482
|
33
|
+
_globals['_ARROWTABLESTYLER']._serialized_start=484
|
34
|
+
_globals['_ARROWTABLESTYLER']._serialized_end=573
|
35
35
|
# @@protoc_insertion_point(module_scope)
|
@@ -36,6 +36,7 @@ class ComponentInstance(google.protobuf.message.Message):
|
|
36
36
|
COMPONENT_NAME_FIELD_NUMBER: builtins.int
|
37
37
|
URL_FIELD_NUMBER: builtins.int
|
38
38
|
FORM_ID_FIELD_NUMBER: builtins.int
|
39
|
+
TAB_INDEX_FIELD_NUMBER: builtins.int
|
39
40
|
id: builtins.str
|
40
41
|
"""The instance's "widget ID", used to uniquely identify it."""
|
41
42
|
json_args: builtins.str
|
@@ -48,6 +49,7 @@ class ComponentInstance(google.protobuf.message.Message):
|
|
48
49
|
that they're developing their component in.
|
49
50
|
"""
|
50
51
|
form_id: builtins.str
|
52
|
+
tab_index: builtins.int
|
51
53
|
@property
|
52
54
|
def special_args(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SpecialArg]:
|
53
55
|
"""Additional, non-JSON args. These require special processing
|
@@ -63,8 +65,11 @@ class ComponentInstance(google.protobuf.message.Message):
|
|
63
65
|
component_name: builtins.str = ...,
|
64
66
|
url: builtins.str = ...,
|
65
67
|
form_id: builtins.str = ...,
|
68
|
+
tab_index: builtins.int | None = ...,
|
66
69
|
) -> None: ...
|
67
|
-
def
|
70
|
+
def HasField(self, field_name: typing.Literal["_tab_index", b"_tab_index", "tab_index", b"tab_index"]) -> builtins.bool: ...
|
71
|
+
def ClearField(self, field_name: typing.Literal["_tab_index", b"_tab_index", "component_name", b"component_name", "form_id", b"form_id", "id", b"id", "json_args", b"json_args", "special_args", b"special_args", "tab_index", b"tab_index", "url", b"url"]) -> None: ...
|
72
|
+
def WhichOneof(self, oneof_group: typing.Literal["_tab_index", b"_tab_index"]) -> typing.Literal["tab_index"] | None: ...
|
68
73
|
|
69
74
|
global___ComponentInstance = ComponentInstance
|
70
75
|
|
streamlit/proto/IFrame_pb2.py
CHANGED
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cstreamlit/proto/IFrame.proto\"
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cstreamlit/proto/IFrame.proto\"\x9c\x01\n\x06IFrame\x12\r\n\x03src\x18\x01 \x01(\tH\x00\x12\x10\n\x06srcdoc\x18\x02 \x01(\tH\x00\x12\r\n\x05width\x18\x03 \x01(\x02\x12\x11\n\thas_width\x18\x04 \x01(\x08\x12\x0e\n\x06height\x18\x05 \x01(\x02\x12\x11\n\tscrolling\x18\x07 \x01(\x08\x12\x16\n\ttab_index\x18\x08 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04typeB\x0c\n\n_tab_indexB+\n\x1c\x63om.snowflake.apps.streamlitB\x0bIFrameProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +22,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.IFrame_pb2'
|
|
22
22
|
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\013IFrameProto'
|
25
|
-
_globals['_IFRAME']._serialized_start=
|
26
|
-
_globals['_IFRAME']._serialized_end=
|
25
|
+
_globals['_IFRAME']._serialized_start=33
|
26
|
+
_globals['_IFRAME']._serialized_end=189
|
27
27
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/IFrame_pb2.pyi
CHANGED
@@ -34,6 +34,7 @@ class IFrame(google.protobuf.message.Message):
|
|
34
34
|
HAS_WIDTH_FIELD_NUMBER: builtins.int
|
35
35
|
HEIGHT_FIELD_NUMBER: builtins.int
|
36
36
|
SCROLLING_FIELD_NUMBER: builtins.int
|
37
|
+
TAB_INDEX_FIELD_NUMBER: builtins.int
|
37
38
|
src: builtins.str
|
38
39
|
"""A URL to load"""
|
39
40
|
srcdoc: builtins.str
|
@@ -42,6 +43,7 @@ class IFrame(google.protobuf.message.Message):
|
|
42
43
|
has_width: builtins.bool
|
43
44
|
height: builtins.float
|
44
45
|
scrolling: builtins.bool
|
46
|
+
tab_index: builtins.int
|
45
47
|
def __init__(
|
46
48
|
self,
|
47
49
|
*,
|
@@ -51,9 +53,13 @@ class IFrame(google.protobuf.message.Message):
|
|
51
53
|
has_width: builtins.bool = ...,
|
52
54
|
height: builtins.float = ...,
|
53
55
|
scrolling: builtins.bool = ...,
|
56
|
+
tab_index: builtins.int | None = ...,
|
54
57
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["src", b"src", "srcdoc", b"srcdoc", "type", b"type"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["has_width", b"has_width", "height", b"height", "scrolling", b"scrolling", "src", b"src", "srcdoc", b"srcdoc", "type", b"type", "width", b"width"]) -> None: ...
|
58
|
+
def HasField(self, field_name: typing.Literal["_tab_index", b"_tab_index", "src", b"src", "srcdoc", b"srcdoc", "tab_index", b"tab_index", "type", b"type"]) -> builtins.bool: ...
|
59
|
+
def ClearField(self, field_name: typing.Literal["_tab_index", b"_tab_index", "has_width", b"has_width", "height", b"height", "scrolling", b"scrolling", "src", b"src", "srcdoc", b"srcdoc", "tab_index", b"tab_index", "type", b"type", "width", b"width"]) -> None: ...
|
60
|
+
@typing.overload
|
61
|
+
def WhichOneof(self, oneof_group: typing.Literal["_tab_index", b"_tab_index"]) -> typing.Literal["tab_index"] | None: ...
|
62
|
+
@typing.overload
|
57
63
|
def WhichOneof(self, oneof_group: typing.Literal["type", b"type"]) -> typing.Literal["src", "srcdoc"] | None: ...
|
58
64
|
|
59
65
|
global___IFrame = IFrame
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
15
15
|
from streamlit.proto import PageProfile_pb2 as streamlit_dot_proto_dot_PageProfile__pb2
|
16
16
|
|
17
17
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/MetricsEvent.proto\x1a!streamlit/proto/PageProfile.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/MetricsEvent.proto\x1a!streamlit/proto/PageProfile.proto\"\xa9\x07\n\x0cMetricsEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x14\n\x0c\x61nonymous_id\x18\x02 \x01(\t\x12\x15\n\rmachine_id_v3\x18\x03 \x01(\t\x12\x15\n\rmachine_id_v4\x18) \x01(\t\x12\x13\n\x0breport_hash\x18\x04 \x01(\t\x12\x0b\n\x03\x64\x65v\x18\x05 \x01(\x08\x12\x0e\n\x06source\x18\x06 \x01(\t\x12\x19\n\x11streamlit_version\x18\x07 \x01(\t\x12\x10\n\x08is_hello\x18\x08 \x01(\x08\x12\x0e\n\x06\x61pp_id\x18! \x01(\t\x12\x12\n\nsession_id\x18# \x01(\t\x12\x16\n\x0epython_version\x18$ \x01(\t\x12\x11\n\tserver_os\x18* \x01(\t\x12\x13\n\x0bhas_display\x18+ \x01(\x08\x12\x11\n\thosted_at\x18\t \x01(\t\x12\r\n\x05owner\x18\n \x01(\t\x12\x0c\n\x04repo\x18\x0b \x01(\t\x12\x0e\n\x06\x62ranch\x18\x0c \x01(\t\x12\x13\n\x0bmain_module\x18\r \x01(\t\x12\x12\n\ncreator_id\x18\x0e \x01(\t\x12\x18\n\x10\x63ontext_page_url\x18\x0f \x01(\t\x12\x1a\n\x12\x63ontext_page_title\x18\x10 \x01(\t\x12\x19\n\x11\x63ontext_page_path\x18\x11 \x01(\t\x12\x1d\n\x15\x63ontext_page_referrer\x18\x12 \x01(\t\x12\x1b\n\x13\x63ontext_page_search\x18\x13 \x01(\t\x12\x16\n\x0e\x63ontext_locale\x18\x14 \x01(\t\x12\x1a\n\x12\x63ontext_user_agent\x18\x15 \x01(\t\x12\r\n\x05label\x18\x16 \x01(\t\x12\x1a\n\x08\x63ommands\x18\x17 \x03(\x0b\x32\x08.Command\x12\x11\n\texec_time\x18\x18 \x01(\x03\x12\x11\n\tprep_time\x18\x19 \x01(\x03\x12\x0e\n\x06\x63onfig\x18\x1a \x03(\t\x12\x1a\n\x12uncaught_exception\x18\x1b \x01(\t\x12\x14\n\x0c\x61ttributions\x18\x1c \x03(\t\x12\n\n\x02os\x18\x1d \x01(\t\x12\x10\n\x08timezone\x18\x1e \x01(\t\x12\x10\n\x08headless\x18\x1f \x01(\x08\x12\x17\n\x0fis_fragment_run\x18 \x01(\x08\x12\x10\n\x08numPages\x18\" \x01(\x03\x12\x18\n\x10page_script_hash\x18% \x01(\t\x12\x14\n\x0c\x61\x63tive_theme\x18& \x01(\t\x12\x17\n\x0ftotal_load_time\x18\' \x01(\x03\x12\"\n\x0c\x62rowser_info\x18( \x01(\x0b\x32\x0c.BrowserInfo\"]\n\x0b\x42rowserInfo\x12\x14\n\x0c\x62rowser_name\x18\x01 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65vice_type\x18\x03 \x01(\t\x12\n\n\x02os\x18\x04 \x01(\tB1\n\x1c\x63om.snowflake.apps.streamlitB\x11MetricsEventProtob\x06proto3')
|
19
19
|
|
20
20
|
_globals = globals()
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -24,7 +24,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
24
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\021MetricsEventProto'
|
26
26
|
_globals['_METRICSEVENT']._serialized_start=74
|
27
|
-
_globals['_METRICSEVENT']._serialized_end=
|
28
|
-
_globals['_BROWSERINFO']._serialized_start=
|
29
|
-
_globals['_BROWSERINFO']._serialized_end=
|
27
|
+
_globals['_METRICSEVENT']._serialized_end=1011
|
28
|
+
_globals['_BROWSERINFO']._serialized_start=1013
|
29
|
+
_globals['_BROWSERINFO']._serialized_end=1106
|
30
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -36,7 +36,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
36
36
|
EVENT_FIELD_NUMBER: builtins.int
|
37
37
|
ANONYMOUS_ID_FIELD_NUMBER: builtins.int
|
38
38
|
MACHINE_ID_V3_FIELD_NUMBER: builtins.int
|
39
|
-
|
39
|
+
MACHINE_ID_V4_FIELD_NUMBER: builtins.int
|
40
40
|
REPORT_HASH_FIELD_NUMBER: builtins.int
|
41
41
|
DEV_FIELD_NUMBER: builtins.int
|
42
42
|
SOURCE_FIELD_NUMBER: builtins.int
|
@@ -45,6 +45,8 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
45
45
|
APP_ID_FIELD_NUMBER: builtins.int
|
46
46
|
SESSION_ID_FIELD_NUMBER: builtins.int
|
47
47
|
PYTHON_VERSION_FIELD_NUMBER: builtins.int
|
48
|
+
SERVER_OS_FIELD_NUMBER: builtins.int
|
49
|
+
HAS_DISPLAY_FIELD_NUMBER: builtins.int
|
48
50
|
HOSTED_AT_FIELD_NUMBER: builtins.int
|
49
51
|
OWNER_FIELD_NUMBER: builtins.int
|
50
52
|
REPO_FIELD_NUMBER: builtins.int
|
@@ -78,7 +80,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
78
80
|
"""Common Event Fields:"""
|
79
81
|
anonymous_id: builtins.str
|
80
82
|
machine_id_v3: builtins.str
|
81
|
-
|
83
|
+
machine_id_v4: builtins.str
|
82
84
|
report_hash: builtins.str
|
83
85
|
dev: builtins.bool
|
84
86
|
source: builtins.str
|
@@ -87,6 +89,8 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
87
89
|
app_id: builtins.str
|
88
90
|
session_id: builtins.str
|
89
91
|
python_version: builtins.str
|
92
|
+
server_os: builtins.str
|
93
|
+
has_display: builtins.bool
|
90
94
|
hosted_at: builtins.str
|
91
95
|
"""Host tracking fields:"""
|
92
96
|
owner: builtins.str
|
@@ -134,7 +138,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
134
138
|
event: builtins.str = ...,
|
135
139
|
anonymous_id: builtins.str = ...,
|
136
140
|
machine_id_v3: builtins.str = ...,
|
137
|
-
|
141
|
+
machine_id_v4: builtins.str = ...,
|
138
142
|
report_hash: builtins.str = ...,
|
139
143
|
dev: builtins.bool = ...,
|
140
144
|
source: builtins.str = ...,
|
@@ -143,6 +147,8 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
143
147
|
app_id: builtins.str = ...,
|
144
148
|
session_id: builtins.str = ...,
|
145
149
|
python_version: builtins.str = ...,
|
150
|
+
server_os: builtins.str = ...,
|
151
|
+
has_display: builtins.bool = ...,
|
146
152
|
hosted_at: builtins.str = ...,
|
147
153
|
owner: builtins.str = ...,
|
148
154
|
repo: builtins.str = ...,
|
@@ -174,7 +180,7 @@ class MetricsEvent(google.protobuf.message.Message):
|
|
174
180
|
browser_info: global___BrowserInfo | None = ...,
|
175
181
|
) -> None: ...
|
176
182
|
def HasField(self, field_name: typing.Literal["browser_info", b"browser_info"]) -> builtins.bool: ...
|
177
|
-
def ClearField(self, field_name: 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", "headless", b"headless", "hosted_at", b"hosted_at", "is_fragment_run", b"is_fragment_run", "is_hello", b"is_hello", "label", b"label", "machine_id_v3", b"machine_id_v3", "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", "
|
183
|
+
def ClearField(self, field_name: 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", "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"]) -> None: ...
|
178
184
|
|
179
185
|
global___MetricsEvent = MetricsEvent
|
180
186
|
|
@@ -16,7 +16,7 @@ from streamlit.proto import AppPage_pb2 as streamlit_dot_proto_dot_AppPage__pb2
|
|
16
16
|
from streamlit.proto import SessionStatus_pb2 as streamlit_dot_proto_dot_SessionStatus__pb2
|
17
17
|
|
18
18
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\xb6\x07\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x14\n\x0cheading_font\x18\x0c \x01(\t\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12show_widget_border\x18\x14 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x04\x88\x01\x01\x12 \n\x13show_sidebar_border\x18\x17 \x01(\x08H\x05\x88\x01\x01\x12(\n\x07sidebar\x18\x18 \x01(\x0b\x32\x12.CustomThemeConfigH\x06\x88\x01\x01\x12\"\n\x15\x63ode_background_color\x18\x19 \x01(\tH\x07\x88\x01\x01\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x0f\n\r_border_colorB\x15\n\x13_show_widget_borderB\r\n\x0b_link_colorB\x11\n\x0f_base_font_sizeB\x16\n\x14_show_sidebar_borderB\n\n\x08_sidebarB\x18\n\x16_code_background_color\"F\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x0e\n\x06weight\x18\x03 \x01(\x05\x12\r\n\x05style\x18\x04 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\xb6\x07\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x14\n\x0cheading_font\x18\x0c \x01(\t\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12show_widget_border\x18\x14 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x04\x88\x01\x01\x12 \n\x13show_sidebar_border\x18\x17 \x01(\x08H\x05\x88\x01\x01\x12(\n\x07sidebar\x18\x18 \x01(\x0b\x32\x12.CustomThemeConfigH\x06\x88\x01\x01\x12\"\n\x15\x63ode_background_color\x18\x19 \x01(\tH\x07\x88\x01\x01\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x0f\n\r_border_colorB\x15\n\x13_show_widget_borderB\r\n\x0b_link_colorB\x11\n\x0f_base_font_sizeB\x16\n\x14_show_sidebar_borderB\n\n\x08_sidebarB\x18\n\x16_code_background_color\"F\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x0e\n\x06weight\x18\x03 \x01(\x05\x12\r\n\x05style\x18\x04 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"a\n\x08UserInfo\x12\x17\n\x0finstallation_id\x18\x01 \x01(\t\x12\x1a\n\x12installation_id_v3\x18\x05 \x01(\t\x12\x1a\n\x12installation_id_v4\x18\x06 \x01(\tJ\x04\x08\x02\x10\x03\"l\n\x0f\x45nvironmentInfo\x12\x19\n\x11streamlit_version\x18\x01 \x01(\t\x12\x16\n\x0epython_version\x18\x02 \x01(\t\x12\x11\n\tserver_os\x18\x03 \x01(\t\x12\x13\n\x0bhas_display\x18\x04 \x01(\x08\x42/\n\x1c\x63om.snowflake.apps.streamlitB\x0fNewSessionProtob\x06proto3')
|
20
20
|
|
21
21
|
_globals = globals()
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -45,7 +45,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
45
45
|
_globals['_FONTSIZES']._serialized_start=1958
|
46
46
|
_globals['_FONTSIZES']._serialized_end=2042
|
47
47
|
_globals['_USERINFO']._serialized_start=2044
|
48
|
-
_globals['_USERINFO']._serialized_end=
|
49
|
-
_globals['_ENVIRONMENTINFO']._serialized_start=
|
50
|
-
_globals['_ENVIRONMENTINFO']._serialized_end=
|
48
|
+
_globals['_USERINFO']._serialized_end=2141
|
49
|
+
_globals['_ENVIRONMENTINFO']._serialized_start=2143
|
50
|
+
_globals['_ENVIRONMENTINFO']._serialized_end=2251
|
51
51
|
# @@protoc_insertion_point(module_scope)
|
@@ -454,18 +454,18 @@ class UserInfo(google.protobuf.message.Message):
|
|
454
454
|
|
455
455
|
INSTALLATION_ID_FIELD_NUMBER: builtins.int
|
456
456
|
INSTALLATION_ID_V3_FIELD_NUMBER: builtins.int
|
457
|
-
|
457
|
+
INSTALLATION_ID_V4_FIELD_NUMBER: builtins.int
|
458
458
|
installation_id: builtins.str
|
459
459
|
installation_id_v3: builtins.str
|
460
|
-
|
460
|
+
installation_id_v4: builtins.str
|
461
461
|
def __init__(
|
462
462
|
self,
|
463
463
|
*,
|
464
464
|
installation_id: builtins.str = ...,
|
465
465
|
installation_id_v3: builtins.str = ...,
|
466
|
-
|
466
|
+
installation_id_v4: builtins.str = ...,
|
467
467
|
) -> None: ...
|
468
|
-
def ClearField(self, field_name: typing.Literal["installation_id", b"installation_id", "installation_id_v3", b"installation_id_v3", "
|
468
|
+
def ClearField(self, field_name: typing.Literal["installation_id", b"installation_id", "installation_id_v3", b"installation_id_v3", "installation_id_v4", b"installation_id_v4"]) -> None: ...
|
469
469
|
|
470
470
|
global___UserInfo = UserInfo
|
471
471
|
|
@@ -485,14 +485,29 @@ class EnvironmentInfo(google.protobuf.message.Message):
|
|
485
485
|
|
486
486
|
STREAMLIT_VERSION_FIELD_NUMBER: builtins.int
|
487
487
|
PYTHON_VERSION_FIELD_NUMBER: builtins.int
|
488
|
+
SERVER_OS_FIELD_NUMBER: builtins.int
|
489
|
+
HAS_DISPLAY_FIELD_NUMBER: builtins.int
|
488
490
|
streamlit_version: builtins.str
|
489
491
|
python_version: builtins.str
|
492
|
+
server_os: builtins.str
|
493
|
+
"""The name of the OS. Typically "windows", "mac", "linux",
|
494
|
+
but can take other values like "ios", "android", "freebsd8".
|
495
|
+
See https://docs.python.org/3/library/sys.html#sys.platform
|
496
|
+
"""
|
497
|
+
has_display: builtins.bool
|
498
|
+
"""True if Linux/BSD and DISPLAY or WAYLAND_DISPLAY environment variables are
|
499
|
+
set. This is used so we can tell when Streamlit is being executed in order
|
500
|
+
to develop the app (has_display = true) or to serve the app (has_display =
|
501
|
+
false).
|
502
|
+
"""
|
490
503
|
def __init__(
|
491
504
|
self,
|
492
505
|
*,
|
493
506
|
streamlit_version: builtins.str = ...,
|
494
507
|
python_version: builtins.str = ...,
|
508
|
+
server_os: builtins.str = ...,
|
509
|
+
has_display: builtins.bool = ...,
|
495
510
|
) -> None: ...
|
496
|
-
def ClearField(self, field_name: typing.Literal["python_version", b"python_version", "streamlit_version", b"streamlit_version"]) -> None: ...
|
511
|
+
def ClearField(self, field_name: typing.Literal["has_display", b"has_display", "python_version", b"python_version", "server_os", b"server_os", "streamlit_version", b"streamlit_version"]) -> None: ...
|
497
512
|
|
498
513
|
global___EnvironmentInfo = EnvironmentInfo
|
streamlit/runtime/app_session.py
CHANGED
@@ -16,6 +16,7 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
import asyncio
|
18
18
|
import json
|
19
|
+
import os
|
19
20
|
import sys
|
20
21
|
import uuid
|
21
22
|
from enum import Enum
|
@@ -24,7 +25,7 @@ from typing import TYPE_CHECKING, Callable, Final
|
|
24
25
|
from google.protobuf.json_format import ParseDict
|
25
26
|
|
26
27
|
import streamlit.elements.exception as exception_utils
|
27
|
-
from streamlit import config, runtime
|
28
|
+
from streamlit import config, env_util, runtime
|
28
29
|
from streamlit.logger import get_logger
|
29
30
|
from streamlit.proto.ClientState_pb2 import ClientState
|
30
31
|
from streamlit.proto.Common_pb2 import FileURLs, FileURLsRequest
|
@@ -742,6 +743,10 @@ class AppSession:
|
|
742
743
|
|
743
744
|
imsg.environment_info.streamlit_version = STREAMLIT_VERSION_STRING
|
744
745
|
imsg.environment_info.python_version = ".".join(map(str, sys.version_info))
|
746
|
+
imsg.environment_info.server_os = env_util.SYSTEM
|
747
|
+
imsg.environment_info.has_display = (
|
748
|
+
"DISPLAY" in os.environ or "WAYLAND_DISPLAY" in os.environ
|
749
|
+
)
|
745
750
|
|
746
751
|
imsg.session_status.run_on_save = self._run_on_save
|
747
752
|
imsg.session_status.script_is_running = (
|
@@ -985,4 +990,4 @@ def _populate_user_info_msg(msg: UserInfo) -> None:
|
|
985
990
|
inst = Installation.instance()
|
986
991
|
msg.installation_id = inst.installation_id
|
987
992
|
msg.installation_id_v3 = inst.installation_id_v3
|
988
|
-
msg.
|
993
|
+
msg.installation_id_v4 = inst.installation_id_v4
|
streamlit/runtime/context.py
CHANGED
@@ -20,6 +20,7 @@ from types import MappingProxyType
|
|
20
20
|
from typing import TYPE_CHECKING, Any, cast
|
21
21
|
|
22
22
|
from streamlit import runtime
|
23
|
+
from streamlit.runtime.context_util import maybe_add_page_path, maybe_trim_page_path
|
23
24
|
from streamlit.runtime.metrics_util import gather_metrics
|
24
25
|
from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_run_ctx
|
25
26
|
|
@@ -306,7 +307,16 @@ class ContextProxy:
|
|
306
307
|
ctx = get_script_run_ctx()
|
307
308
|
if ctx is None or ctx.context_info is None:
|
308
309
|
return None
|
309
|
-
|
310
|
+
|
311
|
+
url_from_frontend = ctx.context_info.url
|
312
|
+
url_without_page_prefix = maybe_trim_page_path(
|
313
|
+
url_from_frontend, ctx.pages_manager
|
314
|
+
)
|
315
|
+
url_with_page_prefix = maybe_add_page_path(
|
316
|
+
url_without_page_prefix, ctx.pages_manager
|
317
|
+
)
|
318
|
+
|
319
|
+
return url_with_page_prefix
|
310
320
|
|
311
321
|
@property
|
312
322
|
@gather_metrics("context.ip_address")
|