streamlit-nightly 1.41.2.dev20250201__py2.py3-none-any.whl → 1.42.1.dev20250204__py2.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/auth_util.py +2 -1
- streamlit/commands/echo.py +4 -1
- streamlit/commands/execution_control.py +3 -1
- streamlit/commands/page_config.py +2 -1
- streamlit/config.py +56 -25
- streamlit/config_option.py +3 -3
- streamlit/connections/snowflake_connection.py +22 -10
- streamlit/connections/snowpark_connection.py +2 -1
- streamlit/connections/util.py +4 -1
- streamlit/dataframe_util.py +3 -8
- streamlit/delta_generator.py +1 -1
- streamlit/elements/alert.py +32 -4
- streamlit/elements/arrow.py +28 -15
- streamlit/elements/code.py +4 -3
- streamlit/elements/deck_gl_json_chart.py +3 -4
- streamlit/elements/form.py +22 -4
- streamlit/elements/heading.py +21 -6
- streamlit/elements/image.py +12 -3
- streamlit/elements/layouts.py +9 -4
- streamlit/elements/lib/built_in_chart_utils.py +1 -3
- streamlit/elements/lib/color_util.py +7 -6
- streamlit/elements/lib/column_config_utils.py +4 -3
- streamlit/elements/lib/column_types.py +100 -33
- streamlit/elements/lib/dicttools.py +4 -1
- streamlit/elements/lib/event_utils.py +2 -2
- streamlit/elements/lib/file_uploader_utils.py +4 -1
- streamlit/elements/lib/image_utils.py +5 -4
- streamlit/elements/lib/options_selector_utils.py +4 -1
- streamlit/elements/lib/pandas_styler_utils.py +2 -1
- streamlit/elements/lib/policies.py +3 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +3 -1
- streamlit/elements/markdown.py +21 -7
- streamlit/elements/media.py +2 -2
- streamlit/elements/metric.py +8 -4
- streamlit/elements/plotly_chart.py +4 -5
- streamlit/elements/spinner.py +25 -3
- streamlit/elements/text.py +7 -2
- streamlit/elements/vega_charts.py +26 -22
- streamlit/elements/widgets/audio_input.py +8 -4
- streamlit/elements/widgets/button.py +29 -12
- streamlit/elements/widgets/button_group.py +29 -13
- streamlit/elements/widgets/camera_input.py +8 -4
- streamlit/elements/widgets/chat.py +1 -3
- streamlit/elements/widgets/checkbox.py +16 -8
- streamlit/elements/widgets/color_picker.py +8 -4
- streamlit/elements/widgets/data_editor.py +10 -14
- streamlit/elements/widgets/file_uploader.py +12 -6
- streamlit/elements/widgets/multiselect.py +10 -5
- streamlit/elements/widgets/number_input.py +8 -4
- streamlit/elements/widgets/radio.py +11 -5
- streamlit/elements/widgets/select_slider.py +12 -8
- streamlit/elements/widgets/selectbox.py +11 -5
- streamlit/elements/widgets/slider.py +19 -17
- streamlit/elements/widgets/text_widgets.py +16 -8
- streamlit/elements/widgets/time_widgets.py +21 -15
- streamlit/elements/write.py +60 -43
- streamlit/errors.py +1 -2
- streamlit/external/langchain/streamlit_callback_handler.py +3 -3
- streamlit/hello/animation_demo.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +30 -3
- streamlit/runtime/app_session.py +15 -15
- streamlit/runtime/caching/cached_message_replay.py +2 -1
- streamlit/runtime/caching/hashing.py +3 -2
- streamlit/runtime/context.py +2 -1
- streamlit/runtime/forward_msg_cache.py +3 -1
- streamlit/runtime/memory_session_storage.py +4 -1
- streamlit/runtime/memory_uploaded_file_manager.py +4 -1
- streamlit/runtime/runtime.py +6 -4
- streamlit/runtime/scriptrunner/script_runner.py +4 -3
- streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -3
- streamlit/runtime/secrets.py +1 -5
- streamlit/runtime/state/common.py +2 -4
- streamlit/runtime/state/query_params.py +2 -1
- streamlit/runtime/state/query_params_proxy.py +2 -1
- streamlit/runtime/state/safe_session_state.py +3 -1
- streamlit/runtime/state/session_state.py +2 -5
- streamlit/runtime/state/session_state_proxy.py +2 -1
- streamlit/runtime/uploaded_file_manager.py +3 -1
- streamlit/runtime/websocket_session_manager.py +8 -8
- streamlit/static/index.html +2 -2
- streamlit/static/static/css/{index.mUTQuMqR.css → index.DpJG_94W.css} +1 -1
- streamlit/static/static/js/{FileDownload.esm.Cf3bITtP.js → FileDownload.esm.CuayiK6T.js} +1 -1
- streamlit/static/static/js/FileDropzone.CvXoxIUm.js +5 -0
- streamlit/static/static/js/{FormClearHelper.BgwPD1tD.js → FormClearHelper.DpwWkrvV.js} +1 -1
- streamlit/static/static/js/{Hooks.BMaXaj11.js → Hooks.BQiFiHd5.js} +1 -1
- streamlit/static/static/js/{InputInstructions.qlsk9gvt.js → InputInstructions.CypmdrYz.js} +1 -1
- streamlit/static/static/js/ProgressBar.DfR4HyQR.js +2 -0
- streamlit/static/static/js/{RenderInPortalIfExists.Blpdplqk.js → RenderInPortalIfExists.D6u3szcn.js} +1 -1
- streamlit/static/static/js/{Toolbar.DMhyNpv2.js → Toolbar.D6p42Hno.js} +1 -1
- streamlit/static/static/js/axios.upsvKRUO.js +6 -0
- streamlit/static/static/js/{base-input.DyTEaESI.js → base-input.B5AcLp6p.js} +4 -4
- streamlit/static/static/js/{createSuper.B3rIhdpQ.js → createSuper.DNzaJgi-.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C9Q9Gy4e.js → data-grid-overlay-editor.CKACfVZL.js} +1 -1
- streamlit/static/static/js/{downloader.BAMiKd1n.js → downloader.D6HV3a60.js} +1 -1
- streamlit/static/static/js/{es6.D82pr6dy.js → es6.UQDWlCyE.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CJwxqR7x.js → iframeResizer.contentWindow.DQ-TFrBp.js} +1 -1
- streamlit/static/static/js/{index.B7J6suR-.js → index.2EE80u0h.js} +200 -200
- streamlit/static/static/js/{index.CoE1gpPQ.js → index.B96fHK2A.js} +1 -1
- streamlit/static/static/js/index.BAFGiIHm.js +1 -0
- streamlit/static/static/js/index.BPNlEjgz.js +1 -0
- streamlit/static/static/js/{index.C4kPuKr4.js → index.BPmrb-47.js} +1 -1
- streamlit/static/static/js/{index.BM_J1KkD.js → index.BQEIBi4n.js} +1 -1
- streamlit/static/static/js/index.BUGQmWUV.js +3 -0
- streamlit/static/static/js/index.BXmBj7MJ.js +1 -0
- streamlit/static/static/js/{index.5JFTbX2J.js → index.BY8YeKF1.js} +1 -1
- streamlit/static/static/js/{index.CF4stbIZ.js → index.BdVr8Tta.js} +1 -1
- streamlit/static/static/js/{index.CjFbbEE0.js → index.BghvoEVe.js} +1 -1
- streamlit/static/static/js/{index.8Q56Jjmk.js → index.BiMrOUpK.js} +1 -1
- streamlit/static/static/js/{index.yp4f0OMe.js → index.BiybRa0I.js} +2 -2
- streamlit/static/static/js/index.Bm7Vkuba.js +73 -0
- streamlit/static/static/js/{index.BZvQkTCS.js → index.BuyK2IsW.js} +1 -1
- streamlit/static/static/js/index.ByH1pn5_.js +1 -0
- streamlit/static/static/js/{index.zlHOKWDA.js → index.C8zZSMvD.js} +1 -1
- streamlit/static/static/js/index.CAuJtYES.js +1 -0
- streamlit/static/static/js/{index.Y84nTPW2.js → index.CEdHQ1ob.js} +1 -1
- streamlit/static/static/js/{index.CqGcWpm5.js → index.CJ-t5S6T.js} +2 -2
- streamlit/static/static/js/{index.BdlaxG49.js → index.CKOdbWxq.js} +1 -1
- streamlit/static/static/js/index.CSgG8OVN.js +1 -0
- streamlit/static/static/js/index.CX9gqq2L.js +1 -0
- streamlit/static/static/js/{index.TPHsScPF.js → index.CgVoYKAP.js} +1 -1
- streamlit/static/static/js/{index.D9yF6cxC.js → index.ChrjN8GY.js} +1 -1
- streamlit/static/static/js/{index.NbimJbgq.js → index.CrMtUJsu.js} +6 -6
- streamlit/static/static/js/index.D4SMJhY1.js +1 -0
- streamlit/static/static/js/index.D7BxtE4u.js +1 -0
- streamlit/static/static/js/{index.P5kx9um8.js → index.DB_dBVfZ.js} +5 -5
- streamlit/static/static/js/{index.BLCqXxIG.js → index.DMKXUbO6.js} +1 -1
- streamlit/static/static/js/index.DaoBv396.js +1 -0
- streamlit/static/static/js/{index.B3Wxz7wG.js → index.DkV6k6Ng.js} +1 -1
- streamlit/static/static/js/{index.BcAjRRAZ.js → index.DqZZoWyt.js} +1 -1
- streamlit/static/static/js/index.Dr6DSYcq.js +1 -0
- streamlit/static/static/js/{index.BdEYCAFh.js → index.Epl2r08f.js} +1 -1
- streamlit/static/static/js/{index.CC5oiyoV.js → index.ndVWhafL.js} +2 -2
- streamlit/static/static/js/{index.DiZyaYeV.js → index.wW-pPvtW.js} +3 -3
- streamlit/static/static/js/{input.DRyjjTTH.js → input.CxqdG-sh.js} +2 -2
- streamlit/static/static/js/{memory.C98yjNkk.js → memory.DuSk7Eex.js} +1 -1
- streamlit/static/static/js/{mergeWith.CLihEflw.js → mergeWith.DrxB1Sj4.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DozQhDJj.js → number-overlay-editor.DBc0yndt.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DJ7-JsJc.js → possibleConstructorReturn.ZdYWHeG3.js} +1 -1
- streamlit/static/static/js/{sandbox.0Tj4C46D.js → sandbox.D3L4CYjG.js} +1 -1
- streamlit/static/static/js/{textarea.CUrV8-V3.js → textarea.CSafh28v.js} +2 -2
- streamlit/static/static/js/{timepicker.DEu3fwJe.js → timepicker.C-pwkiaT.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.C71OtXzK.js → toConsumableArray.DyCVskz5.js} +1 -1
- streamlit/static/static/js/{uniqueId.CndDhnid.js → uniqueId.BODM2vTk.js} +1 -1
- streamlit/static/static/js/useBasicWidgetState.DQUiM2dz.js +1 -0
- streamlit/static/static/js/{useOnInputChange.CvHbHWmy.js → useOnInputChange.Ccjd55xn.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BLLyDFUF.js → withFullScreenWrapper.CneUoXNE.js} +1 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DcZbplWk.woff2 +0 -0
- streamlit/testing/v1/app_test.py +3 -1
- streamlit/testing/v1/element_tree.py +3 -4
- streamlit/testing/v1/local_script_runner.py +3 -3
- streamlit/type_util.py +11 -8
- streamlit/user_info.py +2 -3
- streamlit/watcher/path_watcher.py +4 -4
- streamlit/web/server/authlib_tornado_integration.py +3 -1
- streamlit/web/server/browser_websocket_handler.py +3 -1
- streamlit/web/server/routes.py +4 -1
- streamlit/web/server/server.py +2 -1
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/METADATA +1 -2
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/RECORD +166 -165
- streamlit/static/static/js/FileDropzone.B8wCqKiM.js +0 -5
- streamlit/static/static/js/ProgressBar.Di2oT-20.js +0 -2
- streamlit/static/static/js/index.B79cf7gS.js +0 -1
- streamlit/static/static/js/index.BBPZ3wsr.js +0 -1
- streamlit/static/static/js/index.BKahTKEx.js +0 -3
- streamlit/static/static/js/index.CSGfgCnQ.js +0 -1
- streamlit/static/static/js/index.CYMgsYSm.js +0 -1
- streamlit/static/static/js/index.CZjnqbcd.js +0 -73
- streamlit/static/static/js/index.C_4BuzGH.js +0 -1
- streamlit/static/static/js/index.CjiPq39N.js +0 -1
- streamlit/static/static/js/index.CjuTYYFG.js +0 -1
- streamlit/static/static/js/index.CuH7mftz.js +0 -1
- streamlit/static/static/js/index.DFJg1zHB.js +0 -1
- streamlit/static/static/js/index.Dm3nmdhh.js +0 -1
- streamlit/static/static/js/index.rrDohWOh.js +0 -1
- streamlit/static/static/js/useBasicWidgetState.DXLMTaiS.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -0
- {streamlit_nightly-1.41.2.dev20250201.data → streamlit_nightly-1.42.1.dev20250204.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/top_level.txt +0 -0
streamlit/elements/image.py
CHANGED
@@ -79,9 +79,18 @@ class ImageMixin:
|
|
79
79
|
row of images that overflow to additional rows as needed.
|
80
80
|
caption : str or list of str
|
81
81
|
Image caption(s). If this is ``None`` (default), no caption is
|
82
|
-
displayed. If ``image`` is a list of multiple images,
|
83
|
-
|
84
|
-
|
82
|
+
displayed. If ``image`` is a list of multiple images, ``caption``
|
83
|
+
must be a list of captions (one caption for each image) or
|
84
|
+
``None``.
|
85
|
+
|
86
|
+
Captions can optionally contain GitHub-flavored Markdown. Syntax
|
87
|
+
information can be found at: https://github.github.com/gfm.
|
88
|
+
|
89
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
90
|
+
supported Markdown directives.
|
91
|
+
|
92
|
+
.. |st.markdown| replace:: ``st.markdown``
|
93
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
85
94
|
width : int or None
|
86
95
|
Image width. If this is ``None`` (default), Streamlit will use the
|
87
96
|
image's native width, up to the width of the parent container.
|
streamlit/elements/layouts.py
CHANGED
@@ -14,7 +14,8 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from
|
17
|
+
from collections.abc import Sequence
|
18
|
+
from typing import TYPE_CHECKING, Literal, Union, cast
|
18
19
|
|
19
20
|
from typing_extensions import TypeAlias
|
20
21
|
|
@@ -647,9 +648,13 @@ class LayoutsMixin:
|
|
647
648
|
.. |st.markdown| replace:: ``st.markdown``
|
648
649
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
649
650
|
|
650
|
-
help : str
|
651
|
-
|
652
|
-
|
651
|
+
help : str or None
|
652
|
+
A tooltip that gets displayed when the popover button is hovered
|
653
|
+
over. If this is ``None`` (default), no tooltip is displayed.
|
654
|
+
|
655
|
+
The tooltip can optionally contain GitHub-flavored Markdown,
|
656
|
+
including the Markdown directives described in the ``body``
|
657
|
+
parameter of ``st.markdown``.
|
653
658
|
|
654
659
|
icon : str
|
655
660
|
An optional emoji or icon to display next to the button label. If ``icon``
|
@@ -16,17 +16,15 @@
|
|
16
16
|
|
17
17
|
from __future__ import annotations
|
18
18
|
|
19
|
+
from collections.abc import Collection, Hashable, Sequence
|
19
20
|
from dataclasses import dataclass
|
20
21
|
from datetime import date
|
21
22
|
from enum import Enum
|
22
23
|
from typing import (
|
23
24
|
TYPE_CHECKING,
|
24
25
|
Any,
|
25
|
-
Collection,
|
26
26
|
Final,
|
27
|
-
Hashable,
|
28
27
|
Literal,
|
29
|
-
Sequence,
|
30
28
|
TypedDict,
|
31
29
|
cast,
|
32
30
|
)
|
@@ -14,7 +14,8 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from
|
17
|
+
from collections.abc import Collection
|
18
|
+
from typing import Any, Callable, Union, cast
|
18
19
|
|
19
20
|
from typing_extensions import TypeAlias
|
20
21
|
|
@@ -22,17 +23,17 @@ from streamlit.errors import StreamlitInvalidColorError
|
|
22
23
|
|
23
24
|
# components go from 0.0 to 1.0
|
24
25
|
# Supported by Pillow and pretty common.
|
25
|
-
FloatRGBColorTuple: TypeAlias =
|
26
|
-
FloatRGBAColorTuple: TypeAlias =
|
26
|
+
FloatRGBColorTuple: TypeAlias = tuple[float, float, float]
|
27
|
+
FloatRGBAColorTuple: TypeAlias = tuple[float, float, float, float]
|
27
28
|
|
28
29
|
# components go from 0 to 255
|
29
30
|
# DeckGL uses these.
|
30
|
-
IntRGBColorTuple: TypeAlias =
|
31
|
-
IntRGBAColorTuple: TypeAlias =
|
31
|
+
IntRGBColorTuple: TypeAlias = tuple[int, int, int]
|
32
|
+
IntRGBAColorTuple: TypeAlias = tuple[int, int, int, int]
|
32
33
|
|
33
34
|
# components go from 0 to 255, except alpha goes from 0.0 to 1.0
|
34
35
|
# CSS uses these.
|
35
|
-
MixedRGBAColorTuple: TypeAlias =
|
36
|
+
MixedRGBAColorTuple: TypeAlias = tuple[int, int, int, float]
|
36
37
|
|
37
38
|
Color4Tuple: TypeAlias = Union[
|
38
39
|
FloatRGBAColorTuple,
|
@@ -16,8 +16,9 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
import copy
|
18
18
|
import json
|
19
|
+
from collections.abc import Mapping
|
19
20
|
from enum import Enum
|
20
|
-
from typing import TYPE_CHECKING,
|
21
|
+
from typing import TYPE_CHECKING, Final, Literal, Union
|
21
22
|
|
22
23
|
from typing_extensions import TypeAlias
|
23
24
|
|
@@ -67,7 +68,7 @@ class ColumnDataKind(str, Enum):
|
|
67
68
|
# The dataframe schema is a mapping from the name of the column
|
68
69
|
# in the underlying dataframe to the column data kind.
|
69
70
|
# The index column uses `_index` as name.
|
70
|
-
DataframeSchema: TypeAlias =
|
71
|
+
DataframeSchema: TypeAlias = dict[str, ColumnDataKind]
|
71
72
|
|
72
73
|
# This mapping contains all editable column types mapped to the data kinds
|
73
74
|
# that the column type is compatible for editing.
|
@@ -396,7 +397,7 @@ def determine_dataframe_schema(
|
|
396
397
|
|
397
398
|
|
398
399
|
# A mapping of column names/IDs to column configs.
|
399
|
-
ColumnConfigMapping: TypeAlias =
|
400
|
+
ColumnConfigMapping: TypeAlias = dict[Union[IndexIdentifierType, str], ColumnConfig]
|
400
401
|
ColumnConfigMappingInput: TypeAlias = Mapping[
|
401
402
|
Union[IndexIdentifierType, str],
|
402
403
|
Union[ColumnConfig, None, str],
|
@@ -15,12 +15,15 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
import datetime
|
18
|
-
from typing import
|
18
|
+
from typing import TYPE_CHECKING, Literal, TypedDict
|
19
19
|
|
20
20
|
from typing_extensions import NotRequired, TypeAlias
|
21
21
|
|
22
22
|
from streamlit.runtime.metrics_util import gather_metrics
|
23
23
|
|
24
|
+
if TYPE_CHECKING:
|
25
|
+
from collections.abc import Iterable
|
26
|
+
|
24
27
|
ColumnWidth: TypeAlias = Literal["small", "medium", "large"]
|
25
28
|
|
26
29
|
# Type alias that represents all available column types
|
@@ -152,8 +155,12 @@ class ColumnConfig(TypedDict, total=False):
|
|
152
155
|
- ``"large"``: 400px wide
|
153
156
|
|
154
157
|
help: str or None
|
155
|
-
|
156
|
-
|
158
|
+
A tooltip that gets displayed when hovering over the column label. If
|
159
|
+
this is ``None`` (default), no tooltip is displayed.
|
160
|
+
|
161
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
162
|
+
the Markdown directives described in the ``body`` parameter of
|
163
|
+
``st.markdown``.
|
157
164
|
|
158
165
|
disabled: bool or None
|
159
166
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -252,8 +259,12 @@ def Column(
|
|
252
259
|
- ``"large"``: 400px wide
|
253
260
|
|
254
261
|
help: str or None
|
255
|
-
|
256
|
-
|
262
|
+
A tooltip that gets displayed when hovering over the column label. If
|
263
|
+
this is ``None`` (default), no tooltip is displayed.
|
264
|
+
|
265
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
266
|
+
the Markdown directives described in the ``body`` parameter of
|
267
|
+
``st.markdown``.
|
257
268
|
|
258
269
|
disabled: bool or None
|
259
270
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -354,8 +365,12 @@ def NumberColumn(
|
|
354
365
|
- ``"large"``: 400px wide
|
355
366
|
|
356
367
|
help: str or None
|
357
|
-
|
358
|
-
|
368
|
+
A tooltip that gets displayed when hovering over the column label. If
|
369
|
+
this is ``None`` (default), no tooltip is displayed.
|
370
|
+
|
371
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
372
|
+
the Markdown directives described in the ``body`` parameter of
|
373
|
+
``st.markdown``.
|
359
374
|
|
360
375
|
disabled: bool or None
|
361
376
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -493,8 +508,12 @@ def TextColumn(
|
|
493
508
|
- ``"large"``: 400px wide
|
494
509
|
|
495
510
|
help: str or None
|
496
|
-
|
497
|
-
|
511
|
+
A tooltip that gets displayed when hovering over the column label. If
|
512
|
+
this is ``None`` (default), no tooltip is displayed.
|
513
|
+
|
514
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
515
|
+
the Markdown directives described in the ``body`` parameter of
|
516
|
+
``st.markdown``.
|
498
517
|
|
499
518
|
disabled: bool or None
|
500
519
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -613,8 +632,12 @@ def LinkColumn(
|
|
613
632
|
- ``"large"``: 400px wide
|
614
633
|
|
615
634
|
help: str or None
|
616
|
-
|
617
|
-
|
635
|
+
A tooltip that gets displayed when hovering over the column label. If
|
636
|
+
this is ``None`` (default), no tooltip is displayed.
|
637
|
+
|
638
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
639
|
+
the Markdown directives described in the ``body`` parameter of
|
640
|
+
``st.markdown``.
|
618
641
|
|
619
642
|
disabled: bool or None
|
620
643
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -766,8 +789,12 @@ def CheckboxColumn(
|
|
766
789
|
- ``"large"``: 400px wide
|
767
790
|
|
768
791
|
help: str or None
|
769
|
-
|
770
|
-
|
792
|
+
A tooltip that gets displayed when hovering over the column label. If
|
793
|
+
this is ``None`` (default), no tooltip is displayed.
|
794
|
+
|
795
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
796
|
+
the Markdown directives described in the ``body`` parameter of
|
797
|
+
``st.markdown``.
|
771
798
|
|
772
799
|
disabled: bool or None
|
773
800
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -872,8 +899,12 @@ def SelectboxColumn(
|
|
872
899
|
- ``"large"``: 400px wide
|
873
900
|
|
874
901
|
help: str or None
|
875
|
-
|
876
|
-
|
902
|
+
A tooltip that gets displayed when hovering over the column label. If
|
903
|
+
this is ``None`` (default), no tooltip is displayed.
|
904
|
+
|
905
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
906
|
+
the Markdown directives described in the ``body`` parameter of
|
907
|
+
``st.markdown``.
|
877
908
|
|
878
909
|
disabled: bool or None
|
879
910
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -993,8 +1024,12 @@ def BarChartColumn(
|
|
993
1024
|
- ``"large"``: 400px wide
|
994
1025
|
|
995
1026
|
help: str or None
|
996
|
-
|
997
|
-
|
1027
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1028
|
+
this is ``None`` (default), no tooltip is displayed.
|
1029
|
+
|
1030
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1031
|
+
the Markdown directives described in the ``body`` parameter of
|
1032
|
+
``st.markdown``.
|
998
1033
|
|
999
1034
|
pinned: bool or None
|
1000
1035
|
Whether the column is pinned. A pinned column will stay visible on the
|
@@ -1087,8 +1122,12 @@ def LineChartColumn(
|
|
1087
1122
|
- ``"large"``: 400px wide
|
1088
1123
|
|
1089
1124
|
help: str or None
|
1090
|
-
|
1091
|
-
|
1125
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1126
|
+
this is ``None`` (default), no tooltip is displayed.
|
1127
|
+
|
1128
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1129
|
+
the Markdown directives described in the ``body`` parameter of
|
1130
|
+
``st.markdown``.
|
1092
1131
|
|
1093
1132
|
pinned: bool or None
|
1094
1133
|
Whether the column is pinned. A pinned column will stay visible on the
|
@@ -1182,8 +1221,12 @@ def AreaChartColumn(
|
|
1182
1221
|
- ``"large"``: 400px wide
|
1183
1222
|
|
1184
1223
|
help: str or None
|
1185
|
-
|
1186
|
-
|
1224
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1225
|
+
this is ``None`` (default), no tooltip is displayed.
|
1226
|
+
|
1227
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1228
|
+
the Markdown directives described in the ``body`` parameter of
|
1229
|
+
``st.markdown``.
|
1187
1230
|
|
1188
1231
|
pinned: bool or None
|
1189
1232
|
Whether the column is pinned. A pinned column will stay visible on the
|
@@ -1283,8 +1326,12 @@ def ImageColumn(
|
|
1283
1326
|
- ``"large"``: 400px wide
|
1284
1327
|
|
1285
1328
|
help: str or None
|
1286
|
-
|
1287
|
-
|
1329
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1330
|
+
this is ``None`` (default), no tooltip is displayed.
|
1331
|
+
|
1332
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1333
|
+
the Markdown directives described in the ``body`` parameter of
|
1334
|
+
``st.markdown``.
|
1288
1335
|
|
1289
1336
|
pinned: bool or None
|
1290
1337
|
Whether the column is pinned. A pinned column will stay visible on the
|
@@ -1363,8 +1410,12 @@ def ListColumn(
|
|
1363
1410
|
- ``"large"``: 400px wide
|
1364
1411
|
|
1365
1412
|
help: str or None
|
1366
|
-
|
1367
|
-
|
1413
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1414
|
+
this is ``None`` (default), no tooltip is displayed.
|
1415
|
+
|
1416
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1417
|
+
the Markdown directives described in the ``body`` parameter of
|
1418
|
+
``st.markdown``.
|
1368
1419
|
|
1369
1420
|
pinned: bool or None
|
1370
1421
|
Whether the column is pinned. A pinned column will stay visible on the
|
@@ -1454,8 +1505,12 @@ def DatetimeColumn(
|
|
1454
1505
|
- ``"large"``: 400px wide
|
1455
1506
|
|
1456
1507
|
help: str or None
|
1457
|
-
|
1458
|
-
|
1508
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1509
|
+
this is ``None`` (default), no tooltip is displayed.
|
1510
|
+
|
1511
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1512
|
+
the Markdown directives described in the ``body`` parameter of
|
1513
|
+
``st.markdown``.
|
1459
1514
|
|
1460
1515
|
disabled: bool or None
|
1461
1516
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -1601,8 +1656,12 @@ def TimeColumn(
|
|
1601
1656
|
- ``"large"``: 400px wide
|
1602
1657
|
|
1603
1658
|
help: str or None
|
1604
|
-
|
1605
|
-
|
1659
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1660
|
+
this is ``None`` (default), no tooltip is displayed.
|
1661
|
+
|
1662
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1663
|
+
the Markdown directives described in the ``body`` parameter of
|
1664
|
+
``st.markdown``.
|
1606
1665
|
|
1607
1666
|
disabled: bool or None
|
1608
1667
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -1743,8 +1802,12 @@ def DateColumn(
|
|
1743
1802
|
- ``"large"``: 400px wide
|
1744
1803
|
|
1745
1804
|
help: str or None
|
1746
|
-
|
1747
|
-
|
1805
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1806
|
+
this is ``None`` (default), no tooltip is displayed.
|
1807
|
+
|
1808
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1809
|
+
the Markdown directives described in the ``body`` parameter of
|
1810
|
+
``st.markdown``.
|
1748
1811
|
|
1749
1812
|
disabled: bool or None
|
1750
1813
|
Whether editing should be disabled for this column. If this is ``None``
|
@@ -1880,8 +1943,12 @@ def ProgressColumn(
|
|
1880
1943
|
- ``"large"``: 400px wide
|
1881
1944
|
|
1882
1945
|
help: str or None
|
1883
|
-
|
1884
|
-
|
1946
|
+
A tooltip that gets displayed when hovering over the column label. If
|
1947
|
+
this is ``None`` (default), no tooltip is displayed.
|
1948
|
+
|
1949
|
+
The tooltip can optionally contain GitHub-flavored Markdown, including
|
1950
|
+
the Markdown directives described in the ``body`` parameter of
|
1951
|
+
``st.markdown``.
|
1885
1952
|
|
1886
1953
|
format: str or None
|
1887
1954
|
A printf-style format string controlling how numbers are displayed.
|
@@ -16,7 +16,10 @@
|
|
16
16
|
|
17
17
|
from __future__ import annotations
|
18
18
|
|
19
|
-
from typing import
|
19
|
+
from typing import TYPE_CHECKING, Any
|
20
|
+
|
21
|
+
if TYPE_CHECKING:
|
22
|
+
from collections.abc import Mapping
|
20
23
|
|
21
24
|
|
22
25
|
def _unflatten_single_dict(flat_dict: dict[Any, Any]) -> dict[Any, Any]:
|
@@ -12,10 +12,10 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from typing import Any
|
15
|
+
from typing import Any
|
16
16
|
|
17
17
|
|
18
|
-
class AttributeDictionary(
|
18
|
+
class AttributeDictionary(dict[Any, Any]):
|
19
19
|
"""
|
20
20
|
A dictionary subclass that supports attribute-style access.
|
21
21
|
|
@@ -17,9 +17,10 @@ from __future__ import annotations
|
|
17
17
|
import io
|
18
18
|
import os
|
19
19
|
import re
|
20
|
+
from collections.abc import Sequence
|
20
21
|
from enum import IntEnum
|
21
22
|
from pathlib import Path
|
22
|
-
from typing import TYPE_CHECKING, Final, Literal,
|
23
|
+
from typing import TYPE_CHECKING, Final, Literal, Union, cast
|
23
24
|
|
24
25
|
from typing_extensions import TypeAlias
|
25
26
|
|
@@ -416,9 +417,9 @@ def marshall_images(
|
|
416
417
|
else:
|
417
418
|
captions = [str(caption)]
|
418
419
|
|
419
|
-
assert isinstance(
|
420
|
-
|
421
|
-
)
|
420
|
+
assert isinstance(captions, list), (
|
421
|
+
"If image is a list then caption should be as well"
|
422
|
+
)
|
422
423
|
assert len(captions) == len(images), "Cannot pair %d captions with %d images." % (
|
423
424
|
len(captions),
|
424
425
|
len(images),
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
from enum import Enum, EnumMeta
|
18
|
-
from typing import Any, Final,
|
18
|
+
from typing import TYPE_CHECKING, Any, Final, TypeVar, overload
|
19
19
|
|
20
20
|
from streamlit import config, logger
|
21
21
|
from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
|
@@ -26,6 +26,9 @@ from streamlit.type_util import (
|
|
26
26
|
check_python_comparable,
|
27
27
|
)
|
28
28
|
|
29
|
+
if TYPE_CHECKING:
|
30
|
+
from collections.abc import Iterable, Sequence
|
31
|
+
|
29
32
|
_LOGGER: Final = logger.get_logger(__name__)
|
30
33
|
|
31
34
|
_FLOAT_EQUALITY_EPSILON: Final[float] = 0.000000000005
|
@@ -14,7 +14,8 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from
|
17
|
+
from collections.abc import Mapping
|
18
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
18
19
|
|
19
20
|
from streamlit import dataframe_util
|
20
21
|
from streamlit.errors import StreamlitAPIException
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from typing import TYPE_CHECKING, Any, Final
|
17
|
+
from typing import TYPE_CHECKING, Any, Final
|
18
18
|
|
19
19
|
from streamlit import config, errors, logger, runtime
|
20
20
|
from streamlit.elements.lib.form_utils import is_in_form
|
@@ -31,6 +31,8 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import (
|
|
31
31
|
from streamlit.runtime.state import WidgetCallback, get_session_state
|
32
32
|
|
33
33
|
if TYPE_CHECKING:
|
34
|
+
from collections.abc import Sequence
|
35
|
+
|
34
36
|
from streamlit.delta_generator import DeltaGenerator
|
35
37
|
|
36
38
|
|
streamlit/elements/lib/utils.py
CHANGED
@@ -19,7 +19,6 @@ from datetime import date, datetime, time, timedelta
|
|
19
19
|
from typing import (
|
20
20
|
TYPE_CHECKING,
|
21
21
|
Any,
|
22
|
-
Iterable,
|
23
22
|
Literal,
|
24
23
|
Union,
|
25
24
|
overload,
|
@@ -45,6 +44,7 @@ from streamlit.util import HASHLIB_KWARGS
|
|
45
44
|
|
46
45
|
if TYPE_CHECKING:
|
47
46
|
from builtins import ellipsis
|
47
|
+
from collections.abc import Iterable
|
48
48
|
|
49
49
|
|
50
50
|
Key: TypeAlias = Union[str, int]
|
streamlit/elements/map.py
CHANGED
@@ -18,7 +18,7 @@ from __future__ import annotations
|
|
18
18
|
|
19
19
|
import copy
|
20
20
|
import json
|
21
|
-
from typing import TYPE_CHECKING, Any,
|
21
|
+
from typing import TYPE_CHECKING, Any, Final, cast
|
22
22
|
|
23
23
|
import streamlit.elements.deck_gl_json_chart as deck_gl_json_chart
|
24
24
|
from streamlit import config, dataframe_util
|
@@ -33,6 +33,8 @@ from streamlit.proto.DeckGlJsonChart_pb2 import DeckGlJsonChart as DeckGlJsonCha
|
|
33
33
|
from streamlit.runtime.metrics_util import gather_metrics
|
34
34
|
|
35
35
|
if TYPE_CHECKING:
|
36
|
+
from collections.abc import Collection
|
37
|
+
|
36
38
|
from pandas import DataFrame
|
37
39
|
|
38
40
|
from streamlit.dataframe_util import Data
|
streamlit/elements/markdown.py
CHANGED
@@ -93,8 +93,13 @@ class MarkdownMixin:
|
|
93
93
|
If you only want to insert HTML or CSS without Markdown text,
|
94
94
|
we recommend using ``st.html`` instead.
|
95
95
|
|
96
|
-
help : str
|
97
|
-
|
96
|
+
help : str or None
|
97
|
+
A tooltip that gets displayed next to the Markdown. If this is
|
98
|
+
``None`` (default), no tooltip is displayed.
|
99
|
+
|
100
|
+
The tooltip can optionally contain GitHub-flavored Markdown,
|
101
|
+
including the Markdown directives described in the ``body``
|
102
|
+
parameter of ``st.markdown``.
|
98
103
|
|
99
104
|
Examples
|
100
105
|
--------
|
@@ -162,7 +167,7 @@ class MarkdownMixin:
|
|
162
167
|
|
163
168
|
"""
|
164
169
|
code_proto = MarkdownProto()
|
165
|
-
markdown = f
|
170
|
+
markdown = f"```{language or ''}\n{body}\n```"
|
166
171
|
code_proto.body = clean_text(markdown)
|
167
172
|
code_proto.element_type = MarkdownProto.Type.CODE
|
168
173
|
return self.dg._enqueue("markdown", code_proto)
|
@@ -205,8 +210,13 @@ class MarkdownMixin:
|
|
205
210
|
If you only want to insert HTML or CSS without Markdown text,
|
206
211
|
we recommend using ``st.html`` instead.
|
207
212
|
|
208
|
-
help : str
|
209
|
-
|
213
|
+
help : str or None
|
214
|
+
A tooltip that gets displayed next to the caption. If this is
|
215
|
+
``None`` (default), no tooltip is displayed.
|
216
|
+
|
217
|
+
The tooltip can optionally contain GitHub-flavored Markdown,
|
218
|
+
including the Markdown directives described in the ``body``
|
219
|
+
parameter of ``st.markdown``.
|
210
220
|
|
211
221
|
Examples
|
212
222
|
--------
|
@@ -246,9 +256,13 @@ class MarkdownMixin:
|
|
246
256
|
a good idea to use raw Python strings since LaTeX uses backslashes
|
247
257
|
a lot.
|
248
258
|
|
249
|
-
help : str
|
250
|
-
|
259
|
+
help : str or None
|
260
|
+
A tooltip that gets displayed next to the LaTeX expression. If
|
261
|
+
this is ``None`` (default), no tooltip is displayed.
|
251
262
|
|
263
|
+
The tooltip can optionally contain GitHub-flavored Markdown,
|
264
|
+
including the Markdown directives described in the ``body``
|
265
|
+
parameter of ``st.markdown``.
|
252
266
|
|
253
267
|
Example
|
254
268
|
-------
|
streamlit/elements/media.py
CHANGED
@@ -18,7 +18,7 @@ import io
|
|
18
18
|
import re
|
19
19
|
from datetime import timedelta
|
20
20
|
from pathlib import Path
|
21
|
-
from typing import TYPE_CHECKING,
|
21
|
+
from typing import TYPE_CHECKING, Final, Union, cast
|
22
22
|
|
23
23
|
from typing_extensions import TypeAlias
|
24
24
|
|
@@ -54,7 +54,7 @@ MediaData: TypeAlias = Union[
|
|
54
54
|
]
|
55
55
|
|
56
56
|
SubtitleData: TypeAlias = Union[
|
57
|
-
str, Path, bytes, io.BytesIO,
|
57
|
+
str, Path, bytes, io.BytesIO, dict[str, Union[str, Path, bytes, io.BytesIO]], None
|
58
58
|
]
|
59
59
|
|
60
60
|
MediaTime: TypeAlias = Union[int, float, timedelta, str]
|
streamlit/elements/metric.py
CHANGED
@@ -102,10 +102,14 @@ class MetricMixin:
|
|
102
102
|
good, e.g. if cost decreased. If "off", delta is shown in gray
|
103
103
|
regardless of its value.
|
104
104
|
|
105
|
-
help : str
|
106
|
-
|
107
|
-
|
108
|
-
``
|
105
|
+
help : str or None
|
106
|
+
A tooltip that gets displayed next to the metric label. Streamlit
|
107
|
+
only displays the tooltip when ``label_visibility="visible"``. If
|
108
|
+
this is ``None`` (default), no tooltip is displayed.
|
109
|
+
|
110
|
+
The tooltip can optionally contain GitHub-flavored Markdown,
|
111
|
+
including the Markdown directives described in the ``body``
|
112
|
+
parameter of ``st.markdown``.
|
109
113
|
|
110
114
|
label_visibility : "visible", "hidden", or "collapsed"
|
111
115
|
The visibility of the label. The default is ``"visible"``. If this
|
@@ -21,10 +21,7 @@ from dataclasses import dataclass
|
|
21
21
|
from typing import (
|
22
22
|
TYPE_CHECKING,
|
23
23
|
Any,
|
24
|
-
Dict,
|
25
24
|
Final,
|
26
|
-
Iterable,
|
27
|
-
List,
|
28
25
|
Literal,
|
29
26
|
TypedDict,
|
30
27
|
Union,
|
@@ -50,6 +47,8 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_r
|
|
50
47
|
from streamlit.runtime.state import WidgetCallback, register_widget
|
51
48
|
|
52
49
|
if TYPE_CHECKING:
|
50
|
+
from collections.abc import Iterable
|
51
|
+
|
53
52
|
import matplotlib
|
54
53
|
import plotly.graph_objs as go
|
55
54
|
from plotly.basedatatypes import BaseFigure
|
@@ -65,11 +64,11 @@ _AtomicFigureOrData: TypeAlias = Union[
|
|
65
64
|
]
|
66
65
|
FigureOrData: TypeAlias = Union[
|
67
66
|
_AtomicFigureOrData,
|
68
|
-
|
67
|
+
list[_AtomicFigureOrData],
|
69
68
|
# It is kind of hard to figure out exactly what kind of dict is supported
|
70
69
|
# here, as plotly hasn't embraced typing yet. This version is chosen to
|
71
70
|
# align with the docstring.
|
72
|
-
|
71
|
+
dict[str, _AtomicFigureOrData],
|
73
72
|
"BaseFigure",
|
74
73
|
"matplotlib.figure.Figure",
|
75
74
|
]
|