streamlit-nightly 1.45.1.dev20250507__py3-none-any.whl → 1.45.1.dev20250509__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 +3 -3
- streamlit/cli_util.py +3 -2
- streamlit/commands/logo.py +2 -2
- streamlit/commands/navigation.py +5 -4
- streamlit/commands/page_config.py +3 -1
- streamlit/components/types/base_custom_component.py +7 -7
- streamlit/components/v1/custom_component.py +6 -6
- streamlit/config.py +84 -48
- streamlit/config_option.py +2 -2
- streamlit/config_util.py +20 -12
- streamlit/connections/base_connection.py +3 -3
- streamlit/connections/snowflake_connection.py +5 -5
- streamlit/connections/snowpark_connection.py +3 -3
- streamlit/connections/sql_connection.py +9 -10
- streamlit/cursor.py +6 -6
- streamlit/delta_generator.py +7 -6
- streamlit/delta_generator_singletons.py +2 -2
- streamlit/deprecation_util.py +1 -1
- streamlit/elements/arrow.py +2 -3
- streamlit/elements/deck_gl_json_chart.py +30 -17
- streamlit/elements/dialog_decorator.py +3 -3
- streamlit/elements/doc_string.py +20 -20
- streamlit/elements/layouts.py +26 -7
- streamlit/elements/lib/built_in_chart_utils.py +37 -39
- streamlit/elements/lib/color_util.py +3 -3
- streamlit/elements/lib/column_types.py +2 -2
- streamlit/elements/lib/dialog.py +2 -2
- streamlit/elements/lib/event_utils.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/policies.py +3 -3
- streamlit/elements/lib/utils.py +5 -5
- streamlit/elements/map.py +20 -15
- streamlit/elements/progress.py +9 -12
- streamlit/elements/vega_charts.py +2 -2
- streamlit/elements/widgets/button_group.py +2 -2
- streamlit/elements/widgets/data_editor.py +2 -2
- streamlit/elements/widgets/multiselect.py +2 -2
- streamlit/elements/widgets/selectbox.py +1 -1
- streamlit/elements/widgets/slider.py +16 -14
- streamlit/elements/write.py +3 -6
- streamlit/errors.py +34 -21
- streamlit/external/langchain/streamlit_callback_handler.py +2 -2
- streamlit/file_util.py +8 -8
- streamlit/git_util.py +1 -1
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/hello/mapping_demo.py +1 -1
- streamlit/navigation/page.py +1 -1
- streamlit/proto/Block_pb2.py +38 -29
- streamlit/proto/Block_pb2.pyi +68 -4
- streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
- streamlit/proto/GapSize_pb2.py +29 -0
- streamlit/proto/GapSize_pb2.pyi +70 -0
- streamlit/proto/HeightConfig_pb2.py +27 -0
- streamlit/proto/HeightConfig_pb2.pyi +48 -0
- streamlit/proto/WidthConfig_pb2.py +2 -2
- streamlit/proto/WidthConfig_pb2.pyi +15 -1
- streamlit/runtime/app_session.py +2 -2
- streamlit/runtime/caching/cache_data_api.py +9 -5
- streamlit/runtime/caching/cache_errors.py +3 -3
- streamlit/runtime/caching/cache_resource_api.py +7 -7
- streamlit/runtime/caching/cache_utils.py +9 -9
- streamlit/runtime/caching/cached_message_replay.py +1 -1
- streamlit/runtime/caching/hashing.py +70 -74
- streamlit/runtime/caching/legacy_cache_api.py +1 -1
- streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +3 -1
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +1 -1
- streamlit/runtime/connection_factory.py +12 -12
- streamlit/runtime/context.py +2 -2
- streamlit/runtime/credentials.py +3 -3
- streamlit/runtime/fragment.py +3 -4
- streamlit/runtime/media_file_manager.py +2 -2
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/memory_uploaded_file_manager.py +1 -1
- streamlit/runtime/metrics_util.py +5 -6
- streamlit/runtime/pages_manager.py +3 -3
- streamlit/runtime/runtime.py +1 -1
- streamlit/runtime/runtime_util.py +2 -2
- streamlit/runtime/scriptrunner/exec_code.py +10 -3
- streamlit/runtime/scriptrunner/magic.py +13 -8
- streamlit/runtime/scriptrunner/script_runner.py +2 -2
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +6 -5
- streamlit/runtime/secrets.py +8 -11
- streamlit/runtime/state/query_params.py +2 -2
- streamlit/runtime/state/safe_session_state.py +2 -2
- streamlit/runtime/state/session_state.py +17 -15
- streamlit/runtime/stats.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +1 -1
- streamlit/source_util.py +3 -4
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.BgsGCsV4.js → ErrorOutline.esm.C-0hf1-k.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CCKezPn5.js → FileDownload.esm.B-fFGI-X.js} +1 -1
- streamlit/static/static/js/{FileHelper.CprSF_kT.js → FileHelper.ACYo0OZo.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DiwQ0EtT.js → FormClearHelper.CVNTT-bJ.js} +1 -1
- streamlit/static/static/js/{Hooks.DDqhyZ1_.js → Hooks.C3thlpd2.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BCEZxme4.js → InputInstructions.CwAxousX.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CGdY94g_.js → ProgressBar.xh599Rum.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.uGJp_Q0v.js → RenderInPortalIfExists.CQLIsNPE.js} +1 -1
- streamlit/static/static/js/{Toolbar.hTlw0-K1.js → Toolbar.LKdyvP0u.js} +1 -1
- streamlit/static/static/js/{index.xsH4HHeE.js → UploadFileInfo.0DCkpDDf.js} +5 -5
- streamlit/static/static/js/{base-input.mGTY3-qU.js → base-input.D8OdS4WW.js} +4 -4
- streamlit/static/static/js/{checkbox.Cg-5cKAh.js → checkbox.DSdYKlOI.js} +2 -2
- streamlit/static/static/js/{createSuper.-HPb1oYT.js → createSuper.B2pyCfWw.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BpNYxiTp.js → data-grid-overlay-editor.DhO2r0ne.js} +1 -1
- streamlit/static/static/js/{downloader.DS9891pS.js → downloader.C24skoDM.js} +1 -1
- streamlit/static/static/js/{es6.CU1PEL2w.js → es6.DHkvCKPh.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CgJE2bJN.js → iframeResizer.contentWindow.2ckQaC2c.js} +1 -1
- streamlit/static/static/js/index.0dGwl8CJ.js +1 -0
- streamlit/static/static/js/index.B5A28NpR.js +1 -0
- streamlit/static/static/js/{index.BC0ueJ8H.js → index.B5EFweZ4.js} +1 -1
- streamlit/static/static/js/{index.CyGuL4If.js → index.BAafqHfB.js} +2 -2
- streamlit/static/static/js/{index.DWV80Vyw.js → index.BHTbGZPQ.js} +1 -1
- streamlit/static/static/js/index.BNXtQAj4.js +1 -0
- streamlit/static/static/js/index.BRhKaVdO.js +1 -0
- streamlit/static/static/js/index.BSOiJVQd.js +2 -0
- streamlit/static/static/js/{index.GSYBrzVp.js → index.BVgTQbOJ.js} +1 -1
- streamlit/static/static/js/{index.BTTj6ld4.js → index.BflIniLm.js} +1 -1
- streamlit/static/static/js/{index.DLTqo4pp.js → index.BjeNtZIz.js} +3 -3
- streamlit/static/static/js/{index.DZ6oX-v9.js → index.By-NmdnB.js} +161 -161
- streamlit/static/static/js/{index.DVpzZJNg.js → index.CIoOEhZ2.js} +1 -1
- streamlit/static/static/js/{index.CN91oQMB.js → index.CRCdonis.js} +36 -36
- streamlit/static/static/js/index.CRxaBCJ7.js +1 -0
- streamlit/static/static/js/index.CU-pbYVN.js +1 -0
- streamlit/static/static/js/{index.CzGUd4IN.js → index.CUsk52t2.js} +1 -1
- streamlit/static/static/js/{index.BHVQ94t4.js → index.CVO14oQG.js} +2 -2
- streamlit/static/static/js/index.CXFuA6J-.js +1 -0
- streamlit/static/static/js/{index.DJHUlWgy.js → index.C_dd5q7u.js} +1 -1
- streamlit/static/static/js/{index.Bph6ZoI5.js → index.CjWUnKIN.js} +1 -1
- streamlit/static/static/js/{index.B209tswL.js → index.CkTL9bAR.js} +256 -256
- streamlit/static/static/js/{index.ErkF0SoX.js → index.CsbhsAPy.js} +2 -2
- streamlit/static/static/js/{index.hPjr68pz.js → index.CtCnBUtk.js} +1 -1
- streamlit/static/static/js/{index.BT0p7gAu.js → index.CwuKadAX.js} +1 -1
- streamlit/static/static/js/{index.CtoDsUtq.js → index.D0R7Xh4Z.js} +1 -1
- streamlit/static/static/js/index.D2D75EDw.js +73 -0
- streamlit/static/static/js/index.D4eMiZ1F.js +1 -0
- streamlit/static/static/js/{index.Dh4RKl-F.js → index.D7SCC3z9.js} +1 -1
- streamlit/static/static/js/index.DZiilxEt.js +1 -0
- streamlit/static/static/js/{index.DtqvdV-p.js → index.Dvr1cEJS.js} +1 -1
- streamlit/static/static/js/index.JtIlC6Uq.js +1 -0
- streamlit/static/static/js/index.fz_c3Xh_.js +1 -0
- streamlit/static/static/js/{index.CvFsF3FD.js → index.gFjPlsMT.js} +1 -1
- streamlit/static/static/js/{index.DPJBu2uZ.js → index.jCJYMVED.js} +1 -1
- streamlit/static/static/js/index.xldt56AE.js +1 -0
- streamlit/static/static/js/{index.Bb-Ukg41.js → index.yzoj_DuM.js} +1 -1
- streamlit/static/static/js/{input.DY17i94N.js → input.BP6LX_Bg.js} +2 -2
- streamlit/static/static/js/{memory.DsIIcbSd.js → memory.E9x2ZYJv.js} +1 -1
- streamlit/static/static/js/{mergeWith.cRgGdgvI.js → mergeWith.CZP2AaVS.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.B8Xi2dYq.js → number-overlay-editor.D-Kl79U_.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BgDi5nUm.js → possibleConstructorReturn.P2ILVC_6.js} +1 -1
- streamlit/static/static/js/{sandbox.BH9emp13.js → sandbox.DfzJIGMV.js} +1 -1
- streamlit/static/static/js/{textarea.DAyShsGG.js → textarea.4PjzfDWF.js} +2 -2
- streamlit/static/static/js/{timepicker.CCH2R2Y0.js → timepicker.DMQdaNzO.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CNffSDCu.js → toConsumableArray.BEdkbHYx.js} +1 -1
- streamlit/static/static/js/{uniqueId.B49CstkV.js → uniqueId.CAs7ftHC.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CkThOkF9.js → useBasicWidgetState.Cedp0V76.js} +1 -1
- streamlit/static/static/js/useOnInputChange.CvRKHHKx.js +1 -0
- streamlit/static/static/js/{withFullScreenWrapper.UsvF_Jwr.js → withFullScreenWrapper.BbmjZAzW.js} +1 -1
- streamlit/string_util.py +6 -7
- streamlit/temporary_directory.py +12 -3
- streamlit/testing/v1/app_test.py +11 -6
- streamlit/testing/v1/element_tree.py +134 -158
- streamlit/testing/v1/local_script_runner.py +5 -5
- streamlit/testing/v1/util.py +11 -4
- streamlit/type_util.py +3 -4
- streamlit/user_info.py +3 -2
- streamlit/util.py +1 -1
- streamlit/watcher/event_based_path_watcher.py +1 -1
- streamlit/watcher/folder_black_list.py +1 -1
- streamlit/watcher/local_sources_watcher.py +5 -5
- streamlit/watcher/path_watcher.py +1 -1
- streamlit/web/bootstrap.py +2 -1
- streamlit/web/cli.py +12 -11
- streamlit/web/server/browser_websocket_handler.py +1 -1
- streamlit/web/server/component_request_handler.py +1 -1
- streamlit/web/server/media_file_handler.py +2 -1
- streamlit/web/server/oauth_authlib_routes.py +9 -2
- streamlit/web/server/oidc_mixin.py +13 -6
- streamlit/web/server/routes.py +3 -3
- streamlit/web/server/server.py +1 -1
- streamlit/web/server/server_util.py +7 -6
- streamlit/web/server/upload_file_request_handler.py +5 -5
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/RECORD +187 -184
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/UploadFileInfo.C-jY39rj.js +0 -1
- streamlit/static/static/js/index.BVjgrQ4R.js +0 -1
- streamlit/static/static/js/index.BXYstdPh.js +0 -2
- streamlit/static/static/js/index.BZ9mqzEJ.js +0 -1
- streamlit/static/static/js/index.BhTok8vt.js +0 -1
- streamlit/static/static/js/index.CJPcdxPe.js +0 -1
- streamlit/static/static/js/index.CMOA-8Q2.js +0 -1
- streamlit/static/static/js/index.DAxf3_iz.js +0 -1
- streamlit/static/static/js/index.Dn76KVNf.js +0 -1
- streamlit/static/static/js/index.OngWTN39.js +0 -1
- streamlit/static/static/js/index.PSwG8ayC.js +0 -1
- streamlit/static/static/js/index.UTlCdasa.js +0 -73
- streamlit/static/static/js/index.eR_vQpeg.js +0 -1
- streamlit/static/static/js/index.fLsU9uCJ.js +0 -1
- streamlit/static/static/js/index.kXOZCC_6.js +0 -1
- streamlit/static/static/js/useOnInputChange.BqEq0xFZ.js +0 -1
- {streamlit_nightly-1.45.1.dev20250507.data → streamlit_nightly-1.45.1.dev20250509.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/top_level.txt +0 -0
streamlit/errors.py
CHANGED
@@ -15,10 +15,13 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
import os
|
18
|
-
from typing import Any, Literal
|
18
|
+
from typing import TYPE_CHECKING, Any, Literal
|
19
19
|
|
20
20
|
from streamlit import util
|
21
21
|
|
22
|
+
if TYPE_CHECKING:
|
23
|
+
from datetime import date, time
|
24
|
+
|
22
25
|
|
23
26
|
class Error(Exception):
|
24
27
|
"""The base class for all exceptions thrown by Streamlit.
|
@@ -104,7 +107,7 @@ class StreamlitAuthError(StreamlitAPIException):
|
|
104
107
|
class StreamlitDuplicateElementId(DuplicateWidgetID):
|
105
108
|
"""An exception raised when the auto-generated ID of an element is not unique."""
|
106
109
|
|
107
|
-
def __init__(self, element_type: str):
|
110
|
+
def __init__(self, element_type: str) -> None:
|
108
111
|
super().__init__(
|
109
112
|
f"There are multiple `{element_type}` elements with the same "
|
110
113
|
"auto-generated ID. When this element is created, it is assigned an "
|
@@ -118,7 +121,7 @@ class StreamlitDuplicateElementId(DuplicateWidgetID):
|
|
118
121
|
class StreamlitDuplicateElementKey(DuplicateWidgetID):
|
119
122
|
"""An exception raised when the key of an element is not unique."""
|
120
123
|
|
121
|
-
def __init__(self, user_key: str):
|
124
|
+
def __init__(self, user_key: str) -> None:
|
122
125
|
super().__init__(
|
123
126
|
f"There are multiple elements with the same `key='{user_key}'`. "
|
124
127
|
"To fix this, please make sure that the `key` argument is unique for "
|
@@ -162,7 +165,7 @@ class StreamlitModuleNotFoundError(StreamlitAPIWarning):
|
|
162
165
|
|
163
166
|
|
164
167
|
class LocalizableStreamlitException(StreamlitAPIException):
|
165
|
-
def __init__(self, message: str, **kwargs):
|
168
|
+
def __init__(self, message: str, **kwargs: Any) -> None:
|
166
169
|
super().__init__((message).format(**kwargs))
|
167
170
|
self._exec_kwargs = kwargs
|
168
171
|
|
@@ -187,7 +190,7 @@ class StreamlitSetPageConfigMustBeFirstCommandError(LocalizableStreamlitExceptio
|
|
187
190
|
class StreamlitInvalidPageLayoutError(LocalizableStreamlitException):
|
188
191
|
"""Exception raised when an invalid value is specified for layout."""
|
189
192
|
|
190
|
-
def __init__(self, layout: str):
|
193
|
+
def __init__(self, layout: str) -> None:
|
191
194
|
super().__init__(
|
192
195
|
'`layout` must be `"centered"` or `"wide"` (got `"{layout}"`)',
|
193
196
|
layout=layout,
|
@@ -197,7 +200,7 @@ class StreamlitInvalidPageLayoutError(LocalizableStreamlitException):
|
|
197
200
|
class StreamlitInvalidSidebarStateError(LocalizableStreamlitException):
|
198
201
|
"""Exception raised when an invalid value is specified for `initial_sidebar_state`."""
|
199
202
|
|
200
|
-
def __init__(self, initial_sidebar_state: str):
|
203
|
+
def __init__(self, initial_sidebar_state: str) -> None:
|
201
204
|
super().__init__(
|
202
205
|
'`initial_sidebar_state` must be `"auto"` or `"expanded"` or '
|
203
206
|
'`"collapsed"` (got `"{initial_sidebar_state}"`)',
|
@@ -208,7 +211,7 @@ class StreamlitInvalidSidebarStateError(LocalizableStreamlitException):
|
|
208
211
|
class StreamlitInvalidMenuItemKeyError(LocalizableStreamlitException):
|
209
212
|
"""Exception raised when an invalid key is specified."""
|
210
213
|
|
211
|
-
def __init__(self, key: str):
|
214
|
+
def __init__(self, key: str) -> None:
|
212
215
|
super().__init__(
|
213
216
|
'We only accept the keys: `"Get help"`, `"Report a bug"`, and `"About"` (`"{key}"` is not a valid key.)',
|
214
217
|
key=key,
|
@@ -218,7 +221,7 @@ class StreamlitInvalidMenuItemKeyError(LocalizableStreamlitException):
|
|
218
221
|
class StreamlitInvalidURLError(LocalizableStreamlitException):
|
219
222
|
"""Exception raised when an invalid URL is specified for any of the menu items except for “About”."""
|
220
223
|
|
221
|
-
def __init__(self, url: str):
|
224
|
+
def __init__(self, url: str) -> None:
|
222
225
|
super().__init__(
|
223
226
|
'"{url}" is a not a valid URL. '
|
224
227
|
'You must use a fully qualified domain beginning with "http://", "https://", or "mailto:".',
|
@@ -242,7 +245,7 @@ class StreamlitInvalidColumnSpecError(LocalizableStreamlitException):
|
|
242
245
|
class StreamlitInvalidVerticalAlignmentError(LocalizableStreamlitException):
|
243
246
|
"""Exception raised when an invalid value is specified for vertical_alignment."""
|
244
247
|
|
245
|
-
def __init__(self, vertical_alignment: str):
|
248
|
+
def __init__(self, vertical_alignment: str) -> None:
|
246
249
|
super().__init__(
|
247
250
|
'The `vertical_alignment` argument to `st.columns` must be `"top"`, `"center"`, or `"bottom"`. \n'
|
248
251
|
"The argument passed was {vertical_alignment}.",
|
@@ -253,7 +256,7 @@ class StreamlitInvalidVerticalAlignmentError(LocalizableStreamlitException):
|
|
253
256
|
class StreamlitInvalidColumnGapError(LocalizableStreamlitException):
|
254
257
|
"""Exception raised when an invalid value is specified for gap."""
|
255
258
|
|
256
|
-
def __init__(self, gap: str):
|
259
|
+
def __init__(self, gap: str) -> None:
|
257
260
|
super().__init__(
|
258
261
|
'The `gap` argument to `st.columns` must be `"small"`, `"medium"`, or `"large"`. \n'
|
259
262
|
"The argument passed was {gap}.",
|
@@ -265,7 +268,9 @@ class StreamlitInvalidColumnGapError(LocalizableStreamlitException):
|
|
265
268
|
class StreamlitSelectionCountExceedsMaxError(LocalizableStreamlitException):
|
266
269
|
"""Exception raised when there are more default selections specified than the max allowable selections."""
|
267
270
|
|
268
|
-
def __init__(
|
271
|
+
def __init__(
|
272
|
+
self, current_selections_count: int, max_selections_count: int
|
273
|
+
) -> None:
|
269
274
|
super().__init__(
|
270
275
|
"Multiselect has {current_selections_count} {current_selections_noun} "
|
271
276
|
"selected but `max_selections` is set to {max_selections_count}. "
|
@@ -292,7 +297,7 @@ class StreamlitMixedNumericTypesError(LocalizableStreamlitException):
|
|
292
297
|
min_value: int | float | None,
|
293
298
|
max_value: int | float | None,
|
294
299
|
step: int | float | None,
|
295
|
-
):
|
300
|
+
) -> None:
|
296
301
|
value_type = None
|
297
302
|
min_value_type = None
|
298
303
|
max_value_type = None
|
@@ -328,7 +333,11 @@ class StreamlitMixedNumericTypesError(LocalizableStreamlitException):
|
|
328
333
|
class StreamlitValueBelowMinError(LocalizableStreamlitException):
|
329
334
|
"""Exception raised when the `min_value` is greater than the `value`."""
|
330
335
|
|
331
|
-
def __init__(
|
336
|
+
def __init__(
|
337
|
+
self,
|
338
|
+
value: int | float | date | time,
|
339
|
+
min_value: int | float | date | time,
|
340
|
+
) -> None:
|
332
341
|
super().__init__(
|
333
342
|
"The `value` {value} is less than the `min_value` {min_value}.",
|
334
343
|
value=value,
|
@@ -339,7 +348,11 @@ class StreamlitValueBelowMinError(LocalizableStreamlitException):
|
|
339
348
|
class StreamlitValueAboveMaxError(LocalizableStreamlitException):
|
340
349
|
"""Exception raised when the `max_value` is less than the `value`."""
|
341
350
|
|
342
|
-
def __init__(
|
351
|
+
def __init__(
|
352
|
+
self,
|
353
|
+
value: int | float | date | time,
|
354
|
+
max_value: int | float | date | time,
|
355
|
+
) -> None:
|
343
356
|
super().__init__(
|
344
357
|
"The `value` {value} is greater than the `max_value` {max_value}.",
|
345
358
|
value=value,
|
@@ -350,7 +363,7 @@ class StreamlitValueAboveMaxError(LocalizableStreamlitException):
|
|
350
363
|
class StreamlitJSNumberBoundsError(LocalizableStreamlitException):
|
351
364
|
"""Exception raised when a number exceeds the Javascript limits."""
|
352
365
|
|
353
|
-
def __init__(self, message: str):
|
366
|
+
def __init__(self, message: str) -> None:
|
354
367
|
super().__init__(message)
|
355
368
|
|
356
369
|
|
@@ -359,7 +372,7 @@ class StreamlitInvalidNumberFormatError(LocalizableStreamlitException):
|
|
359
372
|
invalid characters.
|
360
373
|
"""
|
361
374
|
|
362
|
-
def __init__(self, format: str):
|
375
|
+
def __init__(self, format: str) -> None:
|
363
376
|
super().__init__(
|
364
377
|
"Format string for `st.number_input` contains invalid characters: {format}",
|
365
378
|
format=format,
|
@@ -381,7 +394,7 @@ class StreamlitPageNotFoundError(LocalizableStreamlitException):
|
|
381
394
|
|
382
395
|
def __init__(
|
383
396
|
self, page: str, main_script_directory: str, uses_pages_directory: bool
|
384
|
-
):
|
397
|
+
) -> None:
|
385
398
|
directory = os.path.basename(main_script_directory)
|
386
399
|
|
387
400
|
message = (
|
@@ -428,7 +441,7 @@ class StreamlitInvalidFormCallbackError(LocalizableStreamlitException):
|
|
428
441
|
class StreamlitValueAssignmentNotAllowedError(LocalizableStreamlitException):
|
429
442
|
"""Exception raised when trying to set values where writes are not allowed."""
|
430
443
|
|
431
|
-
def __init__(self, key: str):
|
444
|
+
def __init__(self, key: str) -> None:
|
432
445
|
super().__init__(
|
433
446
|
"Values for the widget with `key` '{key}' cannot be set using `st.session_state`.",
|
434
447
|
key=key,
|
@@ -449,7 +462,7 @@ class StreamlitInvalidColorError(LocalizableStreamlitException):
|
|
449
462
|
class StreamlitBadTimeStringError(LocalizableStreamlitException):
|
450
463
|
"""Exception Raised when a time string argument is passed that cannot be parsed."""
|
451
464
|
|
452
|
-
def __init__(self, time_string: str):
|
465
|
+
def __init__(self, time_string: str) -> None:
|
453
466
|
super().__init__(
|
454
467
|
"Time string doesn't look right. It should be formatted as"
|
455
468
|
"`'1d2h34m'` or `2 days`, for example. Got: {time_string}",
|
@@ -460,14 +473,14 @@ class StreamlitBadTimeStringError(LocalizableStreamlitException):
|
|
460
473
|
class StreamlitSecretNotFoundError(LocalizableStreamlitException, FileNotFoundError):
|
461
474
|
"""Exception raised when a secret cannot be found or parsed in the secrets.toml file."""
|
462
475
|
|
463
|
-
def __init__(self, message: str):
|
476
|
+
def __init__(self, message: str) -> None:
|
464
477
|
super().__init__(message)
|
465
478
|
|
466
479
|
|
467
480
|
class StreamlitInvalidWidthError(LocalizableStreamlitException):
|
468
481
|
"""Exception raised when an invalid width value is provided."""
|
469
482
|
|
470
|
-
def __init__(self, width: Any, allow_content: bool = False):
|
483
|
+
def __init__(self, width: Any, allow_content: bool = False) -> None:
|
471
484
|
valid_values = "an integer (pixels) or 'stretch'"
|
472
485
|
if allow_content:
|
473
486
|
valid_values = "an integer (pixels), 'stretch', or 'content'"
|
@@ -155,7 +155,7 @@ class LLMThought:
|
|
155
155
|
labeler: LLMThoughtLabeler,
|
156
156
|
expanded: bool,
|
157
157
|
collapse_on_complete: bool,
|
158
|
-
):
|
158
|
+
) -> None:
|
159
159
|
self._container = parent_container.status(
|
160
160
|
labeler.get_initial_label(), expanded=expanded
|
161
161
|
)
|
@@ -283,7 +283,7 @@ class StreamlitCallbackHandler(BaseCallbackHandler):
|
|
283
283
|
expand_new_thoughts: bool = False,
|
284
284
|
collapse_completed_thoughts: bool = False,
|
285
285
|
thought_labeler: LLMThoughtLabeler | None = None,
|
286
|
-
):
|
286
|
+
) -> None:
|
287
287
|
"""Construct a new StreamlitCallbackHandler. This CallbackHandler is geared
|
288
288
|
towards use with a LangChain Agent; it displays the Agent's LLM and tool-usage
|
289
289
|
"thoughts" inside a series of Streamlit expanders.
|
streamlit/file_util.py
CHANGED
@@ -19,15 +19,16 @@ import errno
|
|
19
19
|
import io
|
20
20
|
import os
|
21
21
|
from pathlib import Path
|
22
|
+
from typing import Final
|
22
23
|
|
23
24
|
from streamlit import env_util, errors
|
24
25
|
from streamlit.string_util import is_binary_string
|
25
26
|
|
26
27
|
# Configuration and credentials are stored inside the ~/.streamlit folder
|
27
|
-
CONFIG_FOLDER_NAME = ".streamlit"
|
28
|
+
CONFIG_FOLDER_NAME: Final = ".streamlit"
|
28
29
|
|
29
30
|
# If enableStaticServing is enabled, static file served from the ./static folder
|
30
|
-
APP_STATIC_FOLDER_NAME = "static"
|
31
|
+
APP_STATIC_FOLDER_NAME: Final = "static"
|
31
32
|
|
32
33
|
|
33
34
|
def get_encoded_file_data(
|
@@ -128,12 +129,11 @@ def get_static_dir() -> str:
|
|
128
129
|
|
129
130
|
def get_app_static_dir(main_script_path: str) -> str:
|
130
131
|
"""Get the folder where app static files live."""
|
131
|
-
|
132
|
-
static_dir = main_script_path.parent / APP_STATIC_FOLDER_NAME
|
132
|
+
static_dir = Path(main_script_path).parent / APP_STATIC_FOLDER_NAME
|
133
133
|
return os.path.abspath(static_dir)
|
134
134
|
|
135
135
|
|
136
|
-
def get_streamlit_file_path(*filepath) -> str:
|
136
|
+
def get_streamlit_file_path(*filepath: str) -> str:
|
137
137
|
"""Return the full path to a file in ~/.streamlit.
|
138
138
|
|
139
139
|
This doesn't guarantee that the file (or its directory) exists.
|
@@ -145,7 +145,7 @@ def get_streamlit_file_path(*filepath) -> str:
|
|
145
145
|
return str(home / CONFIG_FOLDER_NAME / Path(*filepath))
|
146
146
|
|
147
147
|
|
148
|
-
def get_project_streamlit_file_path(*filepath):
|
148
|
+
def get_project_streamlit_file_path(*filepath: str) -> str:
|
149
149
|
"""Return the full path to a filepath in ${CWD}/.streamlit.
|
150
150
|
|
151
151
|
This doesn't guarantee that the file (or its directory) exists.
|
@@ -214,7 +214,7 @@ def file_in_pythonpath(filepath: str) -> bool:
|
|
214
214
|
)
|
215
215
|
|
216
216
|
|
217
|
-
def normalize_path_join(*args):
|
217
|
+
def normalize_path_join(*args: str) -> str:
|
218
218
|
"""Return the normalized path of the joined path.
|
219
219
|
|
220
220
|
Parameters
|
@@ -230,7 +230,7 @@ def normalize_path_join(*args):
|
|
230
230
|
return os.path.normpath(os.path.join(*args))
|
231
231
|
|
232
232
|
|
233
|
-
def get_main_script_directory(main_script):
|
233
|
+
def get_main_script_directory(main_script: str) -> str:
|
234
234
|
"""Return the full path to the main script directory.
|
235
235
|
|
236
236
|
Parameters
|
streamlit/git_util.py
CHANGED
@@ -23,7 +23,7 @@ from streamlit.hello.utils import show_code
|
|
23
23
|
|
24
24
|
def data_frame_demo():
|
25
25
|
@st.cache_data
|
26
|
-
def get_un_data():
|
26
|
+
def get_un_data() -> pd.DataFrame:
|
27
27
|
AWS_BUCKET_URL = "https://streamlit-demo-data.s3-us-west-2.amazonaws.com"
|
28
28
|
df = pd.read_csv(AWS_BUCKET_URL + "/agri.csv.gz")
|
29
29
|
return df.set_index("Region")
|
streamlit/hello/mapping_demo.py
CHANGED
@@ -23,7 +23,7 @@ from streamlit.hello.utils import show_code
|
|
23
23
|
|
24
24
|
def mapping_demo():
|
25
25
|
@st.cache_data
|
26
|
-
def from_data_file(filename):
|
26
|
+
def from_data_file(filename: str) -> pd.DataFrame:
|
27
27
|
url = (
|
28
28
|
"https://raw.githubusercontent.com/streamlit/"
|
29
29
|
"example-data/master/hello/v1/%s" % filename
|
streamlit/navigation/page.py
CHANGED
@@ -167,7 +167,7 @@ class StreamlitPage:
|
|
167
167
|
icon: str | None = None,
|
168
168
|
url_path: str | None = None,
|
169
169
|
default: bool = False,
|
170
|
-
):
|
170
|
+
) -> None:
|
171
171
|
# Must appear before the return so all pages, even if running in bare Python,
|
172
172
|
# have a _default property. This way we can always tell which script needs to run.
|
173
173
|
self._default: bool = default
|
streamlit/proto/Block_pb2.py
CHANGED
@@ -12,9 +12,12 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
|
+
from streamlit.proto import HeightConfig_pb2 as streamlit_dot_proto_dot_HeightConfig__pb2
|
17
|
+
from streamlit.proto import GapSize_pb2 as streamlit_dot_proto_dot_GapSize__pb2
|
15
18
|
|
16
19
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\"\
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\x1a!streamlit/proto/WidthConfig.proto\x1a\"streamlit/proto/HeightConfig.proto\x1a\x1dstreamlit/proto/GapSize.proto\"\xb6\r\n\x05\x42lock\x12#\n\x08vertical\x18\x01 \x01(\x0b\x32\x0f.Block.VerticalH\x00\x12\'\n\nhorizontal\x18\x02 \x01(\x0b\x32\x11.Block.HorizontalH\x00\x12\x1f\n\x06\x63olumn\x18\x03 \x01(\x0b\x32\r.Block.ColumnH\x00\x12\'\n\nexpandable\x18\x04 \x01(\x0b\x32\x11.Block.ExpandableH\x00\x12\x1b\n\x04\x66orm\x18\x05 \x01(\x0b\x32\x0b.Block.FormH\x00\x12,\n\rtab_container\x18\x06 \x01(\x0b\x32\x13.Block.TabContainerH\x00\x12\x19\n\x03tab\x18\x07 \x01(\x0b\x32\n.Block.TabH\x00\x12*\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x12.Block.ChatMessageH\x00\x12!\n\x07popover\x18\n \x01(\x0b\x32\x0e.Block.PopoverH\x00\x12\x1f\n\x06\x64ialog\x18\x0b \x01(\x0b\x32\r.Block.DialogH\x00\x12.\n\x0e\x66lex_container\x18\r \x01(\x0b\x32\x14.Block.FlexContainerH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x12\x0f\n\x02id\x18\x0c \x01(\tH\x01\x88\x01\x01\x1a*\n\x08Vertical\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12\x0e\n\x06height\x18\x02 \x01(\r\x1a\x19\n\nHorizontal\x12\x0b\n\x03gap\x18\x01 \x01(\t\x1a\xbb\x02\n\rFlexContainer\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12.\n\rheight_config\x18\x02 \x01(\x0b\x32\x17.streamlit.HeightConfig\x12,\n\x0cwidth_config\x18\x03 \x01(\x0b\x32\x16.streamlit.WidthConfig\x12(\n\ngap_config\x18\x04 \x01(\x0b\x32\x14.streamlit.GapConfig\x12\r\n\x05scale\x18\x05 \x01(\x02\x12\x31\n\tdirection\x18\x06 \x01(\x0e\x32\x1e.Block.FlexContainer.Direction\x12\x0c\n\x04wrap\x18\x07 \x01(\x08\"B\n\tDirection\x12\x17\n\x13\x44IRECTION_UNDEFINED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x1a\xef\x01\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0f\n\x03gap\x18\x02 \x01(\tB\x02\x18\x01\x12;\n\x12vertical_alignment\x18\x03 \x01(\x0e\x32\x1f.Block.Column.VerticalAlignment\x12\x13\n\x0bshow_border\x18\x04 \x01(\x08\x12-\n\ngap_config\x18\x05 \x01(\x0b\x32\x14.streamlit.GapConfigH\x00\x88\x01\x01\"4\n\x11VerticalAlignment\x12\x07\n\x03TOP\x10\x00\x12\n\n\x06\x43\x45NTER\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x42\r\n\x0b_gap_config\x1aM\n\nExpandable\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\x08\x65xpanded\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04icon\x18\x03 \x01(\tB\x0b\n\t_expanded\x1a\x9d\x01\n\x06\x44ialog\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64ismissible\x18\x02 \x01(\x08\x12(\n\x05width\x18\x03 \x01(\x0e\x32\x19.Block.Dialog.DialogWidth\x12\x14\n\x07is_open\x18\x04 \x01(\x08H\x00\x88\x01\x01\"#\n\x0b\x44ialogWidth\x12\t\n\x05SMALL\x10\x00\x12\t\n\x05LARGE\x10\x01\x42\n\n\x08_is_open\x1aY\n\x04\x46orm\x12\x0f\n\x07\x66orm_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63lear_on_submit\x18\x02 \x01(\x08\x12\x0e\n\x06\x62order\x18\x03 \x01(\x08\x12\x17\n\x0f\x65nter_to_submit\x18\x04 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1a\x63\n\x07Popover\x12\r\n\x05label\x18\x01 \x01(\t\x12\x1b\n\x13use_container_width\x18\x02 \x01(\x08\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\x0c\n\x04icon\x18\x05 \x01(\t\x1a\x8d\x01\n\x0b\x43hatMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x02 \x01(\t\x12\x32\n\x0b\x61vatar_type\x18\x03 \x01(\x0e\x32\x1d.Block.ChatMessage.AvatarType\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x06\n\x04typeB\x05\n\x03_idB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
|
18
21
|
|
19
22
|
_globals = globals()
|
20
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,32 +25,38 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Block_pb2',
|
|
22
25
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
26
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
27
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nBlockProto'
|
25
|
-
_globals['
|
26
|
-
_globals['
|
27
|
-
_globals['
|
28
|
-
_globals['
|
29
|
-
_globals['
|
30
|
-
_globals['
|
31
|
-
_globals['
|
32
|
-
_globals['
|
33
|
-
_globals['
|
34
|
-
_globals['
|
35
|
-
_globals['
|
36
|
-
_globals['
|
37
|
-
_globals['
|
38
|
-
_globals['
|
39
|
-
_globals['
|
40
|
-
_globals['
|
41
|
-
_globals['
|
42
|
-
_globals['
|
43
|
-
_globals['
|
44
|
-
_globals['
|
45
|
-
_globals['
|
46
|
-
_globals['
|
47
|
-
_globals['
|
48
|
-
_globals['
|
49
|
-
_globals['
|
50
|
-
_globals['
|
51
|
-
_globals['
|
52
|
-
_globals['
|
28
|
+
_globals['_BLOCK_COLUMN'].fields_by_name['gap']._loaded_options = None
|
29
|
+
_globals['_BLOCK_COLUMN'].fields_by_name['gap']._serialized_options = b'\030\001'
|
30
|
+
_globals['_BLOCK']._serialized_start=134
|
31
|
+
_globals['_BLOCK']._serialized_end=1852
|
32
|
+
_globals['_BLOCK_VERTICAL']._serialized_start=595
|
33
|
+
_globals['_BLOCK_VERTICAL']._serialized_end=637
|
34
|
+
_globals['_BLOCK_HORIZONTAL']._serialized_start=639
|
35
|
+
_globals['_BLOCK_HORIZONTAL']._serialized_end=664
|
36
|
+
_globals['_BLOCK_FLEXCONTAINER']._serialized_start=667
|
37
|
+
_globals['_BLOCK_FLEXCONTAINER']._serialized_end=982
|
38
|
+
_globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_start=916
|
39
|
+
_globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_end=982
|
40
|
+
_globals['_BLOCK_COLUMN']._serialized_start=985
|
41
|
+
_globals['_BLOCK_COLUMN']._serialized_end=1224
|
42
|
+
_globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_start=1157
|
43
|
+
_globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_end=1209
|
44
|
+
_globals['_BLOCK_EXPANDABLE']._serialized_start=1226
|
45
|
+
_globals['_BLOCK_EXPANDABLE']._serialized_end=1303
|
46
|
+
_globals['_BLOCK_DIALOG']._serialized_start=1306
|
47
|
+
_globals['_BLOCK_DIALOG']._serialized_end=1463
|
48
|
+
_globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_start=1416
|
49
|
+
_globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_end=1451
|
50
|
+
_globals['_BLOCK_FORM']._serialized_start=1465
|
51
|
+
_globals['_BLOCK_FORM']._serialized_end=1554
|
52
|
+
_globals['_BLOCK_TABCONTAINER']._serialized_start=1556
|
53
|
+
_globals['_BLOCK_TABCONTAINER']._serialized_end=1570
|
54
|
+
_globals['_BLOCK_TAB']._serialized_start=1572
|
55
|
+
_globals['_BLOCK_TAB']._serialized_end=1592
|
56
|
+
_globals['_BLOCK_POPOVER']._serialized_start=1594
|
57
|
+
_globals['_BLOCK_POPOVER']._serialized_end=1693
|
58
|
+
_globals['_BLOCK_CHATMESSAGE']._serialized_start=1696
|
59
|
+
_globals['_BLOCK_CHATMESSAGE']._serialized_end=1837
|
60
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=1793
|
61
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=1837
|
53
62
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Block_pb2.pyi
CHANGED
@@ -21,6 +21,9 @@ import builtins
|
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.internal.enum_type_wrapper
|
23
23
|
import google.protobuf.message
|
24
|
+
import streamlit.proto.GapSize_pb2
|
25
|
+
import streamlit.proto.HeightConfig_pb2
|
26
|
+
import streamlit.proto.WidthConfig_pb2
|
24
27
|
import sys
|
25
28
|
import typing
|
26
29
|
|
@@ -65,6 +68,56 @@ class Block(google.protobuf.message.Message):
|
|
65
68
|
) -> None: ...
|
66
69
|
def ClearField(self, field_name: typing.Literal["gap", b"gap"]) -> None: ...
|
67
70
|
|
71
|
+
@typing.final
|
72
|
+
class FlexContainer(google.protobuf.message.Message):
|
73
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
74
|
+
|
75
|
+
class _Direction:
|
76
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
77
|
+
V: typing_extensions.TypeAlias = ValueType
|
78
|
+
|
79
|
+
class _DirectionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Block.FlexContainer._Direction.ValueType], builtins.type):
|
80
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
81
|
+
DIRECTION_UNDEFINED: Block.FlexContainer._Direction.ValueType # 0
|
82
|
+
VERTICAL: Block.FlexContainer._Direction.ValueType # 1
|
83
|
+
HORIZONTAL: Block.FlexContainer._Direction.ValueType # 2
|
84
|
+
|
85
|
+
class Direction(_Direction, metaclass=_DirectionEnumTypeWrapper): ...
|
86
|
+
DIRECTION_UNDEFINED: Block.FlexContainer.Direction.ValueType # 0
|
87
|
+
VERTICAL: Block.FlexContainer.Direction.ValueType # 1
|
88
|
+
HORIZONTAL: Block.FlexContainer.Direction.ValueType # 2
|
89
|
+
|
90
|
+
BORDER_FIELD_NUMBER: builtins.int
|
91
|
+
HEIGHT_CONFIG_FIELD_NUMBER: builtins.int
|
92
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
93
|
+
GAP_CONFIG_FIELD_NUMBER: builtins.int
|
94
|
+
SCALE_FIELD_NUMBER: builtins.int
|
95
|
+
DIRECTION_FIELD_NUMBER: builtins.int
|
96
|
+
WRAP_FIELD_NUMBER: builtins.int
|
97
|
+
border: builtins.bool
|
98
|
+
scale: builtins.float
|
99
|
+
direction: global___Block.FlexContainer.Direction.ValueType
|
100
|
+
wrap: builtins.bool
|
101
|
+
@property
|
102
|
+
def height_config(self) -> streamlit.proto.HeightConfig_pb2.HeightConfig: ...
|
103
|
+
@property
|
104
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
105
|
+
@property
|
106
|
+
def gap_config(self) -> streamlit.proto.GapSize_pb2.GapConfig: ...
|
107
|
+
def __init__(
|
108
|
+
self,
|
109
|
+
*,
|
110
|
+
border: builtins.bool = ...,
|
111
|
+
height_config: streamlit.proto.HeightConfig_pb2.HeightConfig | None = ...,
|
112
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
113
|
+
gap_config: streamlit.proto.GapSize_pb2.GapConfig | None = ...,
|
114
|
+
scale: builtins.float = ...,
|
115
|
+
direction: global___Block.FlexContainer.Direction.ValueType = ...,
|
116
|
+
wrap: builtins.bool = ...,
|
117
|
+
) -> None: ...
|
118
|
+
def HasField(self, field_name: typing.Literal["gap_config", b"gap_config", "height_config", b"height_config", "width_config", b"width_config"]) -> builtins.bool: ...
|
119
|
+
def ClearField(self, field_name: typing.Literal["border", b"border", "direction", b"direction", "gap_config", b"gap_config", "height_config", b"height_config", "scale", b"scale", "width_config", b"width_config", "wrap", b"wrap"]) -> None: ...
|
120
|
+
|
68
121
|
@typing.final
|
69
122
|
class Column(google.protobuf.message.Message):
|
70
123
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
@@ -88,10 +141,14 @@ class Block(google.protobuf.message.Message):
|
|
88
141
|
GAP_FIELD_NUMBER: builtins.int
|
89
142
|
VERTICAL_ALIGNMENT_FIELD_NUMBER: builtins.int
|
90
143
|
SHOW_BORDER_FIELD_NUMBER: builtins.int
|
144
|
+
GAP_CONFIG_FIELD_NUMBER: builtins.int
|
91
145
|
weight: builtins.float
|
92
146
|
gap: builtins.str
|
147
|
+
"""Deprecated. Use gap_size"""
|
93
148
|
vertical_alignment: global___Block.Column.VerticalAlignment.ValueType
|
94
149
|
show_border: builtins.bool
|
150
|
+
@property
|
151
|
+
def gap_config(self) -> streamlit.proto.GapSize_pb2.GapConfig: ...
|
95
152
|
def __init__(
|
96
153
|
self,
|
97
154
|
*,
|
@@ -99,8 +156,11 @@ class Block(google.protobuf.message.Message):
|
|
99
156
|
gap: builtins.str = ...,
|
100
157
|
vertical_alignment: global___Block.Column.VerticalAlignment.ValueType = ...,
|
101
158
|
show_border: builtins.bool = ...,
|
159
|
+
gap_config: streamlit.proto.GapSize_pb2.GapConfig | None = ...,
|
102
160
|
) -> None: ...
|
103
|
-
def
|
161
|
+
def HasField(self, field_name: typing.Literal["_gap_config", b"_gap_config", "gap_config", b"gap_config"]) -> builtins.bool: ...
|
162
|
+
def ClearField(self, field_name: typing.Literal["_gap_config", b"_gap_config", "gap", b"gap", "gap_config", b"gap_config", "show_border", b"show_border", "vertical_alignment", b"vertical_alignment", "weight", b"weight"]) -> None: ...
|
163
|
+
def WhichOneof(self, oneof_group: typing.Literal["_gap_config", b"_gap_config"]) -> typing.Literal["gap_config"] | None: ...
|
104
164
|
|
105
165
|
@typing.final
|
106
166
|
class Expandable(google.protobuf.message.Message):
|
@@ -272,6 +332,7 @@ class Block(google.protobuf.message.Message):
|
|
272
332
|
CHAT_MESSAGE_FIELD_NUMBER: builtins.int
|
273
333
|
POPOVER_FIELD_NUMBER: builtins.int
|
274
334
|
DIALOG_FIELD_NUMBER: builtins.int
|
335
|
+
FLEX_CONTAINER_FIELD_NUMBER: builtins.int
|
275
336
|
ALLOW_EMPTY_FIELD_NUMBER: builtins.int
|
276
337
|
ID_FIELD_NUMBER: builtins.int
|
277
338
|
allow_empty: builtins.bool
|
@@ -296,6 +357,8 @@ class Block(google.protobuf.message.Message):
|
|
296
357
|
def popover(self) -> global___Block.Popover: ...
|
297
358
|
@property
|
298
359
|
def dialog(self) -> global___Block.Dialog: ...
|
360
|
+
@property
|
361
|
+
def flex_container(self) -> global___Block.FlexContainer: ...
|
299
362
|
def __init__(
|
300
363
|
self,
|
301
364
|
*,
|
@@ -309,14 +372,15 @@ class Block(google.protobuf.message.Message):
|
|
309
372
|
chat_message: global___Block.ChatMessage | None = ...,
|
310
373
|
popover: global___Block.Popover | None = ...,
|
311
374
|
dialog: global___Block.Dialog | None = ...,
|
375
|
+
flex_container: global___Block.FlexContainer | None = ...,
|
312
376
|
allow_empty: builtins.bool = ...,
|
313
377
|
id: builtins.str | None = ...,
|
314
378
|
) -> None: ...
|
315
|
-
def HasField(self, field_name: typing.Literal["_id", b"_id", "chat_message", b"chat_message", "column", b"column", "dialog", b"dialog", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "id", b"id", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> builtins.bool: ...
|
316
|
-
def ClearField(self, field_name: typing.Literal["_id", b"_id", "allow_empty", b"allow_empty", "chat_message", b"chat_message", "column", b"column", "dialog", b"dialog", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "id", b"id", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> None: ...
|
379
|
+
def HasField(self, field_name: typing.Literal["_id", b"_id", "chat_message", b"chat_message", "column", b"column", "dialog", b"dialog", "expandable", b"expandable", "flex_container", b"flex_container", "form", b"form", "horizontal", b"horizontal", "id", b"id", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> builtins.bool: ...
|
380
|
+
def ClearField(self, field_name: typing.Literal["_id", b"_id", "allow_empty", b"allow_empty", "chat_message", b"chat_message", "column", b"column", "dialog", b"dialog", "expandable", b"expandable", "flex_container", b"flex_container", "form", b"form", "horizontal", b"horizontal", "id", b"id", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> None: ...
|
317
381
|
@typing.overload
|
318
382
|
def WhichOneof(self, oneof_group: typing.Literal["_id", b"_id"]) -> typing.Literal["id"] | None: ...
|
319
383
|
@typing.overload
|
320
|
-
def WhichOneof(self, oneof_group: typing.Literal["type", b"type"]) -> typing.Literal["vertical", "horizontal", "column", "expandable", "form", "tab_container", "tab", "chat_message", "popover", "dialog"] | None: ...
|
384
|
+
def WhichOneof(self, oneof_group: typing.Literal["type", b"type"]) -> typing.Literal["vertical", "horizontal", "column", "expandable", "form", "tab_container", "tab", "chat_message", "popover", "dialog", "flex_container"] | None: ...
|
321
385
|
|
322
386
|
global___Block = Block
|
@@ -73,7 +73,7 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
73
73
|
id: builtins.str
|
74
74
|
"""ID, required for selection events."""
|
75
75
|
mapbox_token: builtins.str
|
76
|
-
"""The
|
76
|
+
"""The Mapbox token, if any."""
|
77
77
|
width: builtins.int
|
78
78
|
"""Width in pixels"""
|
79
79
|
height: builtins.int
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: streamlit/proto/GapSize.proto
|
4
|
+
# Protobuf Python Version: 5.26.1
|
5
|
+
"""Generated protocol buffer code."""
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
10
|
+
# @@protoc_insertion_point(imports)
|
11
|
+
|
12
|
+
_sym_db = _symbol_database.Default()
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dstreamlit/proto/GapSize.proto\x12\tstreamlit\"?\n\tGapConfig\x12&\n\x08gap_size\x18\x01 \x01(\x0e\x32\x12.streamlit.GapSizeH\x00\x42\n\n\x08gap_spec*H\n\x07GapSize\x12\x11\n\rGAP_UNDEFINED\x10\x00\x12\t\n\x05SMALL\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\t\n\x05LARGE\x10\x03\x12\x08\n\x04NONE\x10\x04\x42,\n\x1c\x63om.snowflake.apps.streamlitB\x0cGapSizeProtob\x06proto3')
|
18
|
+
|
19
|
+
_globals = globals()
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.GapSize_pb2', _globals)
|
22
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
23
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\014GapSizeProto'
|
25
|
+
_globals['_GAPSIZE']._serialized_start=109
|
26
|
+
_globals['_GAPSIZE']._serialized_end=181
|
27
|
+
_globals['_GAPCONFIG']._serialized_start=44
|
28
|
+
_globals['_GAPCONFIG']._serialized_end=107
|
29
|
+
# @@protoc_insertion_point(module_scope)
|