streamlit 1.48.0__py3-none-any.whl → 1.49.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/__init__.py +3 -10
- streamlit/commands/logo.py +4 -3
- streamlit/commands/navigation.py +1 -1
- streamlit/commands/page_config.py +4 -1
- streamlit/components/v1/custom_component.py +2 -2
- streamlit/config.py +82 -1
- streamlit/connections/snowflake_connection.py +3 -1
- streamlit/delta_generator.py +3 -0
- streamlit/elements/arrow.py +155 -70
- streamlit/elements/bokeh_chart.py +13 -3
- streamlit/elements/deck_gl_json_chart.py +0 -1
- streamlit/elements/dialog_decorator.py +7 -59
- streamlit/elements/form.py +10 -1
- streamlit/elements/graphviz_chart.py +57 -6
- streamlit/elements/heading.py +17 -16
- streamlit/elements/iframe.py +13 -22
- streamlit/elements/image.py +64 -37
- streamlit/elements/layouts.py +2 -2
- streamlit/elements/lib/built_in_chart_utils.py +2 -5
- streamlit/elements/lib/column_config_utils.py +18 -4
- streamlit/elements/lib/column_types.py +75 -30
- streamlit/elements/lib/dialog.py +3 -3
- streamlit/elements/lib/image_utils.py +19 -11
- streamlit/elements/lib/layout_utils.py +15 -2
- streamlit/elements/lib/utils.py +20 -41
- streamlit/elements/markdown.py +7 -6
- streamlit/elements/media.py +6 -13
- streamlit/elements/metric.py +78 -1
- streamlit/elements/pdf.py +192 -0
- streamlit/elements/plotly_chart.py +3 -2
- streamlit/elements/pyplot.py +53 -11
- streamlit/elements/toast.py +81 -5
- streamlit/elements/vega_charts.py +3 -8
- streamlit/elements/widgets/audio_input.py +0 -1
- streamlit/elements/widgets/button.py +0 -4
- streamlit/elements/widgets/button_group.py +5 -4
- streamlit/elements/widgets/camera_input.py +0 -1
- streamlit/elements/widgets/chat.py +11 -13
- streamlit/elements/widgets/checkbox.py +0 -1
- streamlit/elements/widgets/color_picker.py +0 -1
- streamlit/elements/widgets/data_editor.py +142 -62
- streamlit/elements/widgets/file_uploader.py +74 -37
- streamlit/elements/widgets/multiselect.py +0 -1
- streamlit/elements/widgets/number_input.py +0 -1
- streamlit/elements/widgets/radio.py +0 -1
- streamlit/elements/widgets/select_slider.py +0 -1
- streamlit/elements/widgets/selectbox.py +0 -1
- streamlit/elements/widgets/slider.py +0 -1
- streamlit/elements/widgets/text_widgets.py +0 -2
- streamlit/elements/widgets/time_widgets.py +0 -2
- streamlit/errors.py +11 -0
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/Arrow_pb2.py +14 -8
- streamlit/proto/Arrow_pb2.pyi +11 -3
- streamlit/proto/Block_pb2.py +16 -16
- streamlit/proto/Block_pb2.pyi +2 -0
- streamlit/proto/ChatInput_pb2.py +3 -3
- streamlit/proto/ChatInput_pb2.pyi +2 -0
- streamlit/proto/FileUploader_pb2.py +2 -2
- streamlit/proto/FileUploader_pb2.pyi +5 -1
- streamlit/proto/GraphVizChart_pb2.py +4 -2
- streamlit/proto/GraphVizChart_pb2.pyi +1 -1
- streamlit/proto/IFrame_pb2.py +8 -2
- streamlit/proto/IFrame_pb2.pyi +3 -0
- streamlit/proto/Image_pb2.py +4 -2
- streamlit/proto/Image_pb2.pyi +1 -10
- streamlit/proto/Metric_pb2.py +8 -6
- streamlit/proto/Metric_pb2.pyi +34 -10
- streamlit/proto/Toast_pb2.py +2 -2
- streamlit/proto/Toast_pb2.pyi +10 -1
- streamlit/runtime/caching/__init__.py +14 -2
- streamlit/runtime/caching/cache_data_api.py +0 -17
- streamlit/runtime/caching/cache_resource_api.py +0 -16
- streamlit/runtime/caching/cached_message_replay.py +8 -20
- streamlit/runtime/caching/hashing.py +31 -1
- streamlit/runtime/credentials.py +4 -4
- streamlit/runtime/fragment.py +0 -42
- streamlit/runtime/websocket_session_manager.py +1 -1
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +224 -252
- streamlit/static/static/css/{index.CJVRHjQZ.css → index.C8X8rNzw.css} +1 -1
- streamlit/static/static/css/index.COe1010n.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.D_4oFNKB.js → ErrorOutline.esm.u9XvzxL8.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.NPgaLlUE.js → FileDownload.esm.CaRyZ-b2.js} +1 -1
- streamlit/static/static/js/FileHelper.Dk2SwIi3.js +5 -0
- streamlit/static/static/js/FormClearHelper.l_UPPvkg.js +1 -0
- streamlit/static/static/js/{Hooks.BGm9sd4U.js → Hooks.BxrVEftw.js} +1 -1
- streamlit/static/static/js/InputInstructions.C254RU9X.js +1 -0
- streamlit/static/static/js/Particles.DkY6FDnc.js +1 -0
- streamlit/static/static/js/ProgressBar.BPtSM82n.js +2 -0
- streamlit/static/static/js/Toolbar.BO_3WBaS.js +1 -0
- streamlit/static/static/js/{base-input.DeBqm5mN.js → base-input.egUI4LjJ.js} +4 -4
- streamlit/static/static/js/{checkbox.C0odQfKb.js → checkbox.ButpszcE.js} +2 -2
- streamlit/static/static/js/createSuper.DYJA5xa6.js +1 -0
- streamlit/static/static/js/data-grid-overlay-editor.C9gQLEnU.js +1 -0
- streamlit/static/static/js/{downloader.Bx1D0jhz.js → downloader.B3TjsSPZ.js} +1 -1
- streamlit/static/static/js/es6.BYSNuG4D.js +2 -0
- streamlit/static/static/js/iframeResizer.contentWindow.CNPHJsF2.js +1 -0
- streamlit/static/static/js/index.0tDq1WXk.js +1 -0
- streamlit/static/static/js/index.BBnWuh07.js +976 -0
- streamlit/static/static/js/index.BDZorv41.js +1 -0
- streamlit/static/static/js/{index.DwaoC4Zp.js → index.BH79B25f.js} +3 -3
- streamlit/static/static/js/index.BeTC4Yl-.js +197 -0
- streamlit/static/static/js/index.BnOd05Ko.js +2 -0
- streamlit/static/static/js/index.BoJaJReB.js +1 -0
- streamlit/static/static/js/index.Bp1Of6L8.js +1 -0
- streamlit/static/static/js/index.Bpe4-O2W.js +1 -0
- streamlit/static/static/js/index.BrD9sbpx.js +1 -0
- streamlit/static/static/js/index.C1qCS-sd.js +1 -0
- streamlit/static/static/js/index.C3EXAI-u.js +1 -0
- streamlit/static/static/js/index.C77g9sAQ.js +3 -0
- streamlit/static/static/js/{index.PyIqRRSR.js → index.CFePF7s4.js} +1 -1
- streamlit/static/static/js/index.CFjU0x00.js +1 -0
- streamlit/static/static/js/index.Ca3y4ztK.js +1 -0
- streamlit/static/static/js/{index.ClRTsv8m.js → index.Cb9gN2T2.js} +2 -2
- streamlit/static/static/js/{index.wDYef4mQ.js → index.CbwuUwu4.js} +9 -9
- streamlit/static/static/js/index.CeXLlclc.js +1 -0
- streamlit/static/static/js/index.CfiZGqj3.js +3 -0
- streamlit/static/static/js/index.CjQnYKID.js +1 -0
- streamlit/static/static/js/index.Cl_966eE.js +3858 -0
- streamlit/static/static/js/{index.DCpyIFTV.js → index.CqSRo6zQ.js} +1 -1
- streamlit/static/static/js/index.CuEFSQ-o.js +1 -0
- streamlit/static/static/js/index.D4jR1m1z.js +1 -0
- streamlit/static/static/js/index.DGcW849X.js +1 -0
- streamlit/static/static/js/index.DKb-BAE2.js +1 -0
- streamlit/static/static/js/index.DP1rDFP0.js +1 -0
- streamlit/static/static/js/{index.HeVbRh9H.js → index.DStzYLqM.js} +2 -2
- streamlit/static/static/js/index.DVKQKDLu.js +1 -0
- streamlit/static/static/js/index.DWedOrkQ.js +1 -0
- streamlit/static/static/js/index.DYbRPmVF.js +1 -0
- streamlit/static/static/js/index.DgpIMUsr.js +1 -0
- streamlit/static/static/js/index.DtwkPJs5.js +5367 -0
- streamlit/static/static/js/{index.CnfWsQzS.js → index.MQLQLR5Z.js} +1 -1
- streamlit/static/static/js/index.uInpwWAP.js +1 -0
- streamlit/static/static/js/index.z992t-BQ.js +7 -0
- streamlit/static/static/js/{input.BL2buuce.js → input.CbP5ZuQ7.js} +2 -2
- streamlit/static/static/js/{memory.CUxjUWS7.js → memory.BuacVo2L.js} +1 -1
- streamlit/static/static/js/number-overlay-editor.BZb9zRl_.js +9 -0
- streamlit/static/static/js/{possibleConstructorReturn.DbvQboK3.js → possibleConstructorReturn.DSM84rOS.js} +1 -1
- streamlit/static/static/js/{sandbox.6lnFVWhX.js → sandbox.C480llMG.js} +1 -1
- streamlit/static/static/js/{timepicker.Bg4xAK95.js → timepicker.BunxCVp7.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.D9x7Ktv4.js → toConsumableArray.B4o8rEx1.js} +3 -3
- streamlit/static/static/js/uniqueId.tii0yosY.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.CUSYQZpm.js → useBasicWidgetState.Bnm4FD6K.js} +1 -1
- streamlit/static/static/js/useTextInputAutoExpand.Dgtwc1m0.js +2 -0
- streamlit/static/static/js/useUpdateUiValue.DjXdMFGw.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.0cy2pVf5.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.CBxVaFdk.woff2 +0 -0
- streamlit/user_info.py +16 -13
- streamlit/web/server/browser_websocket_handler.py +15 -0
- streamlit/web/server/oauth_authlib_routes.py +3 -59
- {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/METADATA +4 -2
- {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/RECORD +157 -160
- streamlit/static/static/css/index.CQt5TjGB.css +0 -1
- streamlit/static/static/js/FileHelper.B2t9ikoS.js +0 -5
- streamlit/static/static/js/FormClearHelper.BLEIUk6L.js +0 -1
- streamlit/static/static/js/InputInstructions.DtUxCBS8.js +0 -1
- streamlit/static/static/js/Particles.BDRPO7r3.js +0 -1
- streamlit/static/static/js/ProgressBar.B64DUUqp.js +0 -2
- streamlit/static/static/js/Toolbar.B3FquPk5.js +0 -1
- streamlit/static/static/js/createSuper.DqQ5L3XG.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.DbNsQa8Y.js +0 -1
- streamlit/static/static/js/es6.CbPK4m0H.js +0 -2
- streamlit/static/static/js/iframeResizer.contentWindow.CfLKrptA.js +0 -1
- streamlit/static/static/js/index.0XDwe9RV.js +0 -203
- streamlit/static/static/js/index.4lI9TuZm.js +0 -3
- streamlit/static/static/js/index.6s0nVIis.js +0 -3855
- streamlit/static/static/js/index.9E7bRUBU.js +0 -1
- streamlit/static/static/js/index.B9PgeLrZ.js +0 -1
- streamlit/static/static/js/index.B9vzGbOt.js +0 -1
- streamlit/static/static/js/index.BDrQKMCm.js +0 -1
- streamlit/static/static/js/index.BPsoiGgP.js +0 -1
- streamlit/static/static/js/index.CJzdLAun.js +0 -1
- streamlit/static/static/js/index.CNNlC1NL.js +0 -1
- streamlit/static/static/js/index.CO1sClzJ.js +0 -2
- streamlit/static/static/js/index.CZnagxXD.js +0 -1
- streamlit/static/static/js/index.Cb0xSF7V.js +0 -5366
- streamlit/static/static/js/index.CgUt3tz_.js +0 -1
- streamlit/static/static/js/index.CjImmcsV.js +0 -1
- streamlit/static/static/js/index.CrJ1XD_V.js +0 -1
- streamlit/static/static/js/index.CtiKsjSC.js +0 -1
- streamlit/static/static/js/index.CwAuytgV.js +0 -1
- streamlit/static/static/js/index.D7GB-kly.js +0 -1
- streamlit/static/static/js/index.DA5wU0mQ.js +0 -1
- streamlit/static/static/js/index.DE9wNOje.js +0 -1
- streamlit/static/static/js/index.DHnB-C8A.js +0 -1
- streamlit/static/static/js/index.DRTn9zvD.js +0 -1
- streamlit/static/static/js/index.DjMjyJl9.js +0 -7
- streamlit/static/static/js/index.DvRPFfw6.js +0 -781
- streamlit/static/static/js/index.F9tSej94.js +0 -1
- streamlit/static/static/js/index.J2D_m7LY.js +0 -197
- streamlit/static/static/js/index.dfivzJNz.js +0 -1
- streamlit/static/static/js/index.mRztGO69.js +0 -3
- streamlit/static/static/js/index.tB1kn_7z.js +0 -1
- streamlit/static/static/js/mergeWith.C1kp1zIi.js +0 -1
- streamlit/static/static/js/number-overlay-editor.WpheGpmR.js +0 -9
- streamlit/static/static/js/threshold.DjX0wlsa.js +0 -1
- streamlit/static/static/js/timer.CAwTRJ_g.js +0 -1
- streamlit/static/static/js/uniqueId.Bm8FHN92.js +0 -1
- streamlit/static/static/js/useTextInputAutoExpand.Bf2egQOG.js +0 -2
- streamlit/static/static/js/useUpdateUiValue.lE5xnYWF.js +0 -1
- streamlit/static/static/js/value.CgPGBV_l.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.CCOXR7N6.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DsbC8sYI.woff2 +0 -0
- {streamlit-1.48.0.data → streamlit-1.49.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/WHEEL +0 -0
- {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.48.0.dist-info → streamlit-1.49.0.dist-info}/top_level.txt +0 -0
|
@@ -19,6 +19,9 @@ from __future__ import annotations
|
|
|
19
19
|
import json
|
|
20
20
|
from typing import TYPE_CHECKING, Final, cast
|
|
21
21
|
|
|
22
|
+
from streamlit.deprecation_util import (
|
|
23
|
+
show_deprecation_warning,
|
|
24
|
+
)
|
|
22
25
|
from streamlit.errors import StreamlitAPIException
|
|
23
26
|
from streamlit.proto.BokehChart_pb2 import BokehChart as BokehChartProto
|
|
24
27
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -50,10 +53,11 @@ class BokehMixin:
|
|
|
50
53
|
|
|
51
54
|
.. Important::
|
|
52
55
|
You must install ``bokeh==2.4.3`` and ``numpy<2`` to use this
|
|
53
|
-
command
|
|
56
|
+
command, which is deprecated and will be removed in a future
|
|
57
|
+
version.
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
For more current updates, use the |streamlit-bokeh|_ custom
|
|
60
|
+
component instead.
|
|
57
61
|
|
|
58
62
|
.. |streamlit-bokeh| replace:: ``streamlit-bokeh``
|
|
59
63
|
.. _streamlit-bokeh: https://github.com/streamlit/streamlit-bokeh
|
|
@@ -101,6 +105,12 @@ class BokehMixin:
|
|
|
101
105
|
f"[streamlit-bokeh](https://github.com/streamlit/streamlit-bokeh)."
|
|
102
106
|
)
|
|
103
107
|
|
|
108
|
+
show_deprecation_warning(
|
|
109
|
+
"st.bokeh_chart is deprecated and will be removed in a future version. "
|
|
110
|
+
"Please use our custom component, "
|
|
111
|
+
"[streamlit-bokeh](https://github.com/streamlit/streamlit-bokeh), "
|
|
112
|
+
"instead."
|
|
113
|
+
)
|
|
104
114
|
# Generate element ID from delta path
|
|
105
115
|
delta_path = self.dg._get_delta_path_str()
|
|
106
116
|
|
|
@@ -21,10 +21,6 @@ from streamlit.delta_generator_singletons import (
|
|
|
21
21
|
get_dg_singleton_instance,
|
|
22
22
|
get_last_dg_added_to_context_stack,
|
|
23
23
|
)
|
|
24
|
-
from streamlit.deprecation_util import (
|
|
25
|
-
make_deprecated_name_warning,
|
|
26
|
-
show_deprecation_warning,
|
|
27
|
-
)
|
|
28
24
|
from streamlit.errors import StreamlitAPIException
|
|
29
25
|
from streamlit.runtime.fragment import _fragment
|
|
30
26
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -67,7 +63,6 @@ def _dialog_decorator(
|
|
|
67
63
|
title: str,
|
|
68
64
|
*,
|
|
69
65
|
width: DialogWidth = "small",
|
|
70
|
-
should_show_deprecation_warning: bool = False,
|
|
71
66
|
dismissible: bool = True,
|
|
72
67
|
on_dismiss: Literal["ignore", "rerun"] | WidgetCallback = "ignore",
|
|
73
68
|
) -> F:
|
|
@@ -89,15 +84,6 @@ def _dialog_decorator(
|
|
|
89
84
|
dialog.open()
|
|
90
85
|
|
|
91
86
|
def dialog_content() -> None:
|
|
92
|
-
if should_show_deprecation_warning:
|
|
93
|
-
show_deprecation_warning(
|
|
94
|
-
make_deprecated_name_warning(
|
|
95
|
-
"experimental_dialog",
|
|
96
|
-
"dialog",
|
|
97
|
-
"2025-01-01",
|
|
98
|
-
)
|
|
99
|
-
)
|
|
100
|
-
|
|
101
87
|
# if the dialog should be closed, st.rerun() has to be called
|
|
102
88
|
# (same behavior as with st.fragment)
|
|
103
89
|
_ = non_optional_func(*args, **kwargs)
|
|
@@ -212,10 +198,13 @@ def dialog_decorator(
|
|
|
212
198
|
.. |st.markdown| replace:: ``st.markdown``
|
|
213
199
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
|
214
200
|
|
|
215
|
-
width : "small", "large"
|
|
216
|
-
The width of the modal dialog.
|
|
217
|
-
|
|
218
|
-
modal dialog will be
|
|
201
|
+
width : "small", "medium", "large"
|
|
202
|
+
The width of the modal dialog. This can be one of the following:
|
|
203
|
+
|
|
204
|
+
- ``"small"`` (default): The modal dialog will be a maximum of 500
|
|
205
|
+
pixels wide.
|
|
206
|
+
- ``"medium"``: The modal dialog will be up to 750 pixels wide.
|
|
207
|
+
- ``"large"``: The modal dialog will be up to 1280 pixels wide.
|
|
219
208
|
|
|
220
209
|
dismissible : bool
|
|
221
210
|
Whether the modal dialog can be dismissed by the user. If this is
|
|
@@ -295,44 +284,3 @@ def dialog_decorator(
|
|
|
295
284
|
return _dialog_decorator(
|
|
296
285
|
func, "", width=width, dismissible=dismissible, on_dismiss=on_dismiss
|
|
297
286
|
)
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
@overload
|
|
301
|
-
def experimental_dialog_decorator(
|
|
302
|
-
title: str, *, width: DialogWidth = "small"
|
|
303
|
-
) -> Callable[[F], F]: ...
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
# 'title' can be a function since `dialog_decorator` is a decorator. We just call it
|
|
307
|
-
# 'title' here though to make the user-doc more friendly as we want the user to pass a
|
|
308
|
-
# title, not a function. The user is supposed to call it like @st.dialog("my_title"),
|
|
309
|
-
# which makes 'title' a positional arg, hence this 'trick'. The overload is required to
|
|
310
|
-
# have a good type hint for the decorated function args.
|
|
311
|
-
@overload
|
|
312
|
-
def experimental_dialog_decorator(title: F, *, width: DialogWidth = "small") -> F: ...
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
@gather_metrics("experimental_dialog")
|
|
316
|
-
def experimental_dialog_decorator(
|
|
317
|
-
title: F | str, *, width: DialogWidth = "small"
|
|
318
|
-
) -> F | Callable[[F], F]:
|
|
319
|
-
"""Deprecated alias for @st.dialog.
|
|
320
|
-
See the docstring for the decorator's new name.
|
|
321
|
-
"""
|
|
322
|
-
func_or_title = title
|
|
323
|
-
if isinstance(func_or_title, str):
|
|
324
|
-
# Support passing the params via function decorator
|
|
325
|
-
def wrapper(f: F) -> F:
|
|
326
|
-
return _dialog_decorator(
|
|
327
|
-
non_optional_func=f,
|
|
328
|
-
title=func_or_title,
|
|
329
|
-
width=width,
|
|
330
|
-
should_show_deprecation_warning=True,
|
|
331
|
-
)
|
|
332
|
-
|
|
333
|
-
return wrapper
|
|
334
|
-
|
|
335
|
-
func: F = func_or_title
|
|
336
|
-
return _dialog_decorator(
|
|
337
|
-
func, "", width=width, should_show_deprecation_warning=True
|
|
338
|
-
)
|
streamlit/elements/form.py
CHANGED
|
@@ -29,6 +29,7 @@ from streamlit.elements.lib.policies import (
|
|
|
29
29
|
check_cache_replay_rules,
|
|
30
30
|
check_session_state_rules,
|
|
31
31
|
)
|
|
32
|
+
from streamlit.elements.lib.utils import Key, to_key
|
|
32
33
|
from streamlit.errors import StreamlitAPIException
|
|
33
34
|
from streamlit.proto import Block_pb2
|
|
34
35
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -243,6 +244,7 @@ class FormMixin:
|
|
|
243
244
|
args: WidgetArgs | None = None,
|
|
244
245
|
kwargs: WidgetKwargs | None = None,
|
|
245
246
|
*, # keyword-only arguments:
|
|
247
|
+
key: Key | None = None,
|
|
246
248
|
type: Literal["primary", "secondary", "tertiary"] = "secondary",
|
|
247
249
|
icon: str | None = None,
|
|
248
250
|
disabled: bool = False,
|
|
@@ -297,6 +299,11 @@ class FormMixin:
|
|
|
297
299
|
kwargs : dict
|
|
298
300
|
An optional dict of kwargs to pass to the callback.
|
|
299
301
|
|
|
302
|
+
key : str or int
|
|
303
|
+
An optional string or integer to use as the unique key for the widget.
|
|
304
|
+
If this is omitted, a key will be generated for the widget
|
|
305
|
+
based on its content. No two widgets may have the same key.
|
|
306
|
+
|
|
300
307
|
type : "primary", "secondary", or "tertiary"
|
|
301
308
|
An optional string that specifies the button type. This can be one
|
|
302
309
|
of the following:
|
|
@@ -390,6 +397,7 @@ class FormMixin:
|
|
|
390
397
|
disabled=disabled,
|
|
391
398
|
ctx=ctx,
|
|
392
399
|
width=width,
|
|
400
|
+
key=key,
|
|
393
401
|
)
|
|
394
402
|
|
|
395
403
|
def _form_submit_button(
|
|
@@ -400,6 +408,7 @@ class FormMixin:
|
|
|
400
408
|
args: WidgetArgs | None = None,
|
|
401
409
|
kwargs: WidgetKwargs | None = None,
|
|
402
410
|
*, # keyword-only arguments:
|
|
411
|
+
key: Key | None = None,
|
|
403
412
|
type: Literal["primary", "secondary", "tertiary"] = "secondary",
|
|
404
413
|
icon: str | None = None,
|
|
405
414
|
disabled: bool = False,
|
|
@@ -407,7 +416,7 @@ class FormMixin:
|
|
|
407
416
|
width: Width = "content",
|
|
408
417
|
) -> bool:
|
|
409
418
|
form_id = current_form_id(self.dg)
|
|
410
|
-
submit_button_key = f"FormSubmitter:{form_id}-{label}"
|
|
419
|
+
submit_button_key = to_key(key) or f"FormSubmitter:{form_id}-{label}"
|
|
411
420
|
return self.dg._button(
|
|
412
421
|
label=label,
|
|
413
422
|
key=submit_button_key,
|
|
@@ -21,6 +21,15 @@ from typing import TYPE_CHECKING, Union, cast
|
|
|
21
21
|
from typing_extensions import TypeAlias
|
|
22
22
|
|
|
23
23
|
from streamlit import type_util
|
|
24
|
+
from streamlit.deprecation_util import (
|
|
25
|
+
make_deprecated_name_warning,
|
|
26
|
+
show_deprecation_warning,
|
|
27
|
+
)
|
|
28
|
+
from streamlit.elements.lib.layout_utils import (
|
|
29
|
+
LayoutConfig,
|
|
30
|
+
Width,
|
|
31
|
+
validate_width,
|
|
32
|
+
)
|
|
24
33
|
from streamlit.errors import StreamlitAPIException
|
|
25
34
|
from streamlit.proto.GraphVizChart_pb2 import GraphVizChart as GraphVizChartProto
|
|
26
35
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -41,7 +50,9 @@ class GraphvizMixin:
|
|
|
41
50
|
def graphviz_chart(
|
|
42
51
|
self,
|
|
43
52
|
figure_or_dot: FigureOrDot,
|
|
44
|
-
use_container_width: bool =
|
|
53
|
+
use_container_width: bool | None = None,
|
|
54
|
+
*, # keyword-only arguments:
|
|
55
|
+
width: Width = "content",
|
|
45
56
|
) -> DeltaGenerator:
|
|
46
57
|
"""Display a graph using the dagre-d3 library.
|
|
47
58
|
|
|
@@ -50,7 +61,9 @@ class GraphvizMixin:
|
|
|
50
61
|
install all charting dependencies (except Bokeh) as an extra with
|
|
51
62
|
Streamlit:
|
|
52
63
|
|
|
53
|
-
|
|
64
|
+
.. code-block:: shell
|
|
65
|
+
|
|
66
|
+
pip install streamlit[charts]
|
|
54
67
|
|
|
55
68
|
Parameters
|
|
56
69
|
----------
|
|
@@ -65,6 +78,25 @@ class GraphvizMixin:
|
|
|
65
78
|
container. If ``use_container_width`` is ``True``, Streamlit sets
|
|
66
79
|
the width of the figure to match the width of the parent container.
|
|
67
80
|
|
|
81
|
+
width : "content", "stretch", or int
|
|
82
|
+
The width of the chart element. This can be one of the following:
|
|
83
|
+
|
|
84
|
+
- ``"content"`` (default): The width of the element matches the
|
|
85
|
+
width of its content, but doesn't exceed the width of the parent
|
|
86
|
+
container.
|
|
87
|
+
- ``"stretch"``: The width of the element matches the width of the
|
|
88
|
+
parent container.
|
|
89
|
+
- An integer specifying the width in pixels: The element has a
|
|
90
|
+
fixed width. If the specified width is greater than the width of
|
|
91
|
+
the parent container, the width of the element matches the width
|
|
92
|
+
of the parent container.
|
|
93
|
+
|
|
94
|
+
.. deprecated::
|
|
95
|
+
``use_container_width`` is deprecated and will be removed in a
|
|
96
|
+
future release. For ``use_container_width=True``, use
|
|
97
|
+
``width="stretch"``. For ``use_container_width=False``, use
|
|
98
|
+
``width="content"``.
|
|
99
|
+
|
|
68
100
|
Example
|
|
69
101
|
-------
|
|
70
102
|
>>> import streamlit as st
|
|
@@ -114,14 +146,35 @@ class GraphvizMixin:
|
|
|
114
146
|
height: 600px
|
|
115
147
|
|
|
116
148
|
"""
|
|
149
|
+
if use_container_width is not None:
|
|
150
|
+
show_deprecation_warning(
|
|
151
|
+
make_deprecated_name_warning(
|
|
152
|
+
"use_container_width",
|
|
153
|
+
"width",
|
|
154
|
+
"2025-12-31",
|
|
155
|
+
"For `use_container_width=True`, use `width='stretch'`. "
|
|
156
|
+
"For `use_container_width=False`, use `width='content'`.",
|
|
157
|
+
include_st_prefix=False,
|
|
158
|
+
),
|
|
159
|
+
show_in_browser=False,
|
|
160
|
+
)
|
|
161
|
+
width = "stretch" if use_container_width else "content"
|
|
162
|
+
|
|
117
163
|
# Generate element ID from delta path
|
|
118
164
|
delta_path = self.dg._get_delta_path_str()
|
|
119
165
|
element_id = calc_md5(delta_path.encode())
|
|
120
166
|
|
|
121
167
|
graphviz_chart_proto = GraphVizChartProto()
|
|
122
168
|
|
|
123
|
-
marshall(graphviz_chart_proto, figure_or_dot,
|
|
124
|
-
|
|
169
|
+
marshall(graphviz_chart_proto, figure_or_dot, element_id)
|
|
170
|
+
|
|
171
|
+
# Validate and set layout configuration
|
|
172
|
+
validate_width(width, allow_content=True)
|
|
173
|
+
layout_config = LayoutConfig(width=width)
|
|
174
|
+
|
|
175
|
+
return self.dg._enqueue(
|
|
176
|
+
"graphviz_chart", graphviz_chart_proto, layout_config=layout_config
|
|
177
|
+
)
|
|
125
178
|
|
|
126
179
|
@property
|
|
127
180
|
def dg(self) -> DeltaGenerator:
|
|
@@ -132,7 +185,6 @@ class GraphvizMixin:
|
|
|
132
185
|
def marshall(
|
|
133
186
|
proto: GraphVizChartProto,
|
|
134
187
|
figure_or_dot: FigureOrDot,
|
|
135
|
-
use_container_width: bool,
|
|
136
188
|
element_id: str,
|
|
137
189
|
) -> None:
|
|
138
190
|
"""Construct a GraphViz chart object.
|
|
@@ -153,5 +205,4 @@ def marshall(
|
|
|
153
205
|
|
|
154
206
|
proto.spec = dot
|
|
155
207
|
proto.engine = engine
|
|
156
|
-
proto.use_container_width = use_container_width
|
|
157
208
|
proto.element_id = element_id
|
streamlit/elements/heading.py
CHANGED
|
@@ -79,13 +79,13 @@ class HeadingMixin:
|
|
|
79
79
|
including the Markdown directives described in the ``body``
|
|
80
80
|
parameter of ``st.markdown``.
|
|
81
81
|
|
|
82
|
-
divider : bool,
|
|
83
|
-
Shows a colored divider below the header. If True
|
|
84
|
-
headers will cycle through divider colors
|
|
85
|
-
|
|
86
|
-
green line, and so on. If
|
|
87
|
-
the following: blue, green,
|
|
88
|
-
rainbow.
|
|
82
|
+
divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow"
|
|
83
|
+
Shows a colored divider below the header. If this is ``True``,
|
|
84
|
+
successive headers will cycle through divider colors, except gray
|
|
85
|
+
and rainbow. That is, the first header will have a blue line, the
|
|
86
|
+
second header will have a green line, and so on. If this is a
|
|
87
|
+
string, the color can be set to one of the following: blue, green,
|
|
88
|
+
orange, red, violet, yellow, gray/grey, or rainbow.
|
|
89
89
|
|
|
90
90
|
width : "stretch", "content", or int
|
|
91
91
|
The width of the header element. This can be one of the following:
|
|
@@ -168,13 +168,13 @@ class HeadingMixin:
|
|
|
168
168
|
including the Markdown directives described in the ``body``
|
|
169
169
|
parameter of ``st.markdown``.
|
|
170
170
|
|
|
171
|
-
divider : bool
|
|
172
|
-
Shows a colored divider below the header. If True
|
|
173
|
-
headers will cycle through divider colors
|
|
174
|
-
|
|
175
|
-
green line, and so on. If
|
|
176
|
-
the following: blue, green,
|
|
177
|
-
rainbow.
|
|
171
|
+
divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow"
|
|
172
|
+
Shows a colored divider below the header. If this is ``True``,
|
|
173
|
+
successive headers will cycle through divider colors, except gray
|
|
174
|
+
and rainbow. That is, the first header will have a blue line, the
|
|
175
|
+
second header will have a green line, and so on. If this is a
|
|
176
|
+
string, the color can be set to one of the following: blue, green,
|
|
177
|
+
orange, red, violet, yellow, gray/grey, or rainbow.
|
|
178
178
|
|
|
179
179
|
width : "stretch", "content", or int
|
|
180
180
|
The width of the subheader element. This can be one of the following:
|
|
@@ -304,10 +304,11 @@ class HeadingMixin:
|
|
|
304
304
|
if divider is True:
|
|
305
305
|
return "auto"
|
|
306
306
|
valid_colors = [
|
|
307
|
+
"red",
|
|
308
|
+
"orange",
|
|
309
|
+
"yellow",
|
|
307
310
|
"blue",
|
|
308
311
|
"green",
|
|
309
|
-
"orange",
|
|
310
|
-
"red",
|
|
311
312
|
"violet",
|
|
312
313
|
"gray",
|
|
313
314
|
"grey",
|
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.elements.lib.layout_utils import LayoutConfig
|
|
19
20
|
from streamlit.errors import StreamlitAPIException
|
|
20
21
|
from streamlit.proto.IFrame_pb2 import IFrame as IFrameProto
|
|
21
22
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -95,12 +96,15 @@ class IframeMixin:
|
|
|
95
96
|
marshall(
|
|
96
97
|
iframe_proto,
|
|
97
98
|
src=src,
|
|
98
|
-
width=width,
|
|
99
|
-
height=height,
|
|
100
99
|
scrolling=scrolling,
|
|
101
100
|
tab_index=tab_index,
|
|
102
101
|
)
|
|
103
|
-
|
|
102
|
+
# When no width is specified, we want the iframe to stretch to fill the container.
|
|
103
|
+
layout_config = LayoutConfig(
|
|
104
|
+
width=width if width is not None else "stretch",
|
|
105
|
+
height=height if height is not None else 150,
|
|
106
|
+
)
|
|
107
|
+
return self.dg._enqueue("iframe", iframe_proto, layout_config=layout_config)
|
|
104
108
|
|
|
105
109
|
@gather_metrics("_html")
|
|
106
110
|
def _html(
|
|
@@ -177,12 +181,15 @@ class IframeMixin:
|
|
|
177
181
|
marshall(
|
|
178
182
|
iframe_proto,
|
|
179
183
|
srcdoc=html,
|
|
180
|
-
width=width,
|
|
181
|
-
height=height,
|
|
182
184
|
scrolling=scrolling,
|
|
183
185
|
tab_index=tab_index,
|
|
184
186
|
)
|
|
185
|
-
|
|
187
|
+
# When no width is specified, we want the html to stretch to fill the container.
|
|
188
|
+
layout_config = LayoutConfig(
|
|
189
|
+
width=width if width is not None else "stretch",
|
|
190
|
+
height=height if height is not None else 150,
|
|
191
|
+
)
|
|
192
|
+
return self.dg._enqueue("iframe", iframe_proto, layout_config=layout_config)
|
|
186
193
|
|
|
187
194
|
@property
|
|
188
195
|
def dg(self) -> DeltaGenerator:
|
|
@@ -194,8 +201,6 @@ def marshall(
|
|
|
194
201
|
proto: IFrameProto,
|
|
195
202
|
src: str | None = None,
|
|
196
203
|
srcdoc: str | None = None,
|
|
197
|
-
width: int | None = None,
|
|
198
|
-
height: int | None = None,
|
|
199
204
|
scrolling: bool = False,
|
|
200
205
|
tab_index: int | None = None,
|
|
201
206
|
) -> None:
|
|
@@ -213,11 +218,6 @@ def marshall(
|
|
|
213
218
|
The URL of the page to embed.
|
|
214
219
|
srcdoc : str
|
|
215
220
|
Inline HTML to embed. Overrides src.
|
|
216
|
-
width : int
|
|
217
|
-
The width of the frame in CSS pixels. Defaults to the app's
|
|
218
|
-
default element width.
|
|
219
|
-
height : int
|
|
220
|
-
The height of the frame in CSS pixels. Defaults to 150.
|
|
221
221
|
scrolling : bool
|
|
222
222
|
If true, show a scrollbar when the content is larger than the iframe.
|
|
223
223
|
Otherwise, never show a scrollbar.
|
|
@@ -231,15 +231,6 @@ def marshall(
|
|
|
231
231
|
if srcdoc is not None:
|
|
232
232
|
proto.srcdoc = srcdoc
|
|
233
233
|
|
|
234
|
-
if width is not None:
|
|
235
|
-
proto.width = width
|
|
236
|
-
proto.has_width = True
|
|
237
|
-
|
|
238
|
-
if height is not None:
|
|
239
|
-
proto.height = height
|
|
240
|
-
else:
|
|
241
|
-
proto.height = 150
|
|
242
|
-
|
|
243
234
|
proto.scrolling = scrolling
|
|
244
235
|
|
|
245
236
|
if tab_index is not None:
|
streamlit/elements/image.py
CHANGED
|
@@ -25,14 +25,17 @@ from typing import TYPE_CHECKING, Literal, Union, cast
|
|
|
25
25
|
|
|
26
26
|
from typing_extensions import TypeAlias
|
|
27
27
|
|
|
28
|
-
from streamlit.deprecation_util import
|
|
28
|
+
from streamlit.deprecation_util import (
|
|
29
|
+
make_deprecated_name_warning,
|
|
30
|
+
show_deprecation_warning,
|
|
31
|
+
)
|
|
29
32
|
from streamlit.elements.lib.image_utils import (
|
|
30
33
|
Channels,
|
|
31
34
|
ImageFormatOrAuto,
|
|
32
35
|
ImageOrImageList,
|
|
33
|
-
WidthBehavior,
|
|
34
36
|
marshall_images,
|
|
35
37
|
)
|
|
38
|
+
from streamlit.elements.lib.layout_utils import LayoutConfig, Width, validate_width
|
|
36
39
|
from streamlit.errors import StreamlitAPIException
|
|
37
40
|
from streamlit.proto.Image_pb2 import ImageList as ImageListProto
|
|
38
41
|
from streamlit.runtime.metrics_util import gather_metrics
|
|
@@ -51,13 +54,13 @@ class ImageMixin:
|
|
|
51
54
|
# TODO: Narrow type of caption, dependent on type of image,
|
|
52
55
|
# by way of overload
|
|
53
56
|
caption: str | list[str] | None = None,
|
|
54
|
-
width:
|
|
57
|
+
width: Width = "content",
|
|
55
58
|
use_column_width: UseColumnWith = None,
|
|
56
59
|
clamp: bool = False,
|
|
57
60
|
channels: Channels = "RGB",
|
|
58
61
|
output_format: ImageFormatOrAuto = "auto",
|
|
59
62
|
*,
|
|
60
|
-
use_container_width: bool =
|
|
63
|
+
use_container_width: bool | None = None,
|
|
61
64
|
) -> DeltaGenerator:
|
|
62
65
|
"""Display an image or list of images.
|
|
63
66
|
|
|
@@ -91,11 +94,21 @@ class ImageMixin:
|
|
|
91
94
|
|
|
92
95
|
.. |st.markdown| replace:: ``st.markdown``
|
|
93
96
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
|
94
|
-
width :
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
width : "content", "stretch", or int
|
|
98
|
+
The width of the image element. This can be one of the following:
|
|
99
|
+
|
|
100
|
+
- ``"content"`` (default): The width of the element matches the
|
|
101
|
+
width of its content, but doesn't exceed the width of the parent
|
|
102
|
+
container.
|
|
103
|
+
- ``"stretch"``: The width of the element matches the width of the
|
|
104
|
+
parent container.
|
|
105
|
+
- An integer specifying the width in pixels: The element has a
|
|
106
|
+
fixed width. If the specified width is greater than the width of
|
|
107
|
+
the parent container, the width of the element matches the width
|
|
108
|
+
of the parent container.
|
|
109
|
+
|
|
110
|
+
When using an SVG image without a default width, use ``"stretch"``
|
|
111
|
+
or an integer.
|
|
99
112
|
use_column_width : "auto", "always", "never", or bool
|
|
100
113
|
If "auto", set the image's width to its natural size,
|
|
101
114
|
but do not exceed the width of the column.
|
|
@@ -129,9 +142,15 @@ class ImageMixin:
|
|
|
129
142
|
``use_container_width`` is ``True``, Streamlit sets the width of
|
|
130
143
|
the image to match the width of the parent container.
|
|
131
144
|
|
|
145
|
+
.. deprecated::
|
|
146
|
+
``use_container_width`` is deprecated and will be removed in a
|
|
147
|
+
future release. For ``use_container_width=True``, use
|
|
148
|
+
``width="stretch"``. For ``use_container_width=False``, use
|
|
149
|
+
``width="content"``.
|
|
150
|
+
|
|
132
151
|
.. deprecated::
|
|
133
152
|
``use_column_width`` is deprecated and will be removed in a future
|
|
134
|
-
release. Please use the ``
|
|
153
|
+
release. Please use the ``width`` parameter instead.
|
|
135
154
|
|
|
136
155
|
Example
|
|
137
156
|
-------
|
|
@@ -144,50 +163,58 @@ class ImageMixin:
|
|
|
144
163
|
|
|
145
164
|
"""
|
|
146
165
|
|
|
147
|
-
if use_container_width is True and use_column_width is not None:
|
|
148
|
-
raise StreamlitAPIException(
|
|
149
|
-
"`use_container_width` and `use_column_width` cannot be set at the same time.",
|
|
150
|
-
"Please utilize `use_container_width` since `use_column_width` is deprecated.",
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
image_width: int = (
|
|
154
|
-
WidthBehavior.ORIGINAL if (width is None or width <= 0) else width
|
|
155
|
-
)
|
|
156
|
-
|
|
157
166
|
if use_column_width is not None:
|
|
167
|
+
if use_container_width is not None:
|
|
168
|
+
raise StreamlitAPIException(
|
|
169
|
+
"`use_container_width` and `use_column_width` cannot be set at the same time.",
|
|
170
|
+
"Please utilize `use_container_width` since `use_column_width` is deprecated.",
|
|
171
|
+
)
|
|
172
|
+
|
|
158
173
|
show_deprecation_warning(
|
|
159
174
|
"The `use_column_width` parameter has been deprecated and will be removed "
|
|
160
175
|
"in a future release. Please utilize the `use_container_width` parameter instead."
|
|
161
176
|
)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
image_width = WidthBehavior.AUTO
|
|
177
|
+
if use_column_width in {"auto", "never"} or use_column_width is False:
|
|
178
|
+
width = "content"
|
|
165
179
|
elif use_column_width == "always" or use_column_width is True:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
180
|
+
width = "stretch"
|
|
181
|
+
|
|
182
|
+
if use_container_width is not None:
|
|
183
|
+
show_deprecation_warning(
|
|
184
|
+
make_deprecated_name_warning(
|
|
185
|
+
"use_container_width",
|
|
186
|
+
"width",
|
|
187
|
+
"2025-12-31",
|
|
188
|
+
"For `use_container_width=True`, use `width='stretch'`. "
|
|
189
|
+
"For `use_container_width=False`, use `width='content'`.",
|
|
190
|
+
include_st_prefix=False,
|
|
191
|
+
),
|
|
192
|
+
show_in_browser=False,
|
|
193
|
+
)
|
|
194
|
+
if use_container_width is True:
|
|
195
|
+
width = "stretch"
|
|
196
|
+
elif isinstance(width, int):
|
|
197
|
+
# Preserve the existing behavior with respect to use_container_width=False
|
|
198
|
+
# and width=int.
|
|
199
|
+
pass
|
|
200
|
+
else:
|
|
201
|
+
width = "content"
|
|
202
|
+
|
|
203
|
+
validate_width(width, allow_content=True)
|
|
204
|
+
layout_config = LayoutConfig(width=width)
|
|
178
205
|
|
|
179
206
|
image_list_proto = ImageListProto()
|
|
180
207
|
marshall_images(
|
|
181
208
|
self.dg._get_delta_path_str(),
|
|
182
209
|
image,
|
|
183
210
|
caption,
|
|
184
|
-
|
|
211
|
+
layout_config,
|
|
185
212
|
image_list_proto,
|
|
186
213
|
clamp,
|
|
187
214
|
channels,
|
|
188
215
|
output_format,
|
|
189
216
|
)
|
|
190
|
-
return self.dg._enqueue("imgs", image_list_proto)
|
|
217
|
+
return self.dg._enqueue("imgs", image_list_proto, layout_config=layout_config)
|
|
191
218
|
|
|
192
219
|
@property
|
|
193
220
|
def dg(self) -> DeltaGenerator:
|
streamlit/elements/layouts.py
CHANGED
|
@@ -323,7 +323,7 @@ class LayoutsMixin:
|
|
|
323
323
|
# in the future. This might require including more container
|
|
324
324
|
# parameters in the ID calculation.
|
|
325
325
|
block_proto.id = compute_and_register_element_id(
|
|
326
|
-
"container", user_key=key,
|
|
326
|
+
"container", user_key=key, dg=None
|
|
327
327
|
)
|
|
328
328
|
|
|
329
329
|
return self.dg._block(block_proto)
|
|
@@ -1112,7 +1112,7 @@ class LayoutsMixin:
|
|
|
1112
1112
|
title: str,
|
|
1113
1113
|
*,
|
|
1114
1114
|
dismissible: bool = True,
|
|
1115
|
-
width: Literal["small", "large"] = "small",
|
|
1115
|
+
width: Literal["small", "large", "medium"] = "small",
|
|
1116
1116
|
on_dismiss: Literal["ignore", "rerun"] | WidgetCallback = "ignore",
|
|
1117
1117
|
) -> Dialog:
|
|
1118
1118
|
"""Inserts the dialog container.
|
|
@@ -118,11 +118,8 @@ _MELTED_Y_COLUMN_TITLE: Final = "value"
|
|
|
118
118
|
_MELTED_COLOR_COLUMN_TITLE: Final = "color"
|
|
119
119
|
|
|
120
120
|
# Crazy internal (non-user-visible) names for the index and melted columns, in order to
|
|
121
|
-
# avoid collision with existing column names.
|
|
122
|
-
|
|
123
|
-
# lead to a conflict than something that's human-readable (like "--streamlit-fake-field"
|
|
124
|
-
# or something).
|
|
125
|
-
_PROTECTION_SUFFIX: Final = "--p5bJXXpQgvPz6yvQMFiy"
|
|
121
|
+
# avoid collision with existing column names.
|
|
122
|
+
_PROTECTION_SUFFIX: Final = " -- streamlit-generated"
|
|
126
123
|
_SEPARATED_INDEX_COLUMN_NAME: Final = _SEPARATED_INDEX_COLUMN_TITLE + _PROTECTION_SUFFIX
|
|
127
124
|
_MELTED_Y_COLUMN_NAME: Final = _MELTED_Y_COLUMN_TITLE + _PROTECTION_SUFFIX
|
|
128
125
|
_MELTED_COLOR_COLUMN_NAME: Final = _MELTED_COLOR_COLUMN_TITLE + _PROTECTION_SUFFIX
|